How to choose between provisioned throughput and serverless
APPLIES TO: NoSQL MongoDB Cassandra Gremlin Table
Azure Cosmos DB is available in two different capacity modes: provisioned throughput and serverless. You can perform the exact same database operations in both modes, but the way you get billed for these operations is radically different.
Detailed comparison
Criteria | Provisioned throughput | Serverless |
---|---|---|
Best suited for | Workloads with sustained traffic requiring predictable performance | Workloads with intermittent or unpredictable traffic and low average-to-peak traffic ratio |
How it works | For each of your containers, you configure some amount of provisioned throughput expressed in Request Units (RUs) per second. Every second, this quantity of Request Units is available for your database operations. Provisioned throughput can be updated manually or adjusted automatically with autoscale. | You run your database operations against your containers without having to configure any previously provisioned capacity. |
Geo-distribution | Available (unlimited number of Azure regions) | Unavailable (serverless accounts can only run in a single Azure region) |
Maximum storage per container | Unlimited | 1 TB1 |
Performance | < 10-ms latency for point-reads and writes covered by SLA | < 10-ms latency for point-reads and < 30 ms for writes covered by SLO |
Billing model | Billing is done on a per-hour basis for the RU/s provisioned, regardless of how many RUs were consumed. | Billing is done on a per-hour basis for the number of RUs consumed by your database operations. |
Estimating your expected consumption
In some situations, it may be unclear whether provisioned throughput or serverless should be chosen for a given workload. To help with this decision, you can estimate your overall expected consumption, or the total number of RUs you may consume over a month.
Next steps
- Read more about provisioning throughput on Azure Cosmos DB
- Read more about Azure Cosmos DB serverless
- Get familiar with the concept of Request Units