Application Delivery and Acceleration with NGINX

Application Delivery and Acceleration with NGINX

For the recorded webinar, visit nginx.com/webinars.

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.

17a8a63d6d97b2fb736285f0aff5b48f?s=128

NGINX Inc

March 12, 2014
Tweet

Transcript

  1. NGINX for Application Delivery & Acceleration Introduced by Andrew Alexeev

    Presented by Owen Garrett Nginx, Inc.
  2. 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.
  3. 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)  
  4. …  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      
  5. 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  
  6. What  can  you  do?  

  7. INTRODUCING  NGINX…  

  8. 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
  9. 143,000,000 Websites NGINX Accelerates

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

  11. Three  steps  to  a  faster  website   Offload  HTTP  “Heavy

     Liking”     Cache  common  responses     Compress  data  to  reduce  bandwidth  
  12. 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  
  13. 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  
  14. Hundreds  of  concurrent   connecZons…   handed  by  a  small

     number  of   mulZplexing  processes,…   typically  one  process   per  core   NGINX  architecture  
  15. 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
  16. 2.  Cache  common  responses   GET  /logo.png   GET  /logo.png

      N Hybrid  on-­‐disk  and   in-­‐memory  cache  
  17. 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  
  18. 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  
  19. Three  steps  to  a  faster  website   Offload  HTTP  “Heavy

     Liking”     Cache  common  responses     Compress  data  to  reduce  bandwidth  
  20. 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)