Re:The best practices of HTTP1 are harmful in a HTTP2 world
by tootie on Tuesday March 03, 2015 @06:50PM
(#9141633)
The other thing missing is how this interacts with CDNs. Concatenating my whole site's CSS into one file isn't just to decrease round trips, it's because there's only 1 URL to cache (both CDN and client browser) for every page.
[ Parent
| on HN ]
Re:The best practices of HTTP1 are harmful in a HTTP2 world
by reissbaker on Tuesday March 03, 2015 @10:52PM
(#9142547)
That's actually harmful for cache performance. Ideally you want many small, granular caches that only expire when the specific content changes to get the highest cache hit rates: if you concatenate everything together, making changes to a single file requires redownloading the entire bundle.
(It's still faster under HTTP/1.1 to concatenate because of the overhead of making multiple HTTP requests and the parallelization limit, but one of the perf gains of HTTP2 is that since extra requests are cheap caches can be targeted and granular. Changes to a single script won't necessitate redownloading a giant concatenated bundle — you only need to download the single script that got updated.)
Re:The best practices of HTTP1 are harmful in a HTTP2 world
by swift on Wednesday March 04, 2015 @05:21AM
(#9143507)
This is 100% right. One additional point about the importance of granularity to effective cache management: if you bundle rarely accessed resources together with frequently accessed resources in the same cache entry, those rarely accessed resources are taking up space that could be used for other data. You may actually be causing cache misses and additional network traffic!
Re:The best practices of HTTP1 are harmful in a HTTP2 world
by tootie on Wednesday March 04, 2015 @10:21AM
(#9144708)
That's only true if you're updating your assets faster than your cache TTL. I suppose if you're a continuous deployment shop that deploys to prod 25 times a day, that's a concern, but not if you deploy once a month.
Re:The best practices of HTTP1 are harmful in a HTTP2 world
by swift on Wednesday March 04, 2015 @02:19PM
(#9146630)
Cache granularity absolutely matters regardless of your cache TTL, because as I mentioned in my other reply in this thread, by bundling rarely accessed and frequently accessed resources together you are pushing other frequently accessed resources out of the cache.