Judging the benefits of HTTP2
In making the switch to HTTP2 I noticed a (possible) improvement in performance. Alan Murray asked the question of how much of the improvement is due to the binary format and how much was due to multiplexing.
Binary format
With a single request there's not going to be an effect from multiplexing but there is a difference in the amount of data transferred:
HTTP1.1 | HTTP2 | |
---|---|---|
Uncompressed size | 34.6KB | 34.6KB |
Bytes transferred | 28.2KB | 21.4KB |
As there were no other changes made to the server configuration it seems reasonable to say that the binary format has reduced the transferred size by 7.4KB.
Multiplexing
Looking at the waterfall diagrams the effect of multiplexing is very obvious, the subsequent requests for assets are being made simultaneously with the initial request finishing and there's no connection set-up overhead.
HTTP1.1 Waterfall
HTTP2 Waterfall
The difference also shows on the connection view where there is only one connection to the server and it's being used for all the resources.
HTTP1.1 Connection View
HTTP2 Connection View
Whilst this won't have affected the TTFB that I was measuring and the way this site is constructed these subsequent requests are non-blocking in terms of rendering, on a page that does have render blocking assets there should be a more noticeable effect on perceived performance from HTTP2 multiplexing.
Want some more help with optimising your web performance? Get in touch.