SPDY
Upcoming SlideShare
Loading in...5
×
 

SPDY

on

  • 2,856 views

The SPDY protocol has been developed by Google since 2009. It is intended as an evolution of HTTP with better performance and network utilization.

The SPDY protocol has been developed by Google since 2009. It is intended as an evolution of HTTP with better performance and network utilization.

Statistics

Views

Total Views
2,856
Views on SlideShare
2,847
Embed Views
9

Actions

Likes
10
Downloads
44
Comments
3

5 Embeds 9

http://us-w1.rockmelt.com 2
http://www.twylah.com 2
https://si0.twimg.com 2
http://www.linkedin.com 2
https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • posting the video url of this presentation http://vimeo.com/44244522
    Are you sure you want to
    Your message goes here
    Processing…
  • very very very good explanation
    Are you sure you want to
    Your message goes here
    Processing…
  • Nice elaboration of SPDY
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SPDY SPDY Presentation Transcript

    • Andreas Bjärlestam 2012-05-30
    • SPDY quick overview• An evolution of HTTP• Developed by Google since 2009• Openly available spec
    • Why the hell would you want to replace HTTP?
    • HTTP is fantasticit has totally changed the world
    • but…
    • HTTP is over 20 years oldHTTP 1.1 is 12 years old
    • Webpages in 1999
    • Webpages in 2012
    • Mobile internet usagesource: svenskarnaoch internet 2011 https://www.iis.se/docs/SOI2011.pdf
    • This is how more and more of us consume the web…
    • Often it feels a lot like…
    • People no longer have patience to wait for slow pages
    • Web pages February 2012• www.facebook.com - ca 100 http requests• www.bostonglobe.com - ca 100 http requests• www.svtplay.se - ca 90 http requests• www.aftonbladet.se - ca 350 http requests source: http://httparchive.org/
    • What does it look like over thenetwork fetching 100 resources?
    • Can you spot the problem?
    • Its all synchronous
    • How come an advanced page like facebook.com loads in under 4seconds when its all synchronous?
    • Hacky optimizations CSS spritesbase64 images in data-urls CSS concatenation JavaScript concatenation
    • 6 x HTTP connections HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP
    • Domain sharding• www.bostonglobe.com - 59 connections• www.svtplay.se - 22 connections• www.aftonbladet.se - 118 connections source: http://www.webpagetest.org
    • What is the problem with this? Why not even more?
    • We kind of abuse TCPwhen we open more connections
    • 2 connections per host recommended by HTTP 1.1 spec 6 connections in most browsers
    • and…
    • New TCP connections are slow
    • 3 way handshake
    • On my macbook Ping 20ms ≈ 30ms to set up a connection On my mobile (3G)Ping 300ms ≈ 450ms to set up a connection
    • TCP Slow start HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP
    • Bandwidth doesn’t matter much anymore Latency does
    • So… we need to utilize our TCP connections better
    • Enter
    • Don’t we break the web if we replace HTTP?
    • Nope
    • The semantics of HTTP is kept
    • HTTP -> SPDY GET GET PUT PUT HEADERS HEADERS POST POST … …Use of URLs Use of TCP Use of URLs Use of TCP
    • You can switch to SPDY with nochanges to your web application
    • SPDY runs over TCP and will not require upgraded network equipment
    • Example…
    • Designed with speed as primary goal
    • 1 TCP connection HTTP/TCP
    • But it will be on fire! HTTP/TCP
    • SPDY is multiplexed
    • This is a typical HTTP session GET 200 OK GET 200 OK GET 200 OK
    • Multiplexing GET 1 GET 2 GET 3 200 OK 2 200 OK 3 200 OK 1
    • Stream priorities
    • SPDY is binary
    • Will be difficult to just fire up telnet and hack away
    • Every decent site will be encrypted and gzipped anyways
    • ✗TLS/SSL is mandatory
    • Communication should be secure by defaultUsers should not have to care
    • Headers are compressed
    • Server Push
    • Server Push
    • So is it worth it?
    • Google tested 25 of the “top 100” sites
    • Average speedup 39% - 55%
    • SPDY could make your life easierLess need for hacky optimizations like CSS sprites, fileconcatenations, domain sharding etc
    • Should I add SPDY support to my servers on Monday?
    • Probably not…
    • Implementations• Apache mod_spdy• Nginx – in roadmap• node_spdy – requires node.js 0.7• Netty• Jetty• more…
    • Browsers• Chrome (since version 6)• Firefox (since version 11, turned off by default)• Amazon silk
    • Others• Strangeloop• Akamai (Contendo)• F5 BIG-IP
    • Google• Support SPDY on most of their services• 90% of their SSL traffic is over SPDY
    • Amazon silk Silk SPDY SPDY HTTP TheBrowser Gateway Internet
    • The spec• Draft spec, version 4• IETF HTTPbis WG has started to work on HTTP2.0• SPDY has been submitted as input to HTTP2.0
    • Roundup• ~ 50% Faster page loads than HTTP• Backwards compatible with HTTP• Better utilization of TCP• Secured by default• Binary + compressed• Will likely be the base for HTTP2.0
    • Attributions• http://en.wikipedia.org/wiki/File:US_Robotics_56K_M odem_Front.JPG• https://www.iis.se/docs/SOI2011.pdf• http://www.flickr.com/photos/howi/6366423373/• http://www.flickr.com/photos/wwarby/5110037138/• http://www.flickr.com/photos/alicetragedy/497729529 8/• http://www.flickr.com/photos/koltregaskes/624914973 /in/photostream/
    • Backup slides
    • Alternatives
    • HTTP Pipelining• Not as effective as multiplexing• Hard to implement in browser• Opera is the only desktop browser that has a full implementation enabled by default• Android, IOS5 and Opera mobile browsers do some amount of pipelining• Not used by most proxies
    • Synchronous Pipelining Multiplexing GET GET 1 GET 1 GET 2 GET 2 200 OK GET 3 GET 3 GET 200 OK 200 OK 1 200 OK 2 GET 200 OK 2 200 OK 3 200 OK 3 200 OK 1 200 OK