Azure/azure-cosmos-python

Failover to other regions

Closed this issue · 5 comments

Hello,
Does this SDK fail over to other Document DB replicated regions when one region is down?

Thanks,
Sasidhar.

@skasturi Failover is a service feature and not SDK feature. The only way you can trigger manual failover is through Azure portal. Automatic failover happens when your primary region is down.

If the failover happens, your client requests will automatically be directed to new primary, so no action needed from your end from SDK perspective.

Let me know if that answers your question.

Yes. It does answer the question. I was confused with the documentation on Doc DB.

@skasturi Can you please point the documentation that confused you? If needed, we will fix it to avoid such confusion to others.

/cc: @mimig1

https://docs.microsoft.com/en-us/azure/documentdb/documentdb-regional-failovers

It says the following:

""" In the rare event of an Azure regional outage, DocumentDB automatically triggers failovers of all DocumentDB accounts with a presence in the affected region. """

  1. What happens if I have data in West US 2 and West Central US? Would it fail over or not? Its shows only across regions and is NOT clear.
  2. What happens if we do NOT have any preferred list?

Hi @skasturi

If you have data in West US 2 and West Central US, if there is a failure within West US 2 (which was set as your default write region) then DocumentDB automatically fails over to West Central US. Region in this case is in reference to the data centers (i.e. West US 2 and West Central US are separate regions).

As for the preferred list, when you setup geo-replication within DocumentDB, automatically there is a preferred list. Within the portal (for example), when you setup geo-replication (under the blade "Replicate Data Globally"), the priority list is set as you add regions. You can re-order them by clicking on "Failover Priorities" and setting the priorities in that dialog.

screen shot 2017-03-09 at 06 43 16

HTH!
Denny