Web Hosting Talk







View Full Version : Load Balancing


Schumie
01-15-2003, 02:29 PM
Hi guys,

I know this has been asked similarly before, but I am looking for some hardware load balancing. However, all the options I have seen so far seem to cost mega $$$.

I remember reading somewhere that a load balancing program had been written for linux (basically to enable you to have 3 x NIC's in it, 1 external, 2 to servers) but can't seem to track it down)

If anyone knows of some good solutions, please enlighten me.

Cheers,
Steve

timelord
01-15-2003, 06:41 PM
You are probably refering to Linux Virtual Server (http://linux-vs.org).

The Linux Cluster Information Center has some documentation available on the various Linux load balancing options (http://lcic.org/load_balancing.html) - you may want to see what the available options are.

ServerCorps
01-16-2003, 11:01 PM
How balanced do you need it to be? If round robin will suffice, just use the round robin feature of DNS.

Schumie
01-17-2003, 08:56 AM
Thanks timelord, thats exactly the thing i was on about.

nikko, round robin wouldn't suffice in this situation unfortunately, but thanks for the input!

dynamicnet
01-17-2003, 12:45 PM
Greetings:

DNS Round Robin:

I found http://www.tek-tips.com/gfaqs.cfm/lev2/4/lev3/31/pid/333/fid/1754 to be of interest specifically at the "Round-robin DNS" section.

It did point out the following:

=== START CLIP ===

"First, load balancing is only performed once for each client at the beginning of a session.

Second, it's possible for the load balancing scheme to get a little skewed.

For instance, all the users that have been sent to MyServer1 may go to lunch while all the users who have been sent to MyServer2 continue to send requests. In this case, one server could become overloaded while another server is sitting by idly.

Third, A more significant problem with session-based load balancing is that it exposes the IP addresses of the servers in the farm to the client-side browser.

What happens when a server crashes or is taken offline? Your balancing algorithm needs to account for this as soon as possible, but doing so can be problematic. If you're passing out bad IP addresses, your users will start to receive "server not available" errors.

In a round-robin DNS system, it still can take as long as 48 hours to fix the problem once you've discovered that one of your servers has crashed.

This is due to the fact that the changes to your IP address mappings need to be propagated to DNS servers throughout the Internet."

=== END CLIP ===

http://www.vergenet.net/linux/has/html/node10.html also does a good job at reporting the problems of DNS-based methods of load balancing:

=== START CLIP ===

1. The time to live (TTL) on the zone files needs to be turned down severely to to reduce the time for which results are cached.

The longer the TTL, the less control there is over which IP addresses that end-users are accessing. The shorter that TTL, the greater the potential for congestion on the DNS server.

2. Users may access servers using an IP address rather than a host name.

3. Users may use non-DNS methods such as an /etc/hosts file to map server host names to IP addresses.

4. An additional problem with round-robin DNS is that the DNS daemon cannot differentiate between a request for a one-off hit, and a request that will result in many hits. That is, it is hard to control the granularity of scheduling.

5. When using round-robin DNS there is no way to assign weights to servers, all servers will theoretically receive the same number of requests, regardless of their resources and current load.

=== END CLIP ===

BTW, http://www.mydomain.com/help/mydomainplus/tut-robin is an ok article on this subject.

ServerCorps
01-17-2003, 01:52 PM
Yep, those are all knowns when using round robin DNS. A few commercial DNS providers (zoneedit.com being one I have used) have a nice scheme That overcomes a few of these. They ping each a record at a supplied interval, and if the ping drops, the record is temporarily removed from dns. when the machine responds again, it is added back to the list.

They also set ttl levels lower than they tpically would be, but seem to be able to manage this pretty well.

The other factors are true limitations of round robin dns. I have always wondered what happens when your load balancer dies when you use a front end balancer. The only true solution is two machines in seperate geographic locations with a very short heartbeat between them, huh?

dynamicnet
01-17-2003, 02:02 PM
Greetings:

"I have always wondered what happens when your load balancer dies when you use a front end balancer."

You usually have two devices; one active, one passive with a hear beat monitor or the like between the two.

"They ping each a record at a supplied interval, and if the ping drops"

Ping will only detect if the device is alive, not whether a given service on the device is actually working.

While a step up, it can still spell disaster if the required service on the physical device is hung up.

Most of the load balancing hardware provides for more advanced monitoring of the servers being load balanced. I.e. it will ensure the service is up, not just the device.

Thank you.

timelord
01-17-2003, 02:20 PM
Originally posted by nikko
... I have always wondered what happens when your load balancer dies when you use a front end balancer. The only true solution is two machines in seperate geographic locations with a very short heartbeat between them, huh?

Some load balancers (such as F5) can actually be used in an "active-active" situation. That means that connection and state information is mirrored between the two machines so that if one machine fails, no connections are lost (i.e., transparent to the end user.)