views:

1994

answers:

15

There are a lot of different systems for balancing load and achieving redundancy in production servers (Not just web servers)

  • Round-robin DNS
  • Linux Virtual Server
  • Cisco Local Director
  • F5 BigIP
  • Windows NLB
  • etc?

If you use one of these (or another) in production, which one? How well does it work for you? Have you evaluated others?

+4  A: 

Add Ultramonkey to the list.

We only tend to use DBs for redundancy, Oracle Dataguard works well but its complex to set up.

gbjbaanb
+3  A: 

For our apache processes we use(d): http://www.f5.com/products/big-ip/ This seems like the industry standard. I guess it all comes down to how much you're paying, and what you're load balancing.

e.g. Websphere could be done:

big ip -> Apache 1 -> WebSphere 1

big ip -> Apache 2 -> WebSphere 2

or you could cross it:

big ip -> Apache 1 -> WebSphere 1 & 2 (round robin)

big ip -> Apache 2 -> WebSphere 2 & 1 (round robin)

We used the latter and it worked perfectly. Watch out for the scenario where one host fails: in most cases you're going to lose that request if it just times out.

Egwor
+1  A: 

Round-robin DNS will give you load-balancing, but not redundancy. If one of your servers fail, it'll still be hit by its share of requests.

We use Apache mod_jk to handle load balancing and redundancy between pairs of Java application servers. This works extremely well, and it's simple.

We also have a cold-failover Apache server in case the primary fails. Ideally we'd use something Linux-HA to achieve hot-failover for apache, but we're not sure if we can justify the complexity.

