Skip to content

Commit 98bee32

Browse files
authored
Merge pull request #102854 from SnehaGunda/PrivateLinks
Adding current region details for Table API global distribution
2 parents 487ebab + 5bbfff3 commit 98bee32

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

articles/cosmos-db/tutorial-global-distribution-table.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: akshanka
66
ms.service: cosmos-db
77
ms.subservice: cosmosdb-table
88
ms.topic: tutorial
9-
ms.date: 12/02/2019
9+
ms.date: 01/30/2020
1010
ms.reviewer: sngun
1111
---
1212
# Set up Azure Cosmos DB global distribution using the Table API
@@ -22,19 +22,17 @@ This article covers the following tasks:
2222

2323
## Connecting to a preferred region using the Table API
2424

25-
In order to take advantage of [global distribution](distribute-data-globally.md), client applications can specify the ordered preference list of regions to be used to perform document operations. This can be done by setting the [TableConnectionPolicy.PreferredLocations](/dotnet/api/microsoft.azure.documents.client.connectionpolicy.preferredlocations?view=azure-dotnet) property. The Azure Cosmos DB Table API SDK picks the best endpoint to communicate with based on the account configuration, current regional availability and the supplied preference list.
25+
In order to take advantage of the [global distribution](distribute-data-globally.md), client applications should specify the current location where their application is running. This is done by setting the `CosmosExecutorConfiguration.CurrentRegion` property. The `CurrentRegion` property should contain a single location. Each client instance can specify their own region for low latency reads. The region must be named by using their [display names](https://msdn.microsoft.com/library/azure/gg441293.aspx) such as "West US".
2626

27-
The PreferredLocations should contain a comma-separated list of preferred (multi-homing) locations for reads. Each client instance can specify a subset of these regions in the preferred order for low latency reads. The regions must be named using their [display names](https://msdn.microsoft.com/library/azure/gg441293.aspx), for example, `West US`.
27+
The Azure Cosmos DB Table API SDK automatically picks the best endpoint to communicate with based on the account configuration and current regional availability. It prioritizes the closest region to provide better latency to clients. After you set the current `CurrentRegion` property, read and write requests are directed as follows:
2828

29-
All reads are sent to the first available region in the PreferredLocations list. If the request fails, the client will fail down the list to the next region, and so on.
29+
* **Read requests:** All read requests are sent to the configured `CurrentRegion`. Based on the proximity, the SDK automatically selects a fallback geo-replicated region for high availability.
3030

31-
The SDK attempts to read from the regions specified in PreferredLocations. So, for example, if the Database Account is available in three regions, but the client only specifies two of the non-write regions for PreferredLocations, then no reads will be served out of the write region, even in the case of failover.
31+
* **Write requests:** The SDK automatically sends all write requests to the current write region. In a multi master account, current region will serve the writes requests as well. Based on the proximity, the SDK automatically selects a fallback geo-replicated region for high availability.
3232

33-
The SDK automatically sends all writes to the current write region.
33+
If you don't specify the `CurrentRegion` property, the SDK uses the current write region for all operations.
3434

35-
If the PreferredLocations property is not set, all requests will be served from the current write region.
36-
37-
That's it, that completes this tutorial. You can learn how to manage the consistency of your globally replicated account by reading [Consistency levels in Azure Cosmos DB](consistency-levels.md). And for more information about how global database replication works in Azure Cosmos DB, see [Distribute data globally with Azure Cosmos DB](distribute-data-globally.md).
35+
For example, if an Azure Cosmos account is in "West US" and "East US" regions. If "West US" is the write region and the application is present in "East US". If the CurrentRegion property is not configured, all the read and write requests are always directed to the "West US" region. If the CurrentRegion property is configured, all the read requests are served from "East US" region.
3836

3937
## Next steps
4038

0 commit comments

Comments
 (0)