I am looking at a number of possible options for load-balancing.

So far, I am constrained to the following options:

  • DNS server load-balancer, balancing to a cluster of tomcat servers, with terracotta for session replication. Pros - don't have to buy new kit. Cons - DNS lb can keep directing to a broken server.

  • Hardware load-balancer, direct to cluster of tomcat servers. Pros - could have second box for failover lb. Cons - expense.

  • Apache server load-balancer. Pros - apache's lb polls for broken servers. Cons - apache server is single point of failure, plus need to buy another server.

Are there any other options I should consider?


Update: Thanks for all the answers so far +1's all round. Not accepting an answer yet, to keep more ideas coming.

closed as primarily opinion-based by HopelessN00b Dec 5 '14 at 10:47

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What OS platform? – spoulson May 22 '09 at 14:38
  • For S/W load-balancers, it will be Linux – toolkit May 22 '09 at 14:43
  • The windows built in network load balancing isn't bad for load balancing on the cheap either. But personally I'd say if it is worth any money to you, buy an F5. – sclarson May 22 '09 at 14:44
  • If you don't do terracotta, what kind of session affinity do you need? Cookie based, header-based, IP? – sh-beta May 22 '09 at 15:18
  • @sh-beta -- I guess it depends on the implementation? – toolkit May 22 '09 at 15:41

14 Answers 14


i would not go for dns-based lb - exactly for the reason you list.

nginx or varnish can be your other lb/fail-over option that sits in front of appservs and acts as reverse proxy. they do require more care than hardware box but will save you quite a lot of money. be sure to put those balancers in some cluster as well [ active-passive with heartbeat will do the trick ].


If you're looking at load balancer appliances, you really can't go wrong with F5 Big-IP

edit: The reason I say just go with Big-IP is because its a nice appliance for server administrators that don't have a lot of experience with network appliances. It has a nice web interface with nearly limitless options for configuration and reporting. They are the most reliable and least expensive of all the "enterprise" load balancing options.

Here is a link to a study on application delivery options in 2007: Gartner Results

  • 1
    I like the F5 Big-IPs. It's also great to handle SSL acceleration so the web servers can just deal with plain HTTP. – Chris W. Rea May 22 '09 at 14:46
  • I would agree although if your running a large operation it's best to stay away from the latest updates I find. – mryan1 May 22 '09 at 14:53
  • We do run a large organization on them, I'm not really sure what latest updates has to do with using F5. – sclarson May 22 '09 at 15:17
  • +1 for the Big-IPs. They just plain work. When you put something between your users and your servers, it needs to be bulletproof. – Brent Ozar May 26 '09 at 19:15

I suggest using HAProxy. It's extremely fast. And you can also evade Single Point of Failure by using two loadbalancers with CARP(*BSD) or UCARP/LVS(Linux)


We've been using Coyote Point Equalizers (hardware load balancers) for years and have been very happy with them. They may not have all the features of an F5, but they still have a lot of features, and they cost far less. Performance and reliability have both been excellent.

  • +1 for that. We've got a pair of coyote's here too, they've been in operation for several years and are still humming right along. – Seth Oct 2 '09 at 20:51

I tend to go for hardware LBs as they can often handle a heck of a lot of traffic, are frequently 'simpler' so more capable of being hardened better/easier and can sometimes also manage other security issues like SYN-flood attacks in hardware. I use Foundry but there's loads of choice (F5, Cisco etc.) - spendy though :(


The Cisco GSS (Global Site Selector) is a DNS server that also does health checks. This is going to be a more expensive option than a standard DNS server obviously. Web page with more details here: http://www.cisco.com/en/US/products/hw/contnetw/ps4162/index.html

F5 has similar offerings:  http://www.f5.com/products/ 
Cisco ACE product page: http://www.cisco.com/en/US/products/ps8361/index.html

As Chopper3 mentioned, hardware based load-balancing is probably going to offer greater performance but you will pay for it.

Features you can look for are: SSL off-loading, vlan support, contexts, clustering, support for routing protocols, and support/interaction with different applications (i.e. html cookies & header modification).


Have you looked at ldirectord?

It runs on linux, can run with heartbeat on the same machines it is load balancing (and thus have some redundancy built in) - or or course, on its own box in front of them, is easy to configure, lightweight, and very capable.


I found that crossroads was an excellent load balancer. It handled our production load for a good seven months while the network guys sorted out a hardware problem with a cisco load balancer.


I wrote a software-based load balancer which does not require a separate machine.

The down side is that it is not really production-ready - but if you want to test it on your test network I'd be pleased.

Fluffy cluster is here

It's basically superficially similar to Microsoft's NLB (I think) - although I don't have their source and don't know exactly how theirs works.

Of course we don't automatically monitor the application layer but you can write something which does that and changes weights or takes nodes out accordingly.

EDIT: You didn't say what OS, Fluffy cluster is Linux-only at the moment.

  • Looks cool. I'd like to use ClusterIP but it's not ready for production and there are too many gotchas. Do you have any plans to make Fluffy cluster ready for production? – diq May 29 '09 at 3:30
  • If there is interest in it, I will do it. There is relatively little work required for a limited-capability release. – MarkR May 29 '09 at 10:27

keepalived is another linux load balancer, that supports several load balancing algorithms (obviously) and VRRP to create redundant instances with automatic failover when a load balancer box goes down


If money is not a concern, get a hardware load balancer.

The company I work for uses Apache to front our Tomcat servers and the load balancer is on the same box as some of the tomcats (tomcats use internal ports). We'll move to a dedicated load balancer box soon. We'll shortly be moving to Nginx though, I find the configuration easier and the whole thing much lighter than Apache. Depending on you network architecture, I'd also advice you to use an internal "floating IP" for the load balancer, and run something like heartbeat to switch the IP to another box if necessary. That would add failover abilities without worrying about DNS propagation issues.


I've set up a solution with DNSMadeEasy. They have a nice screencast regarding DNS failover. They have reasonable pricing. In our system we have implemented a simple service which "pings" the different components in our system (database, JMS queue, S3 connection) and returns OK which DNSMadeEasy can utilize. Whenever an exception comes, DNSMadeEasy will remove that server from the list of servers which answers on that DNS lookup.


Have you looked at perlbal?



Hi @toolkit did you ever implement NGinX/Varnish in your LoadBalancer (LB) quest? if so what were your results? (if you don't mind sharing with the rest of us ;-)

Just to summarise the above (and throw in a mention for ZMQ)

Basic Load Balancing

More Advanced

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