We're currently developing several websites using 2 web front-end servers (using apache and tomcat/jboss) with a loadbalancer in front of them. Since I'm a programmer, not a sysadmin, I can only guess what a decent hardware loadbalancer is capable of. I was wondering if a hardware loadbalancer can check on HTTP status codes, so the traffic would be redirected to only one server if the other one is down for maintenance (which now sends out a 503 HTTP error code).
Thanks!
Ben
Yes, practically all load balancers will do that. Most load balancers will also go further, and take a dead HTTP server out of service if it:
Edit: Addtionally, good load balancers have an easy way of setting a server into maintenance mode, i.e. the load balancer will stop sending new requests to that server, and will show in its UI when the server stops having traffic. Then you can freely perform the required maintenance on the server, before putting it back into service.
Additionally, most load balancers have a concept of a emergency server, i.e. if all regular HTTP servers are down, all traffic will be sent to a designated emergency server on your LAN which can then deliver a static "we're down for maintenance, check back later" page.
Coyote Point makes nice low-end load balancer appliances IMHO. There are many other vendors of low-end load balancers; Barracuda is one example. 'Low-end' is not negative in this context, it is just that the market is split into two:
If the OP has no sysadmin skills in-house, then purchasing a low-maintenance appliance makes a lot of sense. If you're willing and capable of setting up a Unix server, then take a look at this post. If you're on Microsoft Windows, then Microsoft Application Request Routing version 1 or 2 (beta) could be good solutions (I don't know them so well).
Apache/tomcat certainly can - look at the documentation for "fail_on_status".
BigIP load balancers can do that. But you don't need to get a big hardware LB to have good performance. Check out nginx, and varnish. Varnish specifically was written as a caching load balancer and is highly configurable. http://varnish.projects.linpro.no/