25

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?

Thanks.

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

toolkit
  • 402
  • 6
  • 10

14 Answers14

11

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

sclarson
  • 3,624
  • 21
  • 20
  • 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
7

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

pQd
  • 29,561
  • 5
  • 64
  • 106
6

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)

SaveTheRbtz
  • 5,621
  • 4
  • 29
  • 45
4

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 02 '09 at 20:51
3

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 :(

Chopper3
  • 100,240
  • 9
  • 106
  • 238
1

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

Peter
  • 5,403
  • 1
  • 25
  • 32
1

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.

Brent
  • 22,219
  • 19
  • 68
  • 102
1

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.

Jonathan
  • 135
  • 7
0

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.

MarkR
  • 2,898
  • 16
  • 13
  • 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 03: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
0

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

Sander Rijken
  • 87
  • 3
  • 11
0

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.

ahanson
  • 1,674
  • 2
  • 15
  • 21
0

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.

tronda
  • 1,261
  • 10
  • 13
0

Have you looked at perlbal?

www.danga.com/perlbal/

Rich
  • 945
  • 1
  • 6
  • 15
0

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

nelsonic
  • 211
  • 2
  • 3