none
Routing service failover in WCF 4

    Question

  • I've been reading up on WCF 4 Routing as a means to provide failover backuplists for my service. It all makes a lot of sense and seems fairly straightforward to implement.

    One thing I can't find info on though, is how I can provide failover for the required Routing Service? I'm trying to get away from a single point of failure, but the introduction of the Routing Service seems to bring that single point back in.

    Have I misunderstood something here, or is there a way around this?

    marcuswhitworth.com
    Monday, January 31, 2011 12:19 PM

Answers

  • A couple of things to think about with Routing Service failover

    As the others have said you can use something as simple as NLB for load balancing the routing service as its stateless. However, the send timeout configured in the routing service is important - bear in mind the following:

    1) If the primary service is dead then failover is fast and works great. However, if the primary service is *slow* and the send times out then it will take a while to failover to the backup. This cost is incurred for every message not just the first to failover. The routing service always tries the primary first. If you want different behavior you will have to build your own message filter. I did a screencast describing how to do this here: http://www.rocksolidknowledge.com/ScreenCasts.mvc

    2) If the primary is slow and you failover you do now know if the primary is already processing the message. This is fine for idempotent messages but for anything that mutates state you have to guard against processing the same request twice


    Richard Blewett, thinktecture - http://www.dotnetconsult.co.uk/weblog2
    Twitter: richardblewett
    Wednesday, February 02, 2011 8:33 AM
    Moderator
  • Yes, to prevent the routing service itself to go down, a load balanced solution is required. You can either setup your own web farm, or use a public cloud solution like Windows Azure.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    Wednesday, February 02, 2011 5:10 AM

All replies

  • Hello, do you mean if the failover service itself fails, you want to provide an additional failover service? Yes, this is supported. You can add multiple endpoints to the backupList: http://msdn.microsoft.com/en-us/library/ee816906.aspx.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    Tuesday, February 01, 2011 2:13 AM
  • No, I'm more wondering what happens if the Routing Service itself goes down?  I could have 10 failover servers for my actual service, but if the Routing Service goes down then it would seem I'm no better off than I was before?
    marcuswhitworth.com
    Tuesday, February 01, 2011 9:33 AM
  • This is just a thought and something I'm working on myself at the moment.  You could build out a WebFarm and host the routing service in AppFabric. 


    Sharpester
    Tuesday, February 01, 2011 10:55 PM
  • Yes, to prevent the routing service itself to go down, a load balanced solution is required. You can either setup your own web farm, or use a public cloud solution like Windows Azure.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    Wednesday, February 02, 2011 5:10 AM
  • A couple of things to think about with Routing Service failover

    As the others have said you can use something as simple as NLB for load balancing the routing service as its stateless. However, the send timeout configured in the routing service is important - bear in mind the following:

    1) If the primary service is dead then failover is fast and works great. However, if the primary service is *slow* and the send times out then it will take a while to failover to the backup. This cost is incurred for every message not just the first to failover. The routing service always tries the primary first. If you want different behavior you will have to build your own message filter. I did a screencast describing how to do this here: http://www.rocksolidknowledge.com/ScreenCasts.mvc

    2) If the primary is slow and you failover you do now know if the primary is already processing the message. This is fine for idempotent messages but for anything that mutates state you have to guard against processing the same request twice


    Richard Blewett, thinktecture - http://www.dotnetconsult.co.uk/weblog2
    Twitter: richardblewett
    Wednesday, February 02, 2011 8:33 AM
    Moderator