Why HTTP/2 Domain Sharding Might Actually Be Hurting Your Performance

Posted by:

In the past, browsers had a limit of downloading a single request per connection. On top of that, browsers would limit the number of connections per hostname to prevent excessive load on the computers and server. This meant that for each request, the browser would need to send a request, wait for the server to reply and repeat this for every file, potentially hundreds of times.

Domain Sharding

The Solution: HTTP/2 Multiplexing


As a result, with modern browsers splitting your static content over multiple hostnames might actually be hurting performance by adding unnecessary extra steps for the client and server to spend time on. Most guides and tools have not yet been updated to reflect this and knowing this can shed some extra milliseconds off your load time. BunnyCDN already takes full use of the HTTP/2 protocol so have this in mind when optimizing your website.

Do note, however, that while all modern browsers support HTTP/2, it currently only works over HTTPS connections. If your website is still not taking advantage of the many benefits of SSL we would strongly suggest into upgrading or to stick instead to the older guides that suggest domain sharing to get the best performance.