7 ways to accelerate your website using nginx

26
7 Ways to Accelerate Your Website Using NGINX Andrew Hutchings, Technical Product Manager, NGINX

Upload: andrew-hutchings

Post on 09-Jan-2017

103 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: 7 Ways to Accelerate Your Website Using NGINX

7 Ways to Accelerate Your Website Using NGINX Andrew Hutchings, Technical Product Manager, NGINX

Page 2: 7 Ways to Accelerate Your Website Using NGINX

What is NGINX?

Internet

WebserverServe content from disk

Application GatewayFastCGI, uWSGI, Passenger…

Reverse ProxyCaching, Load Balancing…

HTTP traffic

Page 3: 7 Ways to Accelerate Your Website Using NGINX

163 milliontotal sites

running on NGINX

3Source: Netcraft May 2016 Web Server Survey

Page 4: 7 Ways to Accelerate Your Website Using NGINX

51%of the Top 10,000

most visited websites

4Source: W3Techs Web Technology Survey

Page 5: 7 Ways to Accelerate Your Website Using NGINX

NGINX has become the heart of the modern

web

5

Page 6: 7 Ways to Accelerate Your Website Using NGINX

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

Page 7: 7 Ways to Accelerate Your Website Using NGINX

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

Page 8: 7 Ways to Accelerate Your Website Using NGINX

App Delivery

ControllerStorage

App Servers

Web Servers

NN

N

You can add us to your current stack today

Page 9: 7 Ways to Accelerate Your Website Using NGINX

Application delivery for microservices

NGINX is in each microservice, ensuring they are:

• Connected• Served• Authenticated• Secured• Cached• Load Balanced• Scaled

9

Page 10: 7 Ways to Accelerate Your Website Using NGINX

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

Page 11: 7 Ways to Accelerate Your Website Using NGINX

Dynamic modules• Easy distribution of 3rd party modules to end

users• Migration of existing modules (rebuild)• Only certified modules loadable in NGINX Plus

Page 12: 7 Ways to Accelerate Your Website Using NGINX

• 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

Page 13: 7 Ways to Accelerate Your Website Using NGINX

NGINX in Dynatrace Transaction Flow

Page 14: 7 Ways to Accelerate Your Website Using NGINX

Performance Monitoring in Dynatrace Transaction Trace

Page 15: 7 Ways to Accelerate Your Website Using NGINX

7 Ways to Accelerate Your Website Using NGINX

(with a little help from our friends at Dynatrace)

15

Page 16: 7 Ways to Accelerate Your Website Using NGINX

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)

Page 17: 7 Ways to Accelerate Your Website Using NGINX

MORE INFORMATION AT NGINX.COM

1. Event-Driven Reverse Proxies

Page 18: 7 Ways to Accelerate Your Website Using NGINX

MORE INFORMATION AT NGINX.COM

2. Scale horizontally with Load Balancing

Internet

Page 19: 7 Ways to Accelerate Your Website Using NGINX

3. Cache all the things...

Page 20: 7 Ways to Accelerate Your Website Using NGINX

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

Page 21: 7 Ways to Accelerate Your Website Using NGINX

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";

Page 22: 7 Ways to Accelerate Your Website Using NGINX

MORE INFORMATION AT NGINX.COM

6. Enable HTTP/2 Up to 4x performance improvement for complex sites on high-latency networks

Page 23: 7 Ways to Accelerate Your Website Using NGINX

7. Monitor, Improve, Iterate

Page 24: 7 Ways to Accelerate Your Website Using NGINX

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

Page 26: 7 Ways to Accelerate Your Website Using NGINX

Thank Younginx.com | @nginx