Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

HTTP/2: What no one is telling you

HTTP/2 (or “H2” as the cool kids call it) has been ratified for months, and browsers already support or have committed to supporting the protocol. Everything we hear tells us that the new version of HTTP will provide significant performance benefits while requiring little to no change to our applications—all the problems with HTTP/1.x have seemingly been addressed; we no longer need the “hacks” that enabled us to circumvent them; and the Internet is about to be a happy place at last.

But maybe we should put the pom-poms down for a minute. Deploying HTTP/2 may not be as easy as it seems since the protocol brings with it new complications and issues. Likewise, the new features the spec introduces may not work as seamlessly as we hope. Hooman Beheshti examines HTTP/2’s core features and how they relate to real-world conditions, discussing the positives, negatives, new caveats, and practical considerations for deploying HTTP/2.

Topics include:

The single-connection model and the impact of degraded network conditions on HTTP/2 versus HTTP/1
How server push interacts (or doesn’t) with modern browser caches
What HTTP/2’s flow control mechanism means for server-to-client communication
New considerations for deploying HPACK compression
Difficulties in troubleshooting HTTP/2 communications, new tools, and new ways to use old tools

13.
Streams
• Virtual channels for communication
– Translate roughly to a request/response exchange
– Client or server can initiate or terminate
• Stream IDs:
– Client: odd; server: even; 0: reserved
– Each ID has to be larger than the ones before it initiated
by the endpoint
– Cannot be reused

78.
Trends?
• Metrics later in the page seem to get affected more
by packet loss (?)
• Lots of exceptions
– Sometimes h2 holds up even under loss conditions
– Sometimes h1 wins even when there’s no loss
• Firefox and Chrome don’t always behave the same

103.
Push during server think time
• Push assets to the browser while the server is
“thinking”
– Backend processing
– Time to deliver HTML from origin through a CDN

104.
Push during server think time
• Push assets to the browser while the server is
“thinking”
– Backend processing
– Time to deliver HTML from origin through a CDN
• https://blog.yoav.ws/being_pushy/
• This isn’t a trivial thing to do; ask your CDN
about support

106.
We still have some questions
• What do we push?
– Still unclear…
– https://docs.google.com/document/d/
1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/
edit
• What if it’s already in the browser cache?
– H2O: CASPER
– Cache Digests:
• https://tools.ietf.org/html/draft-ietf-httpbis-cache-digest-00

107.
Other use cases?
h$ps://www.facebook.com/atscaleevents/videos/1775942979345465/

129.
Summary and takeaways
• h2 is complicated, but hopefully better for us going forward
– Browser protocol?
• Not everything will be as easy/fast as we’d like
• We still have a lot of learning to do
• We need to start thinking about how to build applications to best
leverage the new protocol
• You can help!