Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question

migrated from Mar 13 '10 at 20:21

This question came from our site for professional and enthusiast programmers.

If you're not aware of the benefits, you probably don't need it. Also, it's probably a question more suited for – deceze Mar 13 '10 at 5:12
@deceze - I read afew article about it and why to use or not to use of balance computing - but I'm really confused and want to know more. – Nasser Hadjloo Mar 13 '10 at 5:35
You use multiple servers, and therefore load balancers, if one server isn't enough to handle the traffic that's coming your way (or secondarily for redundancy/backup purposes). You also need to be running your own servers, you can't really set this up using [your generic hosting company]. If you don't find yourself in this situation, you probably don't need to worry about it. :) – deceze Mar 13 '10 at 5:59
@deceze, Thanks alot , but this is why I'm confuse. base on this approach most of the big sites like Google, facebook, twitter or etc, have to use this approach (something like web farm) but why they don't do this ? – Nasser Hadjloo Mar 13 '10 at 6:03
I think there's a pretty good answer in that previous question of yours that scratches the surface of a few pros and cons of both load balancing solutions. If you want to know how to set up a system like this, ServerFault is a better place to ask. If you're interested in more pros and cons from a developer point of view, I'd suggest you edit the question to go more in that direction. – deceze Mar 13 '10 at 8:44

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:

SOFU Network Diagram

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.

share|improve this answer

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. "" 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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.