1

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.

Supertux
  • 121
  • 1
  • 5
  • 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 09 '09 at 22:15

4 Answers4

4

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.

Cian
  • 5,777
  • 1
  • 27
  • 40
  • 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 09 '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 09 '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 00:11
1

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(VS.85).aspx

Massimo
  • 68,714
  • 56
  • 196
  • 319
1

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.

Michał Górny
  • 1,400
  • 1
  • 9
  • 7
  • 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 09 '09 at 22:43
0

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?

joeqwerty
  • 108,377
  • 6
  • 80
  • 171