SlideShare une entreprise Scribd logo
1  sur  93
Télécharger pour lire hors ligne
From Fast to SPDY

   Ido Safruti,

   Mike Belshe,
SPDY
SPDY
 ee
Agenda

 Challenges of HTTP/1.1
 SPDY
 Some data, and results
 How we tune today
 What’s next
rfc2616: HTTP/1.1
  drafted:1998
  released June 1999
What else was there in 1998
What else was there in 1998
What else was there in 1998
What else was there in 1998
What else was there in 1998
What else was there in 1998
What else was there in 1998




                              http://web.archive.org/web/19980425182703/http://geocities.com/
What else was there in 1998




                                                   4/25/1998
                                                   no external scripts or css files
                                                   20 images, ~65KB entire page




                              http://web.archive.org/web/19980425182703/http://geocities.com/
Did They Plan for That!?
HTTP/1.1
 Compression
 Headers
 Poor connection management
  Only one request can be done at a time (Half duplex)
  Particularly important on high latency links (mobile)
  short lived connections
 security - optional
Compression




 * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
Compression
Optional
Only for response body
 ~99% of browsers support




 * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
Compression
Optional
Only for response body
 ~99% of browsers support
 Particularly important on small pipes (mobile)




 * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
Compression
Optional
Only for response body
 ~99% of browsers support
 Particularly important on small pipes (mobile)

15%-30% of responses not compressed for no good reason!*
  for SSL even worse



 * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
Compression
Optional
Only for response body
 ~99% of browsers support
 Particularly important on small pipes (mobile)

15%-30% of responses not compressed for no good reason!*
  for SSL even worse
no request compression

 * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
Compression
Optional
Only for response body
 ~99% of browsers support
 Particularly important on small pipes (mobile)

15%-30% of responses not compressed for no good reason!*
  for SSL even worse
no request compression
no header compression
 * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
Headers
 Redundant
 Repeat on EVERY request/response
 Can’t compress


 User-agent
 Cookies
HTTP Connection - under the hood




 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT




 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT




 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT
                            Request/Response = 0.5 RTT




 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT
                            Request/Response = 0.5 RTT

                      }



 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT
                            Request/Response = 0.5 RTT

                      }
                      }


 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT
                            Request/Response = 0.5 RTT

                      }     Spun additional connections

                      }


 Client            Server
HTTP Connection - under the hood

                            TCP Connect + Request = 1.5 RTT
                            TCP Connect + SSL Connect + Request = 3.5 RTT
                            Request/Response = 0.5 RTT
                            Slow Start - 30KB ~ 4 RTT (vs. 1 RTT warm)
                            Spun additional connections




 Client            Server
“Lost” Capacity on each RTT
User Data:                                               User Data:
average bandwidth                                        average RTT
                           BW Mbps                                               RTT ms
       Global                  1.9                          Broadband              30
         US                    5.1                        Coast-to-Coast          100
   Mobile - US                 1.1                        3G device-GW           80-200
   Mobile - EU                 ~2
Source: State of the Internet, Q4 2010
http://www.akamai.com/stateoftheinternet/



                             US Broadband:                  63.7KB
                             US Mobile:                     27.5KB
                             Average obj size                8.1KB
                             Source: HTTP Archive, 6/1/2011 data for Top 1,000
                             http://httparchive.org
Security is optional




http://desktopsecuritysoftwareguide.com/wp-content/uploads/2010/04/Padlock.jpg
Enters SPDY!
Requirements
 Avoid requiring the website author to change content
  Allow for incremental changes
  Performing "better" with content changes is okay
  Performing "worse" without content changes is unacceptable


 Perform always better, never worse than HTTP

 Drop-in replacement from webapp's point of view
  Changing the web server/application server is inevitable and therefore
   acceptable
What is SPDY?
 Goal: Reduce Web Page Load time.

 Multiplexing
   Better utilize client connections
 Compression
   HTTP headers are excessive
   Uplink bandwidth is limited
 Prioritization
   Today the browser holds back
   Priorities enable multiplexing
 Encrypted & Authenticated
   Eavesdropping at the Cafe must be stopped
 Server Push
   Websites do some of this today with data URLs
Deployment Status
Deployment Status
 Google
   Enabled for all Google SSL traffic
   On by default since Chrome 6
Deployment Status
 Google
   Enabled for all Google SSL traffic
   On by default since Chrome 6
 CDNs/Service providers:
   Cotendo
