Mabraygas
Mabraygas

Reputation: 329

Problems in Azure Geo Replication

Brief Question:

I have two web apps as Endpoints, deployed in US West and East, added to a Traffic Manager. And I have a Azure Database with GeoReplica(Primary in USWest, Secondary in USEast). I also have a RAGRS Azure Storage Account(Primary in USWest, Secondary in USEast).

If a user come to our web app, he will be redirected to USWest or USEast Endpoint according to performance.

But which Database and Storage Account will he actually use? If he is a USEast user, according to my understanding, he will transact with USEast-Database, USEast-StorageAccount if the transaction is Readonly. However as the GeoReplica only guaranty eventual consistency, will he read out some old data?

Or is there some method that Azure can prevent from this issus?

Upvotes: 0

Views: 336

Answers (1)

holstad
holstad

Reputation: 46

You are correct that Traffic Manager will route web traffic to your web app endpoints based on its configuration, but for your web apps' calls to DB and Storage accounts, think of it as Primary vs. Secondary, not East vs. West, and not "sticky" or dedicated based on web app region.

For Storage, Azure uses a virtual endpoint that equates to your Primary storage, which is likely West for you, but could always failover to East (still using this same endpoint). From https://azure.microsoft.com/en-us/documentation/articles/storage-redundancy/: "For a storage account with GRS enabled, an update is first committed to the primary region, where it is replicated three times. Then the update is replicated to the secondary region, where it is also replicated three times, across separate fault domains and upgrade domains." Since you do have RA-GRS, you have the option to specify whether to read from Primary, Secondary, or PrimaryThenSecondary, but again, this means Primary or Secondary, not "East" or "West", and it's for reads only.

For Azure's SQL Database, requests from either your East or West web app will both go to Primary, which for you is West (for now), and Azure SQL will replicate the data to Secondary, which is East (for now). Those could flip in an failover scenario, remember. All of your web app database requests are going to Primary regardless of location.

Upvotes: 3

Related Questions