Some of the web sites started with www2 or www3 (www[n]) which is because balancing computing mentioned here at Stackoverflow )
I want to know how to do this ? and also has it any benefit or not ?
|
Some of the web sites started with www2 or www3 (www[n]) which is because balancing computing mentioned here at Stackoverflow ) I want to know how to do this ? and also has it any benefit or not ? |
|||||||||||
|
|
There are much better ways of doing load balancing than conusing your users with www1 www2 www3 these days. You need it when the amount of traffic that your website generates becomes overloaded for just one single server. Did you know that StackOverflow, ServerFault and SuperUser are served by 6 different web servers:
But you don't see any www1 or www2 here (actually, you don't see any WWW at all, but that's another topic alltogether). That's because they use an awesome piece of software called haproxy, which makes this load balancing invisible to the user. You can use policies like Round Robin, which send every next visitor to a different web server, which ensures a fairly balanced load over all your servers, but websites that are not designed to be load balanced generally need to keep each individual user on the same server, so every time you go back you hit the same server. This can be done by lots of methods (cookies, IP hashes, etc) and can get quite complex. |
|||
|
|
|
I don't see this much anymore (www2 etc). Most big companies have server presence in multiple data centers, and then use geographic DNS to route your request for e.g. "google.com" to the nearest data center to you, so the experience is as fast as possible. The www2 method doesn't route you to a different data center necessarily, just to a different web server. I think this was probably used a lot more before load balancers were more affordable. These days you don't need to do anything like that, just put as many web servers as you need behind a load balancer and all requests can go to 'www' but still talk to multiple servers behind the scenes. |
|||
|
|
|
The www(n) approach isn't used much for load balancing these days. It can, however, be used to speed up page loading speeds by downloading static assets like images, CSS, and JavaScript in parallel. |
|||
|
|