HTTP/2 is now supported by 60% of the current browser market share. We should start questioning our best practices and understand a protocol that is designed to reduce our Page Load Time by 50%.
I speak about the things I like. HTTP/2 is something that we don’t speak too much about. Like, of 330 entries in Codemotion Madrid, only one is about this.
Fully multiplexed, instead of ordered and blocking · Can use one connection for parallelism · Uses header compression to reduce overhead · Allows servers to “push” responses proactively into client caches
But currently no browser supports HTTP/2 unencrypted. · As a binary protocol, this is important for backwards compatibility. · Also, it’s the right thing to do. · Only full, end-to-end encryption! · Using e.g. CloudFlare intermediate proxy with HTTP 1.1 behind will not work.
to 10Mbps results in a disappointing 5% improvement in page load times. Ilya Grigorik, Google https://www.igvita.com/2011/10/20/faster-web-vs-tcp-slow-start/
3-4 to 10 packets (2- 3x) Switch from Multiplicative Decrease and Additive Increase (AIMD) to Proportional Rate Reduction (PRR) for an extra 3-10% reduction in latency.
in plain text also with gzipped responses With HTTP/2, headers headers are compressed using HPACK SPDY was using gzip, but there were security implications (CRIME)
Fully multiplexed, instead of ordered and blocking · Allows servers to “push” responses proactively into client caches · Can use one connection for parallelism · Uses header compression to reduce overhead
an experimental protocol developed at Google in 2009 · Target: a 50% reduction in page load time by reducing latency · Gather real performance data to (in)validate the experimental protocol · It was the starting point for the HTTP/2 standard, and is now deprecated
Apache (mod_h2), NGINX alpha, Netty, Jetty, IIS 10 Others are getting there Squid Cool client libraries like OkHttp or gRPC Though probably they can only benefit from header compression
DNS names Concatenation of resources (and cache invalidation) data: URIs inlining CSS assets Sprites Delayed image loading Inlined resources in HTML But remember: only 60% of browser market share! bit.ly/http2-opt