Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm building a client-server application and I am looking at adding failover to the client so that when a server is down it will try to connect to another available server. Are there any standards or specifications covering server failover? I'd rather adopt an existing standard than implement my own mechanism.

Failing that, any advice on what structure to use for the failover would be very much welcome. Currently, I'm thinking of having a list of servers and then a choice of algorithms such as: top down, random, prefer top etc... Another approach I thought of would be to split the list of failover servers in to primary and backup. Any thoughts/advice welcome. Thanks.

share|improve this question
1  
The first part (assuming you're talking about coding the client yourself) is definitely better suited to StackOverflow. The second part is in the right place :) –  Izzy Sep 9 '09 at 22:15
add comment

4 Answers

up vote 4 down vote accepted

Carp is an open standard for server clustering, that can do failover. It's mostly a BSD thing, but most unixes can use ucarp. VRRP is the general IETF standard, but is designed more for routers than application servers.

share|improve this answer
2  
VRRP is more than adequate for servers. It's pretty much a method for two servers to share a single IP address in a fail-over configuration. –  David Pashley Sep 9 '09 at 22:41
1  
Oh, forgot to mention that keepalived is a good VRRP implementation for unix systems. It can also be used as a load-balancer. –  David Pashley Sep 9 '09 at 22:44
    
Fair enough. I've only ever seen it used for routers, but then most of what I do these days is networky. –  Cian Sep 10 '09 at 0:11
add comment

What operating system will your application run on?

If Windows, then there is a clustering API you can use to make your application cluster-aware and compliant with Microsoft clustering, just like SQL Server or Exchange.

http://msdn.microsoft.com/en-us/library/cc296100%28VS.85%29.aspx

share|improve this answer
2  
Microsoft clustering is hardly an 'open standard' :-P –  Cian Sep 9 '09 at 22:24
    
Agreed, but if you're building for Microsoft systems there are quite good reasons to use it :-p –  Massimo Sep 9 '09 at 22:54
add comment

If you're looking for a simple way of providing multiple server addresses, you may use DNS SRV records for that. That's RFC 2782.

share|improve this answer
1  
DNS is never the answer in a HA situation. HA requires failover in seconds. DNS is in the magnitude of hours, due to caching. It's not even very suitable for load-balancing, as it has no way to take overloaded servers into account. –  David Pashley Sep 9 '09 at 22:43
add comment

It really depends on the application and the server component that needs to be redundant. Web sites are relatively easy to build redundancy for. Exchange and SQL are different matters altogether. Can you give us more detail on the app and the server?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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