7 ways to accelerate your website using nginx
TRANSCRIPT
7 Ways to Accelerate Your Website Using NGINX Andrew Hutchings, Technical Product Manager, NGINX
What is NGINX?
Internet
WebserverServe content from disk
Application GatewayFastCGI, uWSGI, Passenger…
Reverse ProxyCaching, Load Balancing…
HTTP traffic
163 milliontotal sites
running on NGINX
3Source: Netcraft May 2016 Web Server Survey
51%of the Top 10,000
most visited websites
4Source: W3Techs Web Technology Survey
NGINX has become the heart of the modern
web
5
MORE INFORMATION AT NGINX.COM
• First OSS release in 2004• Company founded in 2011• VC-backed by industry
leaders• 500+ Customers• 100+ Employees
Igor Sysoev, NGINX creator and founder
MORE INFORMATION AT NGINX.COM
OPEN SOURCE PLUSFEATURES
REQUEST ROUTING COMPRESSION LOAD BALANCING APP HEALTH MONITORING GUI VISUALIZATION
SSL EMBEDDED SCRIPT LANGUAGE EDGE CACHE MEDIA STREAMING MONITORING ANALYTICS CONFIGURATION RESTFUL API
What’s inside NGINX Plus?
7
App Delivery
ControllerStorage
App Servers
Web Servers
NN
N
You can add us to your current stack today
Application delivery for microservices
NGINX is in each microservice, ensuring they are:
• Connected• Served• Authenticated• Secured• Cached• Load Balanced• Scaled
9
nginScript• First preview announced at nginx.conf 2015• Custom JS engine • One VM for each request• JS snippets embedded in NGINX configuration• Evaluated at runtime
Dynamic modules• Easy distribution of 3rd party modules to end
users• Migration of existing modules (rebuild)• Only certified modules loadable in NGINX Plus
• Dynatrace is certified NGINX partner• Dynatrace 6.2 offers NGINX web server
agent• Full coverage of transactions• Part of browser-to-database visibility of
business logic in operation“Once you’ve decided to welcome NGINX as a new member in your enterprise environment, you have to care for proper monitoring. The more complex your environment becomes, the more important it is to get full end-to-end visibility of your transactions.”Harald ZeitlhoferPerformance Advocate, Dynatrace
Dynatrace for NGINX
NGINX in Dynatrace Transaction Flow
Performance Monitoring in Dynatrace Transaction Trace
7 Ways to Accelerate Your Website Using NGINX
(with a little help from our friends at Dynatrace)
15
19931995
19971999
20012003
20052007
20092011
20130
10,000
20,000
30,000
40,000
50,000
60,000
IP Traffic (PB/month)
19931995
19971999
20012003
20052007
20092011
20130
500
1,000
1,500
2,000
2,500
3,000
Online users (millions)
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
0200400600800
1,0001,2001,4001,6001,800
0
20
40
60
80
100
120
Web Page Weight
Weight (kB)Weight (objects)
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
0
2
4
6
8
10
12
Typical user wait time (seconds)
MORE INFORMATION AT NGINX.COM
1. Event-Driven Reverse Proxies
MORE INFORMATION AT NGINX.COM
2. Scale horizontally with Load Balancing
Internet
3. Cache all the things...
MORE INFORMATION AT NGINX.COM
4. Use compressiongzip on; gzip_min_length 1000;gzip_comp_level 1;gzip_proxied any; gzip_types text/plain text/xml text/css application/x-javascript; gzip_vary on; gzip_disable "MSIE [1-6]\.(?!.*SV1)";
Content-Encoding: gzip
MORE INFORMATION AT NGINX.COM
5. Optimize your SSL and TLS settings
HTTPS to upstreamHTTPS to client
Remote client’s certificate
NGINX’s client certificate
Upstream server’s certificate
NGINX’s server certificate
ssl_protocols TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS";
MORE INFORMATION AT NGINX.COM
6. Enable HTTP/2 Up to 4x performance improvement for complex sites on high-latency networks
7. Monitor, Improve, Iterate
Harald Zeitlhofer‘s favorite performance tools
• Load Generator (Apache Benchmark, Selenium, JMeter)
• Firebug, Google Developer ToolsDynatrace Ajax Edition
• Dynatrace Application Monitoring Free Trial– Free trial license for 30 days– Free personal license for developers
• Dynatrace Ruxit– 2016 free hours for monitoring
http://bit.ly/monitoring-2016http://bit.ly/dttrial
Our joint further information resources
1. about:performance site2. NGINX performance blog post – Harald Z3. PHP on NGINX performance post – Harald Z4. NGINX performance presentations5. Application Performance Management with NGINX6. NGINX Plus description7. NGINX vs. F5 price/performance comparison8. NGINX Microservices Reference Architecture – Proxy Model9. NGINX Plus R9 features10.NGINX documentation11.Introduction to Microservices blog post12.Microservices ebook – free download
Thank Younginx.com | @nginx