views:

413

answers:

4

Hi,

From what I understand, if you have multiple web servers, then you need some kind of load balancer that will split the traffic amongst your web servers.

Does this mean that the load balancer is the main connecting point on the network? ie. the load balancer has the IP address of the domain name?

If this is the case, it makes it really easy to add new hardware since you don't have to wait for any dns propogation right?

+2  A: 

There are several solutions to this "problem". You could round-robin at the DNS-level. I.e. have www.yourdomain.com point to several IP-addresses (well all your servers).

This doesn't give you any intelligence in the load balancing, but the load will be more or less randomly distributed, but you wouldn't be resilient to hardware failures as they would still require changes to DNS.

On the other hand you could use a proxy or a loadbalancing proxy that has a single IP but then distributes the traffic to several back-end boxes. This gives you a single point of failure (the proxy, you could of course have several proxies to defeat that problem) and would also give you the added bonus of being able to use some metric to divide the load more evenly and intelligently than with just round-robin dns. This setup can also handle hardware failure in the back-end pretty seamlessly. The end user never sees the back-end, just the front-end.

There are other issues to think about as well, if your page uses sessions or other smart logic, you can run into synchronisation problems when your user (potentially) hits different servers on every access.

andy
A good load balancer will handle sessions correctly, so you shouldn't have to worry about this.
Matt Lacey
that's why I said "can run into..." not "will run into..." there's certainly quite a few lb'ers that don't explicitly support sessions (for instance hacking it by sending all requests to the same server, IMO a poor solution leading to inflexible load balancing)
andy
A: 

It does (in general). It depends on what server OS and software you are using, but in general, you'll hit the load balancer for each request, and the load balancer will then farm out the work according to the scheme you have in place (round robin, least busy, session controlled, application controlled, etc...)

ZombieSheep
A: 

andy has part of the answer, but for true load balancing and high availability you would want to use a pair of hardware load balancers like F5 bigips in an active passive configuration. Yes your domain IP would be hosted on these devices and traffic would connect firstly to those devices. Bigips offer a lot of added functionality including multiple ways of load balancing and some great url rewriting, ssl acceleration, etc. It also allows you to run your web servers on a seperate non routable address scheme and even run multiple sites on different ports with the F5's handling the translations. Once you introduce load balancing you may have some other considerations to take into account for your application(s) like sticky sessions and session state but that is a different subject

UndertheFold
A: 

so how does one go about seting all this up ?? in laymens terms ..

i have 3 servers i like to setup in a round robin way i guess..

iam runnin flash media server and i tought i wanted to do oorigin and edge setup but iam thinkin round robin for now is the way to go ??

each server is in a diff area of my city .. not same building or not same network ..

xpftp