skaffman
Round-robin DNS will give you redundancy. Web browsers generally behave in a smart fashion when one of the hosts in a round-robin DNS fails. In particular, if a host in RR DNS is failing quickly (e.g. giving a "connection refused", the web browser fails over so quickly that the users won't notice.
MarkR
Fair enough, I wasn't aware of that. How is the browser aware of the round-robin setup, though, given that it just asks the OS for a DNS reolution? Isn't this just the browser blindly doing an automatic retry?
skaffman
The browser resolves all the IP addresses of the host and picks one; if that fails it then tries others. The resolver library allows an application to retrieve all the relevant records.
MarkR
Try it yourself- you can even do it with a "hosts" file, just set up a few bogus entries and one legitimate one- if they fail fast, you probably won't even notice the browser trying the other IPs.
MarkR
Plussed b/c of the DNS RR limitation. Re 1st comment: if the host goes offline (rather than the server fails), you don't get a connection refused, you get nothing, and the client has to do TCP Connection Establishment timeout, which can take a long time.
benc
+2  A: 

I have used one of the low-end Coyote Point load balancers for a small website. I found the setup intuitive and the product stable and easy to use.

I believe their product is a nice web GUI interface to BSD's relayd, formerly hoststated.

In retrospect, I wish I had bought the middle to high end product so I could have used the load balancer as an SSL-endpoint and saved money on certificates.

ceretullis
plussed b/c the point about certificates is very useful.
benc
+3  A: 

I've used LVS and find it very low maintenance once setup. On a side project I tried haproxy for a site where I was just balancing 3 webservers. Worked like a charm and was very easy to configure - highly recommended.

Paul Dixon
+1  A: 

A department at UCLA uses Juniper Acceleration Platform and they are very happy with it. It goes as far as taking over the task of SSL encryption, and boy, hardware-based SSL is so much faster! They are currently migrating more of their services to work with it.

What's cool about it:

  • Stores commonly accessed data patterns on dedicated hard drives
  • Hardware-based algorithms (talking speed!)
  • Supports most common protocols

It's not cheap, but very efficient for companies with huge amounts of traffic. See specifications for UCLA's choice here.

DV
+1  A: 

We use keepalived on top of LVS. It's simple to add servers and has support for fail over load balancing servers.

HeMan
+3  A: 

Mark Imbriaco of 37signals has created a short screencast demonstrating how his company uses HAproxy for Rails load balancing:

http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy

Kyle Cronin
+1  A: 

I have used F5 bigips at a couple of jobs, in addition to the usual hardware load balancing goodies i am particularly fond of irules which really offer some great rewriting flexibility

its basically an event driven script language

http://devcentral.f5.com/Default.aspx?tabid=75

there's a wiki but you need to create an account to access is

UndertheFold
+3  A: 

We are using a E250si by coyotepoint.

Reasons why we opted for this particular loadbalancer

  • We wanted a turn-key solution, which this piece of hardware is.
  • Price (we got it used with a year of support left on eBay).
  • Webbased interface - really easy to use (e.g. setup a cluster, quiesce a server, troubleshoot, statistics, ...), even if you're not a system administrator.
  • Semi-personal relationship with the company (or rather with someone working for them at that time).
  • FreeBSD based - we run FreeBSD almost exclusively and I prefer a solution which doesn't add yet another technology to the stack.

One of the things to add is that even though the loadbalancer only has four physical ports, you can enable more ports by hooking up a switch to one of your physical ports - and hereby extending by

There's not so much to say about this loadbalancer. It's been good to us and has been running without a reboot and any issues for 10 months or so now. Whenever a server failed, it was taken out of rotation instantly. Not so much I can complain.

Initially there's a few things to get used and if I had to think about weak spots, only two come to mind:

  • When you're handling more than 4 mbit/s incoming it can get a bit slow - and really, really slow when you enable features such as stickyness. We peak at 5-6 mbit/s usually but because we disabled stickyness, server agents, probes and use the very basic round_robin policy, it's all good.
  • The web interface use JavaScript/ajax for parts of the display - and those are pretty buggy, though a sales@ person told me they are resolved if we do the software update.

All in all, the E250si saved us the all configuration and maintaining another server, etc.. But since I heard so many good things about HAproxy and pound, we will probably sooner or later migrate in this direction. If I go the software route though, I'd be very very picky after the components I put into the server - e.g. mainboard, network cards, etc..

Till
+2  A: 

HAProxy is an excellent software load-balancer; easy to configure, highly customisable and extremely performant (it can saturate a 10Gb NIC).

The main features which make HAProxy so suited to us:

  • Easily define different traffic types, and route to the right server pool
  • Extreme reliability: I've not had it crash in 9 months and counting
  • Low resource usage: barely registers on CPU, and all the (small) I/O load is from logging
  • Highly flexible: various balancing, session stickiness and failover algorithms

The only thing that is annoying about HAProxy is the configuration file. There is no convenient way to programmatically change a server's config, and there's a learning curve to understanding the various options.

Alabaster Codify
That's your opinion, fine, do you use it in production? That's what I originally asked.
MarkR
I use Haproxy in production where it handles about 11 million sessions/requests and 1.4 terabits per day. It's great. I agree 100% with all of the above: almost no resource usage, flexible, reliable.
casey
A: 

We are using HAProxy with great success. I had never seen it go above 2% CPU usage even during high load average.

A: 

Round Robin with sticky sessions is what I believe we use. We have to have the setting so that the ASP/ASP.Net session information is preserved so that a user sticks to the one server that has the session.

We did have a little problem once involving switching from http to SSL where our site would send authenticated users to a non-secure page and unauthenticated users would be sent to the secure login page that was kind of strange to see but did make some sense in the end that was solved through SSL termination for the best solution aside from going back to a single server which was the immediate solution.

There may come a time when something more sophisticated will have to be used to determine which server is the "least busy" and send the next request to that machine but I'm not sure how the infrastructure guys will get to that functionality of the load balancers.

JB King
What vendor is that provided by? Microsoft?
MarkR
Juniper Networks is the company of the load balancers while the other stuff is in Microsoft Technologies,e.g. IIS, Visual Studio, Source Safe etc.
JB King
+1  A: 

We currently use the Zeuz ZXTM load balancer and have been pleased with it so far. However, our hosting provider initially configured it on a virtual machine on top of the machine running firewall services. This was a pretty stupid mistake, it turned out, as the connections became saturated long before traffic should have been an issue. Once moved to its own dedicated box, we were able to handle 100Mb/s outgoing traffic without fail or issue (on a 4Gb/s burstable internet pipe).

Chris
+1  A: 

HAProxy(loadbalancing) + Pound (SSL termnation) + keepalived (VRRP to have a live backup loadbalancer)

Rick