-
07 February 2010, 16:17
Domain Sharding
If you're a web devloper in any capacity, than you are probably always looking for a way to further optimization your site(s). One way to do this is with domain sharding.
Browsers will only allow less than 6 open connections to any domain. The number of allowable active connections is different with each browser, and it even differs between versions of those browsers. Therefore, if you have a lot of CSS or JavaScript, then you might be using up all of the allowed connections. I know this happened when I was working on a Rich Internet Application (RIA) at one of my previous jobs. Some scripts might even load others behind the scenes (Scriptaculous), increasing the number of open connections, leaving other files waiting their turn.
Waiting their turn... That's increasing your page load time. The title of this post is the answer. You need to increase the number of domains you have. I'm not telling you to go out and buy more domains. Instead, you can just add subdomains, sharding your domain.
http://sample.example.comis not the same ashttp://example.com. You have just doubled the amount of open connections! This can be done with only one server, with some simple adjustments to your DNS. Now, obviously, your server will be hit with more requests at once from the same client.