You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable multi-region writes in your application, call `.multipleWriteRegionsEnabled(true)` and `.preferredRegions(preferredRegions)` in the client builder, where `preferredRegions` is a `List`containing one element. That element is the region in which the application is being deployed and where Azure Cosmos DB is replicated:
79
+
To enable multi-region writes in your application, call `.multipleWriteRegionsEnabled(true)` and `.preferredRegions(preferredRegions)` in the client builder, where `preferredRegions` is a `List`of regions the data is replicated into ordered by preference - ideally the regions with shortest distance/best latency first:
80
80
81
81
# [Async](#tab/api-async)
82
82
@@ -94,7 +94,7 @@ To enable multi-region writes in your application, call `.multipleWriteRegionsEn
The Java V2 SDK used the Maven [com.microsoft.azure::azure-cosmosdb](https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb). To enable multi-region writes in your application, set `policy.setUsingMultipleWriteLocations(true)` and set `policy.setPreferredLocations` to the region in which the application is being deployed and where Azure Cosmos DB is replicated:
97
+
The Java V2 SDK used the Maven [com.microsoft.azure::azure-cosmosdb](https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb). To enable multi-region writes in your application, set `policy.setUsingMultipleWriteLocations(true)` and set `policy.setPreferredLocations` to the `List` of regions the data is replicated into ordered by preference - ideally the regions with shortest distance/best latency first:
98
98
99
99
```java
100
100
ConnectionPolicy policy =newConnectionPolicy();
@@ -111,7 +111,7 @@ AsyncDocumentClient client =
111
111
112
112
## <aid="javascript"></a>Node.js, JavaScript, and TypeScript SDKs
113
113
114
-
To enable multi-region writes in your application, set `connectionPolicy.UseMultipleWriteLocations` to `true`. Also, set `connectionPolicy.PreferredLocations` to the region in which the application is being deployed and where Azure Cosmos DB is replicated:
114
+
To enable multi-region writes in your application, set `connectionPolicy.UseMultipleWriteLocations` to `true`. Also, set `connectionPolicy.PreferredLocations` to the regions the data is replicated into ordered by preference - ideally the regions with shortest distance/best latency first:
@@ -128,7 +128,7 @@ const client = new CosmosClient({
128
128
129
129
## <aid="python"></a>Python SDK
130
130
131
-
To enable multi-region writes in your application, set `connection_policy.UseMultipleWriteLocations` to `true`. Also, set `connection_policy.PreferredLocations` to the region in which the application is being deployed and where Azure Cosmos DB is replicated.
131
+
To enable multi-region writes in your application, set `connection_policy.UseMultipleWriteLocations` to `true`. Also, set `connection_policy.PreferredLocations` to the regions the data is replicated into ordered by preference - ideally the regions with shortest distance/best latency first.
0 commit comments