10 ms·
Years ago, webpages loaded faster by using domain sharding. A big website I had used one domain as its primary, but images were on another domain, and there was
by bigth 5y ago
Years ago, webpages loaded faster by using domain sharding. A big website I had used one domain as its primary, but images were on another domain, and there was yet another domain for resources like css and js.
- gsich 5y agoHow is this faster? More DNS requests, more TCP connections. At first this is purely slower.
- hoppi 5y agoPretty sure in HTTP 1.1, there was a max amount of concurrent requests per server/proxy. So using different domains allowed more rq/s.
- diggan 5y agoBrowsers used to/still do max number of connections per domain. Adding more domains allows you to do more concurrent requests.
- kevin_thibedeau 5y agoWith HTTPS you have to handshake for the first connection on each domain.
- weird-eye-issue 5y agoYes and it still outweighed that especially if you were loading a lot of images or a stupid amount of different JS/CSS files
- kevingadd 5y agoMore connections = better parallelism = faster downloads The DNS is cached.
- sdflhasjd 5y agoIt spreads out the load on disks and outbound bandwidth.
- weird-eye-issue 5y agoYou are making the assumption that the domain pointed to different physical servers. To get the benefits of what everyone else is describing it does not matter what the domains actually are pointing to.
- fuzzy2 5y agoA separate domain name for static assets would not receive any cookies of the actual site. This means less data transferred and in theory a proxy closer to the user could more easily cache these requests, even for multiple clients.
- TomGullen 5y agoBefore HTTP2 this was common
- herf 5y agoUpstreams were very limited, and HTTP requests send cookie data in each GET. For instance, if you had a 128kbps DSL upstream and each request was 2KB (loaded up with cookies), you're already limited to 8 requests/second. A cookie-less domain for small resources helped this a lot.
- stjohnswarts 5y agoThat's an infrastructure problem. Sure you can solve it with domains, but you can also easily use other current technologies for it with no issues as well and never change the domain name at all.
- hinkley 5y agoNCSA was using regional DNS for load balancing in '95. I don't know who invented it but it's at least 25 years old.