Deployment Status
 Google
   Enabled for all Google SSL traffic
   On by default since Chrome 6
 CDNs/Service providers:
   Cotendo
 Server implementations:
   Strangeloop
   SPDY Proxy available
   Others: C++, Python, Ruby, Go
Deployment Status
 Google
   Enabled for all Google SSL traffic
   On by default since Chrome 6
 CDNs/Service providers:
   Cotendo
 Server implementations:
   Strangeloop
   SPDY Proxy available
   Others: C++, Python, Ruby, Go
 Client implementation
   Chrome
   Android coming...
Results
Yahoo! Homepage, over broadband network
Yahoo! homepage
 HTTP


 Broadband
 RTT = 20ms




Page Load: 1.23sec
Yahoo! homepage
 SPDY
 (via Cotendo)

 Broadband
 RTT = 20ms



Page Load: 1.21sec


       -2%
Amazon.com Homepage, over 3G network
Amazon.com Homepage
 HTTP


 3G, AT&T
 RTT = 200+ms



Page Load: 12.50sec
Amazon.com Homepage
 SPDY
 (via Cotendo)

 3G AT&T
 RTT = 200+ms



Page Load: 6.26sec


       -49%
HTTPS vs SPDY (Production)
Increasing Parallelism
Less is More - Conns, Bytes, Packets
Not Too Shabby WebSockets
 docs.google.com has a "hanging get" for every doc open
 how to scale beyond 6 connections per domain?
  docs[1-N].google.com

 gets expensive, complicated, and is horribly inefficient

 SPDY is easy, works great, efficient

 Header compression mitigates the inefficiency of a hanging GET
Can't We Address Latency & Security Separately?
Can't We Address Latency & Security Separately?



                    No.
Can't We Address Latency & Security Separately?
  If eavesdropping in the cafe is still possible in 2020 with trivial tools, we have
   failed our users.

  Security is not just for banks!
   Social/Mail/Content is a major target
   example: Comodo attack

  Firesheep tools make sniffing easy
  Major content providers want privacy
   Facebook opt-in
   Twitter opt-in
   Google working toward 100%
How we tune today
High Performance Web Sites
 1.Make fewer HTTP requests
 2.Use CDN
 3.Add expires header
 4.Gzip Components
 5.Put stylesheets at the top
 6.Put scripts at the bottom
 7.Avoid CSS expressions
 8.Make JS and CSS external
 9.Reduce DNS lookups
 10.Minify JS
 11.Avoid redirects
 12.Remove duplicate scripts
 13.Configure Etags
 14.Make Ajax cacheable
 15.Sharding domains
High Performance Web Sites
 1.Make fewer HTTP requests
 2.Use CDN
 3.Add expires header
 4.Gzip Components

                          Du
 5.Put stylesheets at the top
 6.Put scripts at the bottom e
 7.Avoid CSS expressions       To
 8.Make JS and CSS external         HT
 9.Reduce DNS lookups                 TP
 10.Minify JS
                                           Li
 11.Avoid redirects                          m
 12.Remove duplicate scripts                  ita
 13.Configure Etags                              tio
 14.Make Ajax cacheable                             ns
 15.Sharding domains                                  !
Firetruck
Domain Sharding
Domain Sharding
 Pros:
  Parallelism in HTTP
  Cookieless domains for static content
Domain Sharding
 Pros:
  Parallelism in HTTP
  Cookieless domains for static content
Domain Sharding
 Pros:
  Parallelism in HTTP
  Cookieless domains for static content


 Cons:
  DNS time
  Connection establishment overhead
    TCP slowstart / warmup
    SSL
  maintaining many connections
  user cache
  Prevents browser optimizations
Reduce number of requests
 Inlining
 Spriting
 Data URLs
 Combining javascripts and CSS files


 Cons:
   reduced cache efficiency
   Complicated
New Class of FEO
Rethink your optimizations

 As rules change, your need to re-evaluate your best practices
    13 years is a long time! start at the beginning...


 But also presents many new opportunities
    Delivery priorities
    Smart Push
    Simple web code
    Automate!
Image Compression

  Number of Requests                                       Transfer Size in KB



                 Other
                         HTML                                         Other   HTML
                  7.0
                          6.5                                          99      32

                                                                                     Scripts
                                Scripts                                               119
                                 13.0


                                                                                       Stylesheets
                                 Stylesheets
                                                                                            25
                                     3.5




        Images
                                                                     Images
          55.0
                                                                       415




                                               Source: http://httparchive.org/trends.php?s=Top1000
