tags:

views:

1123

answers:

3

Is there anyway to configure a WCF service with a failover endpoint if the primary endpoint dies? Kind of like being able to specify a failover server in a SQL cluster...

Specifically I am using the TCP/IP binding for speed, but on the rare occurrence that the machine is not available I would like to redirect traffic to the failover server. Not too bothered about losing messages... I'd just prefer not to write the code to handle re-routing!

Cheers, Stuart

+1  A: 

Without trying to sound too vague but I think Windows Network Load Balancing (NLB) should handle this for you.

Kev
+2  A: 

You need to use a layer 4 load balancer in front of the two endpoints. Prob best to stick with a dedicated piece of hardware.

http://en.wikipedia.org/wiki/Load_balancing_(computing)#Relationshipwithfailover

Damian Hickey
A: 

Haven't done it yet with WCF but plan to have a local DNS entry pointing to our Network Load Balancing (NLB) virtual iP address which will direct all traffic to one of our servers hosting services within IIS. I have used NLB for this exact scenario in the past for web sites and see no reason why it will not work well with WCF.

The beauty of it is that you can take servers in and out of the virtual cluster at will and NLB takes care of all the ugly re-directing to an available node. It also comes with a great price tag: $FREE with your Windows Server license.