Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SPDY or maybe HTTP2.0
Search
Andreas Bjärlestam
February 23, 2012
Technology
4
61
SPDY or maybe HTTP2.0
An introduction to the SPDY protocol
Andreas Bjärlestam
February 23, 2012
Tweet
Share
More Decks by Andreas Bjärlestam
See All by Andreas Bjärlestam
Climate compensate with a pull request
bjarlestam
0
31
Agile performance testing
bjarlestam
0
110
SPDY and HTTP2
bjarlestam
1
1.2k
jquery mobile
bjarlestam
0
69
Devise - taking care of your users
bjarlestam
0
71
REST with JAX-RS
bjarlestam
1
89
REST
bjarlestam
2
170
Other Decks in Technology
See All in Technology
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
540
Witchcraft for Memory
pocke
1
310
SalesforceArchitectGroupOsaka#20_CNX'25_Report
atomica7sei
0
170
Кто отправит outbox? Валентин Удальцов, автор канала Пых
lamodatech
0
340
Github Copilot エージェントモードで試してみた
ochtum
0
100
Prox Industries株式会社 会社紹介資料
proxindustries
0
290
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
230
登壇ネタの見つけ方 / How to find talk topics
pinkumohikan
5
440
AIのAIによるAIのための出力評価と改善
chocoyama
2
550
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
630
AIエージェント最前線! Amazon Bedrock、Amazon Q、そしてMCPを使いこなそう
minorun365
PRO
14
5.1k
Tech-Verse 2025 Keynote
lycorptech_jp
PRO
0
110
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
We Have a Design System, Now What?
morganepeng
53
7.7k
The Language of Interfaces
destraynor
158
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Designing for humans not robots
tammielis
253
25k
Rails Girls Zürich Keynote
gr2m
94
14k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Transcript
Or maybe HTTP2.0 [SPeeDY] Andreas Bjärlestam! 2012-02-23!
SPDY quick overview • An evolu?on of HTTP
• Developed by Google since 2009 • Proprietary • But open
Why the hell would you want to replace HTTP?
HTTP is fantas?c it has totally changed the world
but…
HTTP 1.1 is 12 years old
Webpages in 1999
None
Webpages in 2012
None
Mobile internet usage source: svenskarna och internet 2011
hPps://www.iis.se/docs/SOI2011.pdf
This is how more and more of us consume
the web…
OSen it feels a lot like…
People no longer have pa?ence to wait for slow
pages
Web pages February 2012 • www.facebook.com -‐ ca 100
hPp requests • www.bostonglobe.com -‐ ca 100 hPp requests • www.svtplay.se -‐ ca 90 hPp requests • www.aSonbladet.se -‐ ca 350 hPp requests source: hPp://hPparchive.org/
What does it look like over the network fetching
100 resources?
None
Can you spot the problem?
Its all synchronous
How come an advanced page like facebook.com loads in
under 4 seconds when its all synchronous?
Hacky op?miza?ons CSS sprites base64 images in data-‐urls
CSS concatena?on JavaScript concatena?on
HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP
HTTP/TCP 6 x HTTP connec?ons
What is the problem with this? Why not even
more?
TCP Conges?on control
Maximize throughput and Share network equally among
sessions
2 connec?ons per host recommended by HTTP 1.1 spec
6 connec?ons in most browsers
Domain sharding • www.bostonglobe.com -‐ 59 connec?ons •
www.svtplay.se -‐ 22 connec?ons • www.aSonbladet.se -‐ 118 connec?ons source: hPp://www.webpagetest.org
We kind of abuse TCP when we open more
connec?ons
and…
New TCP connec?ons are slow
3 way handshake
On my macbook Ping 20ms ≈ 30ms to set
up a connec?on On my mobile (3G) Ping 300ms ≈ 450ms to set up a connec?on
HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP HTTP/TCP
TCP Slow start HTTP/TCP
It turns out that page load ?me for a moderately
complex site is almost no faster over 20mbits/ sec than over 2mbits/sec
So… we need to u?lize our TCP connec?ons bePer
Enter
Don’t we break the web if we replace HTTP?
Nope
The seman?cs of HTTP is kept
Spdy implements HPpApi
You can switch to SPDY with no changes to
your web applica?on
HTTP -‐> SPDY GET PUT POST
… HEADERS Use of URIs Use of TCP GET PUT POST … HEADERS Use of URIs Use of TCP
SPDY runs over TCP and will not require upgraded
network equipment
HTTP -‐> SPDY TCP/IP TLS/SSL HTTP
TCP/IP TLS/SSL SPDY HTTP
Designed with speed as primary goal
1 TCP connec?on HTTP/TCP
HTTP/TCP But it will be on fire!
SPDY is mul?plexed
This is a typical HTTP session GET GET
GET 200 OK 200 OK 200 OK
Mul?plexing GET 1 GET 2 GET 3
200 OK 2 200 OK 3 200 OK 1
Stream priori?es
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
Communica?on should be secure by default Users
should not have to care
None
Using SSL ensures that communica?on over exis?ng proxies
is not broken
..but you will not be able to use proxies
for caching etc
Headers are compressed
A SPDY conversa?on
How will the client know that it can use
SPDY towards a server?
NPN TLS Next Protocol Nego?a?on
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 easier • Less important
to concatenate JavaScripts • Less important to concatenate CSS files • Less need for CSS sprites • No need for domain sharding
Should I add SPDY support to my servers on
Monday?
Probably not…
Implementa?ons • mod_spdy • Nginx – in roadmap
• node_spdy – with special openssl build etc • express_spdy – with node 0.7 etc • nePy • more…
Browsers • Chrome (since version 6) • Firefox
11 (turned off by default) • (Amazon silk)
CDNs • Strangeloop • Contendo
CDNs SPDY Gateway Your web server
Browser
Google • Support SPDY on most of their services
• 90% of their SSL traffic is over SPDY
Amazon silk Silk Browser SPDY Gateway
The Internet SPDY HTTP
The spec • DraS spec, version 3 •
Plan is to submit it to IETF as input to HTTP2.0 • IETF HTTPbis WG chair recently proposed to start work on HTTP2.0
Cri?cism • Going over SSL means no proxies
• More difficult to debug since it is binary and compressed
Alterna?ves
HTTP Pipelining • Not as effec?ve as mul?plexing
• Hard to implement in browser • Opera is the only desktop browser that has a full implementa?on enabled by default • Android, IOS5 and Opera mobile browsers do some amount of pipelining • Not used by most proxies
Pipelining GET 1 GET 2 GET 3
200 OK 1 200 OK 2 200 OK 3 GET 1 GET 2 GET 3 200 OK 2 200 OK 3 200 OK 1 Mul?plexing GET GET GET 200 OK 200 OK 200 OK Synchronous
Alterna?ve transport protocols • SCTP • BEEP
Roundup • ~ 50% Faster page loads than HTTP
• Backwards compa?ble with HTTP • BePer u?liza?on of TCP • Secured by default • Binary + compressed • Will likely be the base for HTTP2.0
APribu?ons • hPp://en.wikipedia.org/wiki/ File:US_Robo?cs_56K_Modem_Front.JPG • hPps://www.iis.se/docs/SOI2011.pdf •
hPp://www.flickr.com/photos/howi/6366423373/ • hPp://www.flickr.com/photos/wwarby/5110037138/ • hPp://www.flickr.com/photos/alicetragedy/ 4977295298/ • hPp://www.flickr.com/photos/koltregaskes/ 624914973/in/photostream/