Hi Everyone -
I have a doubt on Connectivity for Cosmos db for our BCDR set up. Let me explain.
Our Aim is to have a BCDR for our application hosted in West US2 (primary region) and also in East US2 (Secondary region) and both in Active-Active mode.
- Our Primary Region West US2:- We have App services fetching the connection string from Key Vault to connect to our Cosmos db.
Note:- Cosmos DB has Multi region enabled (Single region write) and the secondary region for Cosmos has been configured as East US2.
- Our Secondary Region East US2 :- We have Configured another region for our BCDR which is in East US2 where in we have our App services and Key Vault. (no Cosmos DB has been configured here)
Here are my Concerns :-
- I believe in both the Key Vaults in primary & Secondary Region the connection string to Cosmos will be one and the same. - which means both pointing to the One single Cosmos db hosted in Primary region West US2. Is this a fair assumption ?
- Or in other words, In Primary Region (west us2)
App Service 1 --> Key Vault 1 --> Cosmos DB 1 in Primary region (west US2)
- In Secondary region (east us2)
App Service 2 --> Key Vault 2 --> Cosmos DB 1 in Primary region (west US2)
If we do the above Configuration, If the Primary region fails - It will switch to Secondary region and App service 2 will point to Cosmos 1 and since Whole region has failed, App service 2 in secondary region will automatically connected to Cosmos 1 in East US2 as multiregion is enabled already.
Is this the correct way of implementing BCDR for applications dealing with Cosmos db database ?
Appreciate your thoughts & help.
Thanks!
-Mathew James