In mobile even stronger!

   Number of Requests                                Transfer Size in KB



              Other HTML
                2                                                      Other
                      4                                                        HTML
                                                                         6
                                                                                42

                           Scripts
                             7


                                                                                            Scripts
                           Stilesheets                                                        80
                                2
                                                            Images
     Images                                                   228
       31                                                                             Stilesheets
                                                                                           20




                                         Source: http://mobile.httparchive.org/trends.php?s=Top1000
Lossy compression is the way to go!


    Billy Hoffman / Zoompf




                                      AP Photo/John Bazemore
Lossy-Compression is
      Not for Everything



http://www.flickr.com/photos/tracy_olson/61056391/
Progressive image compression




             http://images.sixrevisions.com/2010/12/01-02_baseline_vs_progressive.jpg
Client   Server
Client              Server



         Get HTML
Client   Server
Client                     Server


         Get all objects
Client                                 Server




         20%   20%   20%   20%   20%
Client                                 Server




         80%   80%   80%   80%   80%
Summary
 SPDY actually delivers!
 SPDY actually delivers!
    but we are still in the early phases
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
    HTTP is built into the internet architecture, it can’t be changed.
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
    HTTP is built into the internet architecture, it can’t be changed.
    What’s next?
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
    HTTP is built into the internet architecture, it can’t be changed.
    What’s next?
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
    HTTP is built into the internet architecture, it can’t be changed.
    What’s next?


 Opens the door to implement new class of optimizations
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
    HTTP is built into the internet architecture, it can’t be changed.
    What’s next?


 Opens the door to implement new class of optimizations
 SPDY actually delivers!
    but we are still in the early phases
    participate and be part of the solution


 Rules CAN be broken. Changes are possible!
    HTTP is built into the internet architecture, it can’t be changed.
    What’s next?


 Opens the door to implement new class of optimizations


 Get engaged NOW!
Measurement - Proving us Right
 No 3rd party tools (yet)!


 Chrome developer tools
    not good for large scale data...


 w3c Web Performance tools - Navigation Timing
    Supported on IE9, and Chrome 11+
    http://w3c-test.org/webperf/specs/NavigationTiming/


 Site metrics:
    Google Analytics
Ido Safruti, ido@cotendo.com

Mike Belshe, mbelshe@google.com

Contenu connexe

Tendances

HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and WhyAdrian Cole
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战Jerry Qu
 
HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30Jxck Jxck
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016Daniel Stenberg
 
HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? Sigma Software
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streamingHung Thai Le
 
HTTP/2 Changes Everything
HTTP/2 Changes EverythingHTTP/2 Changes Everything
HTTP/2 Changes EverythingLori MacVittie
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 erapeychevi
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICSource Conference
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneAdrian Cole
 
Recent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyRecent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyKazuho Oku
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28Jxck Jxck
 
HTTP/3 over QUIC. All is new but still the same!
HTTP/3 over QUIC. All is new but still the same!HTTP/3 over QUIC. All is new but still the same!
HTTP/3 over QUIC. All is new but still the same!Daniel Stenberg
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1Daniel Austin
 

Tendances (20)

HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and Why
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战
 
HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30
 
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016
 
HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know?
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
HTTP/2 Changes Everything
HTTP/2 Changes EverythingHTTP/2 Changes Everything
HTTP/2 Changes Everything
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
 
HTTP/3 an early overview
HTTP/3 an early overviewHTTP/3 an early overview
HTTP/3 an early overview
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUIC
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
 
HTTP/2 Comes to Java
HTTP/2 Comes to JavaHTTP/2 Comes to Java
HTTP/2 Comes to Java
 
Recent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyRecent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using ruby
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
 
HTTP/3 over QUIC. All is new but still the same!
HTTP/3 over QUIC. All is new but still the same!HTTP/3 over QUIC. All is new but still the same!
HTTP/3 over QUIC. All is new but still the same!
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
HTTP2 is Here!
HTTP2 is Here!HTTP2 is Here!
HTTP2 is Here!
 

En vedette (8)

The Crazy Guy
The Crazy GuyThe Crazy Guy
The Crazy Guy
 
Anirudh
AnirudhAnirudh
Anirudh
 
Brown Cow's Winter
Brown Cow's WinterBrown Cow's Winter
Brown Cow's Winter
 
T Rex Services Slide Share
T Rex Services   Slide ShareT Rex Services   Slide Share
T Rex Services Slide Share
 
Fundamental Of Marketing For Orientation
Fundamental Of Marketing For OrientationFundamental Of Marketing For Orientation
Fundamental Of Marketing For Orientation
 
