Slide 1

Slide 1 text

NGINX for Application Delivery & Acceleration Introduced by Andrew Alexeev Presented by Owen Garrett Nginx, Inc.

Slide 2

Slide 2 text

About this webinar NGINX is an HTTP request and load balancing server that powers many of the world's busiest websites. Learn why NGINX is such a popular choice, and see how it improves the capacity of web applications through HTTP intelligence and caching.

Slide 3

Slide 3 text

Why  is  page  speed  important?   •  We  used  to  talk  about  the  ‘N  second  rule’:   – 10-­‐second  rule  (Jakob  Nielsen,  March  1997)   – 8-­‐second  rule  (Zona  Research,  June  2001)   – 4-­‐second  rule  (Jupiter  Research,  June  2006)   – 3-­‐second  rule  (PhocusWright,  March  2010)  

Slide 4

Slide 4 text

…  then  Google  changed  the  game     “We  want  you  to  be  able  to  get   from  one  page  to  another  as   quickly  as  you  turn  the  page  on   a  book”     Urs  Hölzle,  Google      

Slide 5

Slide 5 text

The  costs  of  poor  performance   •  Google:  search  enhancements  cost  0.5s  page  load   –  Ad  CTR  dropped  20%   •  Amazon:  ArZficially  increased  page  load  by  100ms   –  Customer  revenue  dropped  1%   •  Walmart,  Yahoo,  Shopzilla,  Edmunds,  Mozilla…     –  All  reported  similar  effects  on  revenue   •  Google  Pagerank  –  Page  Speed  affects  Page  Rank   –  Time  to  First  Byte  is  what  appears  to  count  

Slide 6

Slide 6 text

What  can  you  do?  

Slide 7

Slide 7 text

INTRODUCING  NGINX…  

Slide 8

Slide 8 text

What  is  NGINX?   Internet N Web Server Serve content from disk Application Server FastCGI, uWSGI, Passenger… Proxy Caching, Load Balancing… HTTP traffic þ Application Acceleration þ SSL and SPDY termination þ Performance Monitoring þ High Availability Advanced Features: þ Bandwidth Management þ Content-based Routing þ Request Manipulation þ Response Rewriting þ Authentication þ Video Delivery þ Mail Proxy þ GeoLocation

Slide 9

Slide 9 text

143,000,000 Websites NGINX Accelerates

Slide 10

Slide 10 text

22% Top 1 million websites 37% Top 1,000 websites

Slide 11

Slide 11 text

Three  steps  to  a  faster  website   Offload  HTTP  “Heavy  Liking”     Cache  common  responses     Compress  data  to  reduce  bandwidth  

Slide 12

Slide 12 text

Hundreds  of  concurrent   connecZons…   require  hundreds  of  heavyweight   threads  or  processes…   compeZng  for  limited     CPU  and  memory   What  is  the  challenge  with  HTTP?   Client-­‐side:   Slow  network   MulZple  connecZons   HTTP  Keepalives   Server-­‐side:   Limited  concurrency  

Slide 13

Slide 13 text

Let’s  try  an  example…   •  Client  opens  8  connecZons,  4  requests  in  each  (32  req)   •  Average  request  processing  Zme  is  <10ms  (single  core)   •  Average  client  write  is  80ms,  average  read  160ms   •  One  client  can  occupy  8  concurrency  slots  for  60+  seconds   r   w   250ms   r   w   250ms   r   w   250ms   r   w   250ms   60  seconds  or  more…   Idle  keepalive   x  8  

Slide 14

Slide 14 text

Hundreds  of  concurrent   connecZons…   handed  by  a  small  number  of   mulZplexing  processes,…   typically  one  process   per  core   NGINX  architecture  

Slide 15

Slide 15 text

NGINX  transforms  applicaZon  performance   •  NGINX  has  almost-­‐unlimited  concurrency   – Transforms  worst-­‐case  traffic  to  best-­‐case   – Maximizes  applicaZon  uZlizaZon   Internet N Slow, high-concurrency internet-side traffic Fast, efficient local-side traffic

Slide 16

Slide 16 text

2.  Cache  common  responses   GET  /logo.png   GET  /logo.png   N Hybrid  on-­‐disk  and   in-­‐memory  cache  

Slide 17

Slide 17 text

What  about  dynamic  content?   •  Some  content  appears  to  be  uncacheable     – Use  client-­‐side  or  server-­‐side  page  assembly   – Use  cache  keys   – Use  cache  purging   – Use  fast  cache  Zmes  

Slide 18

Slide 18 text

3.  Compress  data  to  reduce  bandwidth   •  Reduce  bandwidth  requirements  per  client   – Content  Compression  reduces  text  and  HTML   •  Typically  about  70%  reducZon   – Image  resampling  reduces  JPEG  size  

Slide 19

Slide 19 text

Three  steps  to  a  faster  website   Offload  HTTP  “Heavy  Liking”     Cache  common  responses     Compress  data  to  reduce  bandwidth  

Slide 20

Slide 20 text

Closing  thoughts   •  37%  of  the  busiest  websites  use  NGINX   –  In  most  situaZons,  it’s  a  drop-­‐in  extension   •  Check  out  the  blogs  on  nginx.com   •  Future  webinars:  nginx.com/webinars   Try  NGINX  F/OSS  (nginx.org)  or  NGINX  Plus  (nginx.com)