Slide 1

Slide 1 text

Supercharge application delivery to satisfy users Owen Garrett Nginx, Inc.

Slide 2

Slide 2 text

About this webinar Users  expect  websites  and  web  apps  to  be  quick  and  reliable.  Yet,  the  rapid  pace  of   technology  and  the  growing  number  of  device  types  can  present  challenges  for   developers.  The  good  news  is  that  there  are  a  number  of  tools  and  techniques  you  can   use  to  supercharge  applica?on  delivery  to  sa?sfy  your  users.  Join  this  webinar  to  learn   about  the  impact  of  slow  applica?on  delivery  on  user  experience  and  business.  Then   see  ways  that  NGINX  can  help,  including:  Ways  to  improve  applica?on  load  ?mes,  how   to  absorb  flash  floods  of  web  traffic,  when  and  how  to  take  advantage  of  load   balancing,  and  more.  

Slide 3

Slide 3 text

Who  are  you?    Who  am  I?   •  Introduc?ons  and  poll   •  Please  use  the  Q&A  for  ques?ons  and  comments   Owen  GarreO   Head  of   Products   Nginx,  Inc.   Who?   What?   Where?  

Slide 4

Slide 4 text

First  steps  at  Applica?on  Delivery   •  Igor  Sysoev   •  Systems  Administrator  at  Rambler.ru   –  Apache  admin  and  module  developer   •  Addressing  the  ‘C10K’  problem   –  Developed  ‘accelera?ng  proxy’   –  NGINX  0.1.0,  released  October  4th  2004  

Slide 5

Slide 5 text

WEB  PERFORMANCE  MATTERS  

Slide 6

Slide 6 text

Your  users  are  in  charge   You  may  own  the  content  and  features,  but  your  users  are  the  ones  in  charge   They  alone  decide:                 If  you  can’t  provide  your  users  with  what  they  need,  when  they  need  it,  they  will  go  elsewhere.   If  you  page  has  not  loaded  within  3  seconds,  up  to  40%  of  your  users  will  give  up  on  you     Which  sites  they  visit   The  apps  they  need   The  performance   they’ll  tolerate   When  to  give  up  

Slide 7

Slide 7 text

Every  user  counts…   •  It  does  not  maOer  how  busy  your  site  is…   – Flash  Crowd   – HTTP  Post  AOack,  Slow  Read  AOack   “We  want  you  to  be  able  to  flick  from  one  page  to  another  as   quickly  as  you  can  flick  a  page  on  a  book.  So  we’re  really  aiming   very,  very  high  here…  at  something  like  100  milliseconds.”     Urs  Hölzle,  Senior  VP  Opera?ons,  Google  

Slide 8

Slide 8 text

What  can  you  do?  

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Internet 4  opportuni?es  to  op?mize   Python   Ruby   node.js   Java   Client  Device   Network   Applica?on  Stack   Code  

Slide 11

Slide 11 text

Improve  performance  on  Client  Device   •  Reduce  HTTP  GETs  and  bandwidth:   –  Merge  and  reduce  resources   –  Smart  control  of  client  caching   •  Rearrange  resources  to  speed  up  rendering   •  Your  op?ons:   –  Preprocess  in  Asset  Pipeline   –  In-­‐app  (Google  Pagespeed)   –  As-­‐a-­‐Service  

Slide 12

Slide 12 text

Improve  performance  on  the  Network   •  Faster  resource  downloads:     –  Content  Delivery  Network   –  Google  SPDY   –  OCSP  stapling   •  Your  op?ons:   –  Use  a  CDN   –  Use  NGINX+  

Slide 13

Slide 13 text

Improve  performance  of  the  Applica?on  Stack   •  What  do  we  mean?   •  The  ‘Applica?on  Stack’  bridges  HTTP  traffic     to  your  code,  APIs  and  Sta?c  content   Internet Your  code:   •  Python,  Ruby,   node.js,  Java   APIs   •  Internal  and   External  APIs   “Sta?c”  Content   •  On  disk   •  In  database   HTTP  

Slide 14

Slide 14 text

Three  steps  to  a  faster  applica?on   Op?mize  HTTP  processing     Cache  common  responses     Be  smart  with  your  traffic  

Slide 15

Slide 15 text

Hundreds  of  concurrent   connec?ons…   require  hundreds  of  heavyweight   threads  or  processes…   compe?ng  for  limited     CPU  and  memory   What  is  the  challenge  with  HTTP?   Client-­‐side:   Slow  network   Mul?ple  connec?ons   HTTP  Keepalives   Server-­‐side:   Limited  concurrency  

Slide 16

Slide 16 text

Lets  see  it  in  ac?on…   SlowHTTPTest   code.google.com/p/slowhOptest/   WordPress   Standard  install  with  sample  content   :80  

Slide 17

Slide 17 text

Hundreds  of  concurrent   connec?ons…   handed  by  a  small  number  of   mul?plexing  processes,…   typically  one  process   per  core   NGINX  architecture  

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

Lets  see  it  in  ac?on…   SlowHTTPTest   code.google.com/p/slowhOptest/   NGINX+  and  WordPress   Standard  install  with  sample  content   :8080   N+

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Lets  see  it  in  ac?on…   SlowHTTPTest   code.google.com/p/slowhOptest/   NGINX+  and  WordPress   Standard  install  with  sample  content   :8080   N

Slide 23

Slide 23 text

Be  smart  with  your  Traffic   •  Reduce  bandwidth  requirements  per  client   –  Content  Compression  reduces  text  and  HTML   •  Typically  about  70%  reduc?on   –  Image  resampling  reduces  JPEG  size   •  Priori?ze  and  rate-­‐limit  requests  and  responses   –  Queues,  Rate-­‐limits,  Honeypots   •  Use  NGINX  Plus  to  its  full  poten?al  

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Closing  thoughts   •  Applica?on  Performance  is  key   •  Four  areas  to  focus:   –  The  Applica?on   –  The  Client   –  The  Network   –  The  Applica?on  Stack   •  NGINX  is  used  by  39.6%  of  the  top  10,000  sites  

Slide 26

Slide 26 text

Find  out  more   •  hOp://nginx.com   –  Webinars,  Documenta?on,  Free  Trial   •  hOp://nginx.org   –  Open  Source,  Community,  Documenta?on   •  @nginx,  @nginxorg   •  hOp://nginx.com/nginxconf/