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
You can add and remove regions to your Azure Cosmos DB account at any time. The throughput that you configure for various Azure Cosmos DB databases and containers is reserved in each region associated with your account. If the throughput provisioned per hour, that is the sum of RU/s configured across all the databases and containers for your Azure Cosmos DB account is `T` and the number of Azure regions associated with your database account is `N`, then the total provisioned throughput for your Azure Cosmos DB account, for a given hour is equal to `T x N RU/s`.
16
+
You can add and remove regions to your Azure Cosmos DB account at any time. The throughput that you configure for various Azure Cosmos DB databases and containers is reserved in each region associated with your account. If the throughput provisioned per hour that is the sum of request units per second (RU/s) configured across all the databases and containers for your Azure Cosmos DB account is `T` and the number of Azure regions associated with your database account is `N`, then the total provisioned throughput for your Azure Cosmos DB account, for a given hour is equal to `T x N` RU/s.
16
17
17
-
Provisioned throughput with single write region costs $0.008/hour per 100 RU/s and provisioned throughput with multiple writable regions costs $0.016/per hour per 100 RU/s. To learn more, see Azure Cosmos DB [Pricing page](https://azure.microsoft.com/pricing/details/cosmos-db/).
18
+
Provisioned throughput with single write region and provisioned throughput with multiple writable regions can vary in cost. For more information, see [Azure Cosmos DB pricing](https://azure.microsoft.com/pricing/details/cosmos-db/).
18
19
19
20
## Costs for multiple write regions
20
21
21
-
In a multi-region writes system, the net available RUs for write operations increases `N` times where `N` is the number of write regions. Unlike single region writes, every region is now writable and supports conflict resolution. From the cost planning point of view, to perform `M` RU/s worth of writes worldwide, you will need to provision M `RUs`at a container or database level. You can then add as many regions as you would like and use them for writes to perform `M` RU worth of worldwide writes.
22
+
In a multi-region writes system, the net available RU/s for write operations increases `N` times where `N` is the number of write regions. Unlike single region writes, every region is now writable and supports conflict resolution. From the cost planning point of view, to perform `M` RU/s worth of writes worldwide, you need to configure `M` RU/s at a container or database level. You can then add as many regions as you would like and use them for writes to perform `M` RU/s worth of worldwide writes.
22
23
23
24
### Example
24
25
25
-
Consider that you have a container in West US configured for single-region writes, provisioned with throughput of 10K RU/s, storing 0.5 TB of data this month. Let’s assume you add a region, East US, with the same storage and throughput and you want the ability to write to the containers in both the regions from your app. Your new total monthly bill (assuming 730 hours in a month) will be as follows:
26
+
Consider that you have a container in a single-region write scenario. That container is provisioned with throughput of `10K` RU/s and is storing `0.5` TB of data this month. Now, let’s assume you add another region with the same storage and throughput and you want the ability to write to the containers in both regions from your app.
27
+
28
+
This example details your new total monthly consumption:
29
+
30
+
|| Monthly usage |
31
+
| --- | --- | --- |
32
+
|**Throughput bill for container in a single write region**|`10K RU/s * 730 hours`|
33
+
|**Throughput bill for container in multiple write regions (two)**|`2 * 10K RU/s * 730 hours`|
34
+
|**Storage bill for container in a single write region**|`0.5 TB (or 512 GB)`|
35
+
|**Storage bill for container in two write regions**|`2 * 0.5 TB (or 1,024 GB)`|
|Throughput bill for container in West US (single write region) |10K RU/s * 730 hours |$0.008 per 100 RU/s per hour |$584 |
30
-
|Throughput bill for container in 2 regions - West US & East US (multiple write regions) |2 * 10K RU/s * 730 hours |$0.016 per 100 RU/s per hour |$2,336 |
31
-
|Storage bill for container in West US |0.5 TB (or 512 GB) |$0.25/GB |$128 |
32
-
|Storage bill for container in 2 regions - West US & East US |2 * 0.5 TB (or 1,024 GB) |$0.25/GB |$256 |
37
+
> [!NOTE]
38
+
> This example assumes 730 hours in a month.
33
39
34
40
## Improve throughput utilization on a per region-basis
35
41
36
-
If you have inefficient utilization, for example, one or more under-utilized read regions you can take steps to make the maximum use of the RUs in read regions by using change feed from the read-region or move it to another secondary if over-utilized. You will need to ensure you optimize provisioned throughput (RUs) in the write region first. Writes cost more than reads unless very large queries so maintaining even utilization can be challenging. Overall, monitor the consumed throughput in your regions and add or remove regions on demand to scale your read and write throughput, making to sure understand the impact to latency for any apps that are deployed in the same region.
42
+
If you have inefficient utilization, you can take steps to make the maximum use of the RU/s in read regions by using change feed from the read-region. Or, you can move to another secondary if over-utilized. For example, one or more under-utilized read regions is considered inefficient. You need to ensure you optimize provisioned throughput (RU/s) in the write region first.
37
43
38
-
## Next steps
44
+
Writes cost more than reads for most cases excluding large queries. Maintaining even utilization can be challenging. Overall, monitor the consumed throughput in your regions and add or remove regions on demand to scale your read and write throughput. Make sure to understand the effect to latency for any apps that are deployed in the same region.
39
45
40
-
Next you can proceed to learn more about cost optimization in Azure Cosmos DB with the following articles:
46
+
## Related content
41
47
42
-
* Learn more about [Optimizing for development and testing](optimize-dev-test.md)
43
-
* Learn more about [Understanding your Azure Cosmos DB bill](understand-your-bill.md)
44
-
* Learn more about [Optimizing throughput cost](optimize-cost-throughput.md)
45
-
* Learn more about [Optimizing storage cost](optimize-cost-storage.md)
46
-
* Learn more about [Optimizing the cost of reads and writes](optimize-cost-reads-writes.md)
47
-
* Learn more about [Optimizing the cost of queries](./optimize-cost-reads-writes.md)
48
-
* Trying to do capacity planning for a migration to Azure Cosmos DB? You can use information about your existing database cluster for capacity planning.
49
-
* 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)
50
-
* 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)
48
+
- Learn more about [Optimizing for development and testing](optimize-dev-test.md)
49
+
- Learn more about [Understanding your Azure Cosmos DB bill](understand-your-bill.md)
50
+
- Learn more about [Optimizing throughput cost](optimize-cost-throughput.md)
51
+
- Learn more about [Optimizing storage cost](optimize-cost-storage.md)
52
+
- Learn more about [Optimizing the cost of reads and writes](optimize-cost-reads-writes.md)
53
+
- Learn more about [Optimizing the cost of queries](./optimize-cost-reads-writes.md)
0 commit comments