Final project report summer training
Final project report summer trainingFinal project report summer training
Final project report summer training
 
Strategic Reward Systems I
Strategic Reward Systems IStrategic Reward Systems I
Strategic Reward Systems I
 
Brands Of Hul
Brands Of HulBrands Of Hul
Brands Of Hul
 

Similaire à Improving performance by changing the rules from fast to SPDY

PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environment
PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environmentPLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environment
PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environmentPROIDEA
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocolsDaniel Austin
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebSteffen Gebert
 
Jetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet ContainerJetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet ContainerCodemotion
 
Meetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceMeetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceJean Tunis
 
HTTP/3 is next generation HTTP
HTTP/3 is next generation HTTPHTTP/3 is next generation HTTP
HTTP/3 is next generation HTTPDaniel Stenberg
 
HTTP/2 and a Faster Web
HTTP/2 and a Faster WebHTTP/2 and a Faster Web
HTTP/2 and a Faster WebC4Media
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)NYversity
 
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Holger Bartel
 
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone BordetHTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone BordetCodemotion
 
Http2 protocol changes
Http2 protocol changesHttp2 protocol changes
Http2 protocol changesMark Friedman
 
HTTP at your local BigCo
HTTP at your local BigCoHTTP at your local BigCo
HTTP at your local BigCopgriess
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfRicky Garg
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser NetwrokingShuya Osaki
 

Similaire à Improving performance by changing the rules from fast to SPDY (20)

PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environment
PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environmentPLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environment
PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environment
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
 
Jetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet ContainerJetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet Container
 
Http/2
Http/2Http/2
Http/2
 
SPDY
SPDYSPDY
SPDY
 
SPDY
SPDY SPDY
SPDY
 
Meetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceMeetup Tech Talk on Web Performance
Meetup Tech Talk on Web Performance
 
Websites Performance Highlights
Websites Performance HighlightsWebsites Performance Highlights
Websites Performance Highlights
 
HTTP/3 is next generation HTTP
HTTP/3 is next generation HTTPHTTP/3 is next generation HTTP
HTTP/3 is next generation HTTP
 
HTTP/2 and a Faster Web
HTTP/2 and a Faster WebHTTP/2 and a Faster Web
HTTP/2 and a Faster Web
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
 
HTTP/3 for everyone
HTTP/3 for everyoneHTTP/3 for everyone
HTTP/3 for everyone
 
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone BordetHTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
HTTP, WebSocket, SPDY: evoluzione dei protocolli web by Simone Bordet
 
Http2 protocol changes
Http2 protocol changesHttp2 protocol changes
Http2 protocol changes
 
HTTP at your local BigCo
HTTP at your local BigCoHTTP at your local BigCo
HTTP at your local BigCo
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
 
Http2
Http2Http2
Http2
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
 

