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
Copy file name to clipboardExpand all lines: articles/cosmos-db/change-feed.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ Change feed is available for partition key ranges of an Azure Cosmos DB containe
65
65
66
66
### Sort order of items in change feed
67
67
68
-
Change feed items come in the order of their modification time. This sort order is guaranteed per logical partition key, and there's no guaranteed order across the partition key values.
68
+
Change feed items come in the order of their modification time. This sort order is guaranteed per physical partition, and there's no guaranteed order across the partition key values.
69
69
70
70
### Change feed in multi-region Azure Cosmos DB accounts
Copy file name to clipboardExpand all lines: articles/cosmos-db/continuous-backup-restore-introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ Currently the point in time restore functionality has the following limitations:
136
136
137
137
* The restored account is created in the same region where your source account exists. You can't restore an account into a region where the source account didn't exist.
138
138
139
-
* The restore window is only 30-day for continuous 30-day tier and it can't be changed. Similarly it's only 7-day for continuous 7-day tier and that also can't be changed.
139
+
* The restore window is only 30 days for continuous 30-day tier and seven days for continuous 7-day tier. These tiers can be switched, but the actual quantities (``7`` or ``30``) can't be changed. Furthermore, if you switch from 30-day tier to 7-day tier, there's the potential for data loss on days beyond the seventh.
140
140
141
141
* The backups aren't automatically geo-disaster resistant. You've to explicitly add another region to have resiliency for the account and the backup.
Copy file name to clipboardExpand all lines: articles/cosmos-db/how-to-setup-customer-managed-keys.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,17 @@ Here, create a new key using Azure Key Vault and retrieve the unique identifier.
156
156
157
157
:::image type="content" source="media/how-to-setup-customer-managed-keys/new-customer-managed-key.png" lightbox="media/how-to-setup-customer-managed-keys/new-customer-managed-key.png" alt-text="Screenshot of the dialog to create a new key.":::
158
158
159
+
> [!TIP]
160
+
> Alternatively, you can use the Azure CLI to generate a key with:
161
+
>
162
+
> ```azurecli
163
+
> az keyvault key create \
164
+
> --vault-name <name-of-key-vault> \
165
+
> --name <name-of-key>
166
+
> ```
167
+
>
168
+
> For more information on managing a key vault with the Azure CLI, see [manage Azure Key Vault with the Azure CLI](../key-vault/general/manage-with-cli2.md).
169
+
159
170
1. After the key is created, select the newly created key and then its current version.
160
171
161
172
1. Copy the key's **Key Identifier**, except the part after the last forward slash:
@@ -555,9 +566,6 @@ Use the Azure CLI to restore a continuous account that is already configured usi
Copy file name to clipboardExpand all lines: articles/cosmos-db/nosql/best-practice-dotnet.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,15 +35,15 @@ Watch the video below to learn more about using the .NET SDK from an Azure Cosmo
35
35
|<inputtype="checkbox"/> | Ephemeral Port Exhaustion | For sparse or sporadic connections, we set the [`IdleConnectionTimeout`](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.idletcpconnectiontimeout?view=azure-dotnet&preserve-view=true) and [`PortReuseMode`](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.portreusemode?view=azure-dotnet&preserve-view=true) to `PrivatePortPool`. The `IdleConnectionTimeout` property helps control the time after which unused connections are closed. This reduces the number of unused connections. By default, idle connections are kept open indefinitely. The value set must be greater than or equal to 10 minutes. We recommended values between 20 minutes and 24 hours. The `PortReuseMode` property allows the SDK to use a small pool of ephemeral ports for various Azure Cosmos DB destination endpoints. |
36
36
|<inputtype="checkbox"/> | Use Async/Await | Avoid blocking calls: `Task.Result`, `Task.Wait`, and `Task.GetAwaiter().GetResult()`. The entire call stack is asynchronous in order to benefit from [async/await](/dotnet/csharp/programming-guide/concepts/async/) patterns. Many synchronous blocking calls lead to [Thread Pool starvation](/archive/blogs/vancem/diagnosing-net-core-threadpool-starvation-with-perfview-why-my-service-is-not-saturating-all-cores-or-seems-to-stall) and degraded response times. |
37
37
|<inputtype="checkbox"/> | End-to-End Timeouts | To get end-to-end timeouts, you need to use both `RequestTimeout` and `CancellationToken` parameters. For more details [visit our timeout troubleshooting guide](troubleshoot-dotnet-sdk-request-timeout.md). |
38
-
|<inputtype="checkbox"/> | Retry Logic | For details on which errors to retry on and which ones are retried by SDKs[visit our design guide](conceptual-resilient-sdk-applications.md#should-my-application-retry-on-errors). For accounts configured with multiple regions, there are [some scenarios](troubleshoot-sdk-availability.md#transient-connectivity-issues-on-tcp-protocol) where the SDK will automatically retry on other regions. For .NET specific implementation details visit the [SDK source repository](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/docs/SdkDesign.md). |
38
+
|<inputtype="checkbox"/> | Retry Logic | For more information on which errors to retry on and which ones are retried by SDKs, see [design guide](conceptual-resilient-sdk-applications.md#should-my-application-retry-on-errors). For accounts configured with multiple regions, there are [some scenarios](troubleshoot-sdk-availability.md#transient-connectivity-issues-on-tcp-protocol) where the SDK will automatically retry on other regions. For .NET specific implementation details visit the [SDK source repository](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/docs/SdkDesign.md). |
39
39
|<inputtype="checkbox"/> | Caching database/collection names | Retrieve the names of your databases and containers from configuration or cache them on start. Calls like `ReadDatabaseAsync` or `ReadDocumentCollectionAsync` and `CreateDatabaseQuery` or `CreateDocumentCollectionQuery` will result in metadata calls to the service, which consume from the system-reserved RU limit. `CreateIfNotExist` should also only be used once for setting up the database. Overall, these operations should be performed infrequently. |
40
40
|<inputtype="checkbox"/> | Bulk Support | In scenarios where you may not need to optimize for latency, we recommend enabling [Bulk support](https://devblogs.microsoft.com/cosmosdb/introducing-bulk-support-in-the-net-sdk/) for dumping large volumes of data. |
41
41
| <inputtype="checkbox"/> | Parallel Queries | The Azure Cosmos DB SDK supports [running queries in parallel](performance-tips-query-sdk.md?pivots=programming-language-csharp) for better latency and throughput on your queries. We recommend setting the `MaxConcurrency` property within the `QueryRequestsOptions` to the number of partitions you have. If you aren't aware of the number of partitions, start by using `int.MaxValue`, which will give you the best latency. Then decrease the number until it fits the resource restrictions of the environment to avoid high CPU issues. Also, set the `MaxBufferedItemCount` to the expected number of results returned to limit the number of prefetched results. |
42
42
| <inputtype="checkbox"/> | Performance Testing Backoffs | When performing testing on your application, you should implement backoffs at [`RetryAfter`](performance-tips-dotnet-sdk-v3.md#sdk-usage) intervals. Respecting the backoff helps ensure that you spend a minimal amount of time waiting between retries. |
43
-
| <inputtype="checkbox"/> | Indexing | The Azure Cosmos DB indexing policy also allows you to specify which document paths to include or exclude from indexing by using indexing paths (IndexingPolicy.IncludedPaths and IndexingPolicy.ExcludedPaths). Ensure that you exclude unused paths from indexing for faster writes. For a sample on how to create indexes using the SDK[visit](performance-tips-dotnet-sdk-v3.md#indexing-policy)|
43
+
| <inputtype="checkbox"/> | Indexing | The Azure Cosmos DB indexing policy also allows you to specify which document paths to include or exclude from indexing by using indexing paths (IndexingPolicy.IncludedPaths and IndexingPolicy.ExcludedPaths). Ensure that you exclude unused paths from indexing for faster writes. For more information on how to create indexes using the SDK, see [performance tips .NET SDK v3](performance-tips-dotnet-sdk-v3.md#indexing-policy).|
44
44
| <inputtype="checkbox"/> | Document Size | The request charge of a specified operation correlates directly to the size of the document. We recommend reducing the size of your documents as operations on large documents cost more than operations on smaller documents. |
45
45
| <inputtype="checkbox"/> | Increase the number of threads/tasks | Because calls to Azure Cosmos DB are made over the network, you might need to vary the degree of concurrency of your requests so that the client application spends minimal time waiting between requests. For example, if you're using the [.NET Task Parallel Library](/dotnet/standard/parallel-programming/task-parallel-library-tpl), create on the order of hundreds of tasks that read from or write to Azure Cosmos DB. |
46
-
| <inputtype="checkbox"/> | Enabling Query Metrics | For more logging of your backend query executions, you can enable SQL Query Metrics using our .NET SDK. For instructions on how to collect SQL Query Metrics[visit](query-metrics-performance.md)|
46
+
| <inputtype="checkbox"/> | Enabling Query Metrics | For more logging of your backend query executions, you can enable SQL Query Metrics using our .NET SDK. For more information on how to collect SQL Query Metrics, see [query metrics and performance](query-metrics-performance.md).|
47
47
| <inputtype="checkbox"/> | SDK Logging | Log [SDK diagnostics](#capture-diagnostics) for outstanding scenarios, such as exceptions or when requests go beyond an expected latency.
48
48
| <inputtype="checkbox"/> | DefaultTraceListener | The DefaultTraceListener poses performance issues on production environments causing high CPU and I/O bottlenecks. Make sure you're using the latest SDK versions or [remove the DefaultTraceListener from your application](performance-tips-dotnet-sdk-v3.md#logging-and-tracing)|
The [``Database.CreateContainerAsync``](/dotnet/api/microsoft.azure.cosmos.database.createcontainerasync) method will throw an exception if a database with the same name already exists.
49
+
The [``Database.CreateContainerAsync``](/dotnet/api/microsoft.azure.cosmos.database.createcontainerasync) method throws an exception if a database with the same name already exists.
48
50
49
51
### Create a container asynchronously if it doesn't already exist
50
52
51
53
The following example creates a container asynchronously only if it doesn't already exist on the account:
The [``Database.CreateContainerIfNotExistsAsync``](/dotnet/api/microsoft.azure.cosmos.database.createcontainerifnotexistsasync) method will only create a new container if it doesn't already exist. This method is useful for avoiding errors if you run the same code multiple times.
57
+
The [``Database.CreateContainerIfNotExistsAsync``](/dotnet/api/microsoft.azure.cosmos.database.createcontainerifnotexistsasync) method only creates a new container if it doesn't already exist. This method is useful for avoiding errors if you run the same code multiple times.
The [``CosmosClient.CreateDatabaseAsync``](/dotnet/api/microsoft.azure.cosmos.cosmosclient.createdatabaseasync) method will throw an exception if a database with the same name already exists.
49
+
The [``CosmosClient.CreateDatabaseAsync``](/dotnet/api/microsoft.azure.cosmos.cosmosclient.createdatabaseasync) method throws an exception if a database with the same name already exists.
48
50
49
51
### Create a database asynchronously if it doesn't already exist
50
52
51
53
The following example creates a database asynchronously only if it doesn't already exist on the account:
The [``CosmosClient.CreateDatabaseIfNotExistsAsync``](/dotnet/api/microsoft.azure.cosmos.cosmosclient.createdatabaseifnotexistsasync) method will only create a new database if it doesn't already exist. This method is useful for avoiding errors if you run the same code multiple times.
57
+
The [``CosmosClient.CreateDatabaseIfNotExistsAsync``](/dotnet/api/microsoft.azure.cosmos.cosmosclient.createdatabaseifnotexistsasync) method only creates a new database if it doesn't already exist. This method is useful for avoiding errors if you run the same code multiple times.
Copy file name to clipboardExpand all lines: articles/cosmos-db/rate-limiting-requests.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,12 +149,14 @@ For more information, see: [Cache-Aside pattern](/azure/architecture/patterns/ca
149
149
150
150
### Materialized View pattern
151
151
152
-
You might pre-populate views into other collections after storing the data in Azure Cosmos DB when the data isn't ideally formatted for required query operations. This pattern can help support efficient querying and data extraction, and improve application performance.
152
+
You might prepopulate views into other collections after storing the data in Azure Cosmos DB when the data isn't ideally formatted for required query operations. This pattern can help support efficient querying and data extraction, and improve application performance.
153
153
154
154
For more information, see [Materialized View pattern](/azure/architecture/patterns/materialized-view).
155
155
156
156
## Next steps
157
157
158
+
* Explore an example implemented in Go, available on [GitHub](https://github.com/mspnp/go-batcher).
159
+
* Learn more about the [Rate Limiting pattern](/azure/architecture/patterns/rate-limiting-pattern) in the Azure Architecture Center.
158
160
* Learn how to [troubleshoot TooManyRequests errors](troubleshoot-request-rate-too-large.md) in Azure Cosmos DB.
159
161
* Learn how to [troubleshoot Timeout errors](troubleshoot-request-timeout.md) in Azure Cosmos DB.
160
162
* Learn how to [troubleshoot ServiceUnavailable errors](troubleshoot-service-unavailable.md) in Azure Cosmos DB.
@@ -163,5 +165,5 @@ For more information, see [Materialized View pattern](/azure/architecture/patter
163
165
* Learn about [Indexing policies](index-policy.md) in Azure Cosmos DB.
164
166
* Learn about [Autoscaling](provision-throughput-autoscale.md) in Azure Cosmos DB.
165
167
* Trying to do capacity planning for a migration to Azure Cosmos DB? You can use information about your existing database cluster for capacity planning.
166
-
* If all you know is the number of vcores and servers in your existing database cluster, read about [estimating request units using vCores or vCPUs](convert-vcore-to-request-unit.md)
168
+
* If all you know is the number of vCores and servers in your existing database cluster, read about [estimating request units using vCores or vCPUs](convert-vcore-to-request-unit.md)
167
169
* If you know typical request rates for your current database workload, read about [estimating request units using Azure Cosmos DB capacity planner](estimate-ru-with-capacity-planner.md)
0 commit comments