Suppose I have two Debian 5.0 servers and a generic session-based DB-driven website is running on them. Assume that the two DB instances are already clustered.

Each server has its own internal IP address and Load balancing is achieved by putting a Load Balancer in front of the servers (the load balancer listens on the one public IP address assigned to the website).

Now, is there a way to get rid of the load balancer and obtain the same results (with the added benefit of removing the single point of failure) by means of clever network setup (e.g.: logical IP address setup) and the tools that Debian offers ?

If yes, how can that be done ? Scripts, examples, whatever can aid me in getting there are added bonuses :)

EDIT: More specifically, I am looking at something similar to what Windows NLB provides.


To remove the single point of failure, you can do one of the following:

1- Remove the load balancer entirely and configure the servers to work in active-passive mode. You can use heartbeat package for Linux to do it. In this case, you lose the processing power of one machine and use only one as a fail-over!

2- Install and configure another load balancer. The two load balancers will work in active-passive mode. Also, heartbeat can be configured on both servers (I am assuming Linux-based load balancers). This is a bit more expensive as it requires a new system.

3- Install the two load balancers on the same debian systems. So, you don't need to install a new system. However, this may not be recommended as it complicates the systems and mixes more services on the same server (the server already works as web server and DB server).

  • Ops, damn enter-submits-the message. Well, I wanted to add that I considered 1 and 2 and would rule them out to keep the load balancing and to avoid further expenses respectively. I'm much interested in #3. How can that be done in terms of network setup considering the single IP address ? – Sergio Nov 19 '10 at 12:38
  • Install the load balacing software on both servers, both load balance software capable of load balance to the other debian server. Let LB software listen to all interfaces, and use heartbeat to share a logical IP. That way you can utilize both servers, sharing IP, and have redundancy. – 3molo Nov 19 '10 at 14:53
  • @3molo: thanks there. If you put that in an answer, possibly indicating a specific LB software and/or scripts/examples/links on how to install and configure it I'll be more than glad to upvote and mark the answer as correct :) – Sergio Nov 19 '10 at 17:38

You can also use Wackamole to distribute IP addresses between the cluster machines, and it will redistribute the IPs in case of failure.

Here's an example

  • That's a very straightforward and interesting approach but it does not handle proper load balancing as it relies on DNS Round Robin which has several drawbacks (see also answer by Marco Ramos to the question I mentioned in my, well, self-answer). Still I think this really adds value to this question and deserves an upvote (which I cannot cast ... new user ... reputation score too low to do that :( – Sergio Nov 19 '10 at 20:48
  • +1 for Wackamole, which is a very simple to implement and straightforward solution. – Marco Ramos Apr 22 '11 at 18:32

Ok, after some very helpful tips from Khaled and 3molo and the answer by Marco Ramos to this other question I did some further research and found this article which pretty much answers my question, complete with scripts and examples.


The article considers installing the LBs on specific servers, but installing them on the same servers where the website is running, as Khaled and 3molo suggest, should do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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