3 ms·
Ask HN: Any value in HTTP/2 for small sites with local users?
I am contemplating moving a few of my informational sites to HTTP/2 since the more efficient networking model appeals to me. Because of my current setup this would require some effort to do properly.
I have proxied an existing tiny fossil site of mine behind Cloudflare to try http HTTP/1.1 and https HTTP/2 access side by side and cannot see much overall difference from local access to my existing http HTTP/1.1 sites. I am using tools such as WebPageTest.org.
My sites are simple and low traffic and non-contentious (no strong need for https), and I already make an effort to keep them small and efficient.
Should I bother?
- pedalpete 10y agoIf you're already doing things like bundling any javascript, image sprites etc etc, you're probably not going to 'see' much benefit. Hence the tools aren't showing much difference. The big benefit you're going to see is if you are fetching multiple different files from the same domain. HTTP/1 would open and close a new connection for each request and had larger headers which were sent and received. HTTP/2 multiplexing allows a single TCP connection for all data from the same domain. I used it on a site which by necessity had to download (stream) 4-50 large files on many pages. With HTTP/2 multiplexing, we saw huge performance improvements, but that is a special case. It won't hurt you to use it, and I'm sure it is a good learning experience, but it isn't a necessity.
- DamonHD 10y agoThanks for that! I understand the basic issues, but as replacing the entire OS on my server would be needed to get the required underlying support, plus the pain of dealing with otherwise-unnecessary HTTPS, I'd really need some significant gain to bring that work forward, ie it would hurt me at least a little to try to do it! Some of my pages do have tens of images, some have hundreds (eg whiteboxes of thumbnails); at the moment I have pushed a little of that heavy load out to other CDNs but maybe I could bring some of it back with HTTP/2?
- DamonHD 9y agoI've since been working on this: http://www.earth.org.uk/note-on-carbon-cost-of-CDN.html http://www.earth.org.uk/note-on-carbon-cost-of-CDN.html I can see no real gain for small lightweight pages with users close by geographically, but heavier pages with >=10 objects do see a benefit IMHO, up from ~1--2 objects per connection to many times that.