I am a bit confused about how failover actually works with SQL Azure and what we need to implement vs what is out of the box.

I read this article


which goes on about automatic failover, no intervention required. It seems to imply that connection strings don't even need to change. Which sounds like you could have both primary and secondary sites using the same connection string.

All connections to Windows Azure SQL Database databases are managed by a set of load-balanced Gateway processes. A Gateway is responsible for accepting inbound database connection requests from clients and binding them to the node that currently hosts the primary replica of a database. The Gateways coordinate with the distributed fabric to locate the primary replica of a customer’s databases. In the event of a fail-over, the Gateways renegotiate the connection binding of all connections bound to the failed primary to the new primary as soon as it is available.

And then I read this article


which goes on about having to create some kind of connection monitoring app which does the failover for us (sounds a bit prone to failure in itself - why would this not be a standard thing?). And says that the secondary site should always be pointing at the secondary database. i.e. not at all what the first article sounds like.

So, am I reading these wrongly? Is the first article (the older one) out of date?


The first article covers how it will failover within a single data center, stating "Other than the loss of an entire data center all other failures are mitigated by the service." This is covering you if the hardware or storage fails for your database(s).

The second article covers how to use geo-replication to handle the case where the data center itself fails, "In this case the application deployment topology is optimized for handling regional disasters when all application components are impacted and need to failover as a unit."

They are both correct and cover two different scenarios using the same service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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