failover to backup web service

We have a failover site to host our web service for a company mobile app if our main site goes down. To implement support for it, I coded something like this:

Try
ws.Login(username, pwd)
Catch
ws.Url = Config.GetSetting("backupUrl")
ws.Login(username, pwd)
End Try

See any hazards Thanks.




Answer this question

failover to backup web service

  • oysts

    You should probably be more selective in the catch logic. You want to try again if there's a communications failure but probably not if the login failed for bad credentials or other errors.
  • redhot2006

    DRP solution is usually a multi-tiered effort - moving to a remote site is usually only done when you have a catastrophy - because of issues like data synchronization and freshness -Even though it depends on your particular business, you would probably find that you cannot synchronize the whole data between the two sites at the same level of synchronization

    You may still want to add NLB or other clustering solution on your "main" site and handle the rerouting of services outside your code in cases of a site fail-over

    Arnon



  • JNG

    Do the server share a SAN across data centres If so you should be able to replicate over that; where is your DB

  • Byron_Black

    Thanks for the comments. (Perhaps I should have mentioned, the servers are in separate cities, for disaster hardening).

  • simsod

    Why have a 'backup' service when you could load balance 2 or more servers and therefore not have to worry about fail over servers from a code perspective.

    HTH

    Ollie Riches



  • ggolub

    Thanks for the feedback!

  • failover to backup web service