Dernier

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Dernier (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Improving performance by changing the rules from fast to SPDY

  • 1. From Fast to SPDY Ido Safruti, Mike Belshe,
  • 4. Agenda  Challenges of HTTP/1.1  SPDY  Some data, and results  How we tune today  What’s next
  • 5. rfc2616: HTTP/1.1 drafted:1998 released June 1999
  • 6. What else was there in 1998
  • 7. What else was there in 1998
  • 8. What else was there in 1998
  • 9. What else was there in 1998
  • 10. What else was there in 1998
  • 11. What else was there in 1998
  • 12. What else was there in 1998 http://web.archive.org/web/19980425182703/http://geocities.com/
  • 13. What else was there in 1998 4/25/1998 no external scripts or css files 20 images, ~65KB entire page http://web.archive.org/web/19980425182703/http://geocities.com/
  • 14. Did They Plan for That!?
  • 15. HTTP/1.1  Compression  Headers  Poor connection management  Only one request can be done at a time (Half duplex)  Particularly important on high latency links (mobile)  short lived connections  security - optional
  • 17. Compression Optional Only for response body ~99% of browsers support * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
  • 18. Compression Optional Only for response body ~99% of browsers support Particularly important on small pipes (mobile) * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
  • 19. Compression Optional Only for response body ~99% of browsers support Particularly important on small pipes (mobile) 15%-30% of responses not compressed for no good reason!* for SSL even worse * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
  • 20. Compression Optional Only for response body ~99% of browsers support Particularly important on small pipes (mobile) 15%-30% of responses not compressed for no good reason!* for SSL even worse no request compression * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
  • 21. Compression Optional Only for response body ~99% of browsers support Particularly important on small pipes (mobile) 15%-30% of responses not compressed for no good reason!* for SSL even worse no request compression no header compression * http://code.google.com/speed/articles/web-metrics.html + Cotendo measurements
  • 22. Headers  Redundant  Repeat on EVERY request/response  Can’t compress  User-agent  Cookies
  • 23. HTTP Connection - under the hood Client Server
  • 24. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Client Server
  • 25. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Client Server
  • 26. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Request/Response = 0.5 RTT Client Server
  • 27. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Request/Response = 0.5 RTT } Client Server
  • 28. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Request/Response = 0.5 RTT } } Client Server
  • 29. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Request/Response = 0.5 RTT } Spun additional connections } Client Server
  • 30. HTTP Connection - under the hood TCP Connect + Request = 1.5 RTT TCP Connect + SSL Connect + Request = 3.5 RTT Request/Response = 0.5 RTT Slow Start - 30KB ~ 4 RTT (vs. 1 RTT warm) Spun additional connections Client Server
  • 31. “Lost” Capacity on each RTT User Data: User Data: average bandwidth average RTT BW Mbps RTT ms Global 1.9 Broadband 30 US 5.1 Coast-to-Coast 100 Mobile - US 1.1 3G device-GW 80-200 Mobile - EU ~2 Source: State of the Internet, Q4 2010 http://www.akamai.com/stateoftheinternet/ US Broadband: 63.7KB US Mobile: 27.5KB Average obj size 8.1KB Source: HTTP Archive, 6/1/2011 data for Top 1,000 http://httparchive.org
  • 34. Requirements  Avoid requiring the website author to change content Allow for incremental changes Performing "better" with content changes is okay Performing "worse" without content changes is unacceptable  Perform always better, never worse than HTTP  Drop-in replacement from webapp's point of view  Changing the web server/application server is inevitable and therefore acceptable
  • 35. What is SPDY?  Goal: Reduce Web Page Load time.  Multiplexing  Better utilize client connections  Compression  HTTP headers are excessive  Uplink bandwidth is limited  Prioritization  Today the browser holds back  Priorities enable multiplexing  Encrypted & Authenticated  Eavesdropping at the Cafe must be stopped  Server Push  Websites do some of this today with data URLs
  • 37. Deployment Status  Google  Enabled for all Google SSL traffic  On by default since Chrome 6
  • 38. Deployment Status  Google  Enabled for all Google SSL traffic  On by default since Chrome 6  CDNs/Service providers:  Cotendo
  • 39. Deployment Status  Google  Enabled for all Google SSL traffic  On by default since Chrome 6  CDNs/Service providers:  Cotendo  Server implementations:  Strangeloop  SPDY Proxy available  Others: C++, Python, Ruby, Go
  • 40. Deployment Status  Google  Enabled for all Google SSL traffic  On by default since Chrome 6  CDNs/Service providers:  Cotendo  Server implementations:  Strangeloop  SPDY Proxy available  Others: C++, Python, Ruby, Go  Client implementation  Chrome  Android coming...
  • 42. Yahoo! Homepage, over broadband network
  • 43. Yahoo! homepage HTTP Broadband RTT = 20ms Page Load: 1.23sec
  • 44. Yahoo! homepage SPDY (via Cotendo) Broadband RTT = 20ms Page Load: 1.21sec -2%
  • 46. Amazon.com Homepage HTTP 3G, AT&T RTT = 200+ms Page Load: 12.50sec
  • 47. Amazon.com Homepage SPDY (via Cotendo) 3G AT&T RTT = 200+ms Page Load: 6.26sec -49%
  • 48. HTTPS vs SPDY (Production)
  • 50. Less is More - Conns, Bytes, Packets
  • 51. Not Too Shabby WebSockets  docs.google.com has a "hanging get" for every doc open  how to scale beyond 6 connections per domain?  docs[1-N].google.com  gets expensive, complicated, and is horribly inefficient  SPDY is easy, works great, efficient  Header compression mitigates the inefficiency of a hanging GET
  • 52. Can't We Address Latency & Security Separately?
  • 53. Can't We Address Latency & Security Separately? No.
  • 54. Can't We Address Latency & Security Separately?  If eavesdropping in the cafe is still possible in 2020 with trivial tools, we have failed our users.  Security is not just for banks!  Social/Mail/Content is a major target  example: Comodo attack  Firesheep tools make sniffing easy  Major content providers want privacy  Facebook opt-in  Twitter opt-in  Google working toward 100%
  • 55. How we tune today
  • 56. High Performance Web Sites 1.Make fewer HTTP requests 2.Use CDN 3.Add expires header 4.Gzip Components 5.Put stylesheets at the top 6.Put scripts at the bottom 7.Avoid CSS expressions 8.Make JS and CSS external 9.Reduce DNS lookups 10.Minify JS 11.Avoid redirects 12.Remove duplicate scripts 13.Configure Etags 14.Make Ajax cacheable 15.Sharding domains
  • 57. High Performance Web Sites 1.Make fewer HTTP requests 2.Use CDN 3.Add expires header 4.Gzip Components Du 5.Put stylesheets at the top 6.Put scripts at the bottom e 7.Avoid CSS expressions To 8.Make JS and CSS external HT 9.Reduce DNS lookups TP 10.Minify JS Li 11.Avoid redirects m 12.Remove duplicate scripts ita 13.Configure Etags tio 14.Make Ajax cacheable ns 15.Sharding domains !
  • 60. Domain Sharding  Pros:  Parallelism in HTTP  Cookieless domains for static content
  • 61. Domain Sharding  Pros:  Parallelism in HTTP  Cookieless domains for static content
  • 62. Domain Sharding  Pros:  Parallelism in HTTP  Cookieless domains for static content  Cons:  DNS time  Connection establishment overhead  TCP slowstart / warmup  SSL  maintaining many connections  user cache  Prevents browser optimizations
  • 63. Reduce number of requests  Inlining  Spriting  Data URLs  Combining javascripts and CSS files  Cons:  reduced cache efficiency  Complicated
  • 65. Rethink your optimizations  As rules change, your need to re-evaluate your best practices  13 years is a long time! start at the beginning...  But also presents many new opportunities  Delivery priorities  Smart Push  Simple web code  Automate!
  • 66. Image Compression Number of Requests Transfer Size in KB Other HTML Other HTML 7.0 6.5 99 32 Scripts Scripts 119 13.0 Stylesheets Stylesheets 25 3.5 Images Images 55.0 415 Source: http://httparchive.org/trends.php?s=Top1000
  • 67. In mobile even stronger! Number of Requests Transfer Size in KB Other HTML 2 Other 4 HTML 6 42 Scripts 7 Scripts Stilesheets 80 2 Images Images 228 31 Stilesheets 20 Source: http://mobile.httparchive.org/trends.php?s=Top1000
  • 68. Lossy compression is the way to go! Billy Hoffman / Zoompf AP Photo/John Bazemore
  • 69. Lossy-Compression is Not for Everything http://www.flickr.com/photos/tracy_olson/61056391/
  • 70. Progressive image compression http://images.sixrevisions.com/2010/12/01-02_baseline_vs_progressive.jpg
  • 71. Client Server
  • 72. Client Server Get HTML
  • 73. Client Server
  • 74. Client Server Get all objects
  • 75. Client Server 20% 20% 20% 20% 20%
  • 76. Client Server 80% 80% 80% 80% 80%
  • 77.
  • 78.
  • 80.
  • 81.  SPDY actually delivers!
  • 82.  SPDY actually delivers!  but we are still in the early phases
  • 83.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution
  • 84.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution
  • 85.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!
  • 86.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!  HTTP is built into the internet architecture, it can’t be changed.
  • 87.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!  HTTP is built into the internet architecture, it can’t be changed.  What’s next?
  • 88.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!  HTTP is built into the internet architecture, it can’t be changed.  What’s next?
  • 89.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!  HTTP is built into the internet architecture, it can’t be changed.  What’s next?  Opens the door to implement new class of optimizations
  • 90.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!  HTTP is built into the internet architecture, it can’t be changed.  What’s next?  Opens the door to implement new class of optimizations
  • 91.  SPDY actually delivers!  but we are still in the early phases  participate and be part of the solution  Rules CAN be broken. Changes are possible!  HTTP is built into the internet architecture, it can’t be changed.  What’s next?  Opens the door to implement new class of optimizations  Get engaged NOW!
  • 92. Measurement - Proving us Right  No 3rd party tools (yet)!  Chrome developer tools  not good for large scale data...  w3c Web Performance tools - Navigation Timing  Supported on IE9, and Chrome 11+  http://w3c-test.org/webperf/specs/NavigationTiming/  Site metrics:  Google Analytics
  • 93. Ido Safruti, ido@cotendo.com Mike Belshe, mbelshe@google.com