Skip to content

Commit bbbc0f1

Browse files
committed
Adding text about intersection
1 parent 63f1873 commit bbbc0f1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/cosmos-db/sql/troubleshoot-sdk-availability.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Diagnose and troubleshoot the availability of Azure Cosmos SDKs in multir
33
description: Learn all about the Azure Cosmos SDK availability behavior when operating in multi regional environments.
44
author: ealsur
55
ms.service: cosmos-db
6-
ms.date: 09/07/2022
6+
ms.date: 09/27/2022
77
ms.author: maquaran
88
ms.subservice: cosmosdb-sql
99
ms.topic: troubleshooting
@@ -22,12 +22,14 @@ All the Azure Cosmos SDKs give you an option to customize the regional preferenc
2222
* The [CosmosClient.preferred_locations](/python/api/azure-cosmos/azure.cosmos.cosmos_client.cosmosclient) parameter in Python SDK.
2323
* The [CosmosClientOptions.ConnectionPolicy.preferredLocations](/javascript/api/@azure/cosmos/connectionpolicy#preferredlocations) parameter in JS SDK.
2424

25-
When you set the regional preference, the client will connect to a region as mentioned in the following table:
25+
When the SDK initializes with a configuration that specifies regional preference, it will first obtain the account information including the available regions from the global endpoint. It will then apply an intersection of the configured regional preference and the account's available regions and use the order in the regional preference to prioritize the result.
26+
27+
If the regional preference configuration contains regions that aren't an available region in the account, the values will be ignored. If these invalid regions are [added later to the account](#adding-a-region-to-an-account), the SDK will use them if they're higher in the preference configuration.
2628

2729
|Account type |Reads |Writes |
2830
|------------------------|--|--|
29-
| Single write region | Preferred region | Primary region |
30-
| Multiple write regions | Preferred region | Preferred region |
31+
| Single write region | Preferred region with highest order | Primary region |
32+
| Multiple write regions | Preferred region with highest order | Preferred region with highest order |
3133

3234
If you **don't set a preferred region**, the SDK client defaults to the primary region:
3335

0 commit comments

Comments
 (0)