The document summarizes the evolution of HTTP from versions 0.9 to 2.0. It outlines the limitations of HTTP/1.1 for modern web pages with many dependent resources. HTTP/2 aims to address these limitations through features like multiplexing, header compression, server push and priority to reduce latency. It discusses implementations of HTTP/2 and the impact on developers. The document also briefly mentions upcoming protocols like QUIC that build on HTTP/2 to further optimize performance.
HTTP/2 is here! Why the web needs it and its impact
1. HTTP/2 is here!
And why the web needs it
Nilesh Naik
Tata Consultancy Services
2. • How we got there
• Limitations of HTTP/1.1
• What’s new in HTTP/2
• Best practices of today are anti-patterns in
HTTP/2
• Impact on developer community
• Current implementations
• What’s next
What’s in here -
3. The web has changed significantly since then
1991
HTTP/0.9
1996
HTTP/1.0
1999
HTTP/1.1
2015
HTTP/2
HTTP Timeline
2009
SPDY
15. And yes, every TCP connection is closed with a 3-way
connection too!
Open connection: 3-way handshake
SYN
x= rand()
SYN ACK
X+1 y= rand()
ACK
x+1 y+1
Application
Data
0 ms
28 ms
56 ms
84 ms
16. More resource intensive than ever before
HTTP 1.1 was not built to handle that kind of load
HTTP 1.1 does not use TCP optimally
800K
Transfer size
2300K
Transfer size
80 Objects
100 Objects
In the last 4 years..
20. Spriting - Contd.
Makes development harder
Impacts caching
Every change would require a fresh download
Larger files takes longer to download and display on browser
24. Larger files to download
and parse
Whole bundle is invalidated
if a single file changes
Concatenation – contd.
Too much data when only a little is needed
Too much to reload when a change is needed
Annoyance for developers
Impacts caching
26. Domain sharding – contd.
Sites use many host names to allow more connection
27. Domain sharding on Single Server
domain.com/index.html
images.domain.com/image.png
styles.domain.com/styles.css
28. Domain sharding – bbc.co.uk
www.bbc.co.uk
static.bbc.co.uk
nav.files.bbci.co.uk
homepage.files.bbci.co.uk
Still suffers from head of blocking
Every new connection takes up resources
Every new host needs a name lookup
*http://yslow.org/
29. Useful, but are really just Band-aids
Annoying for the developers
Adds a layer of tools
Hampers caching
Downloads too much
Hacks
30. Ideal Protocol Interaction
Send minimal data to the server
Download minimal data needed
Extra data -> more time to transfer, adds latency (especially on mobile networks)
44. Header Compression
Unnecessary metadata (headers) add up
quickly
100+ requests, with few KB of headers ->
hundreds of KB’s!
Bytes are slow and expensive to transfer
51. Server push
Similar to Inlining
Resources pushed directly to client’s cache
Opportunity for servers to become smarter
– Don’t push on every request
– Push based upon observed traffic pattern
Browser can
reject push
76. QUIC
Runs on top of UDP
Goodness of SPDY and HTTP/2
No head of line blocking in QUIC!
QUIC TCP + TLS
New connection 100 ms
Repeat connnection 0 ms RTT
New connection 300 ms
Repeat connection 200 ms RTT