This post has been republished via RSS; it originally appeared at: Microsoft Developer Blogs.
This blog post was co-authored by Nikisha Reyes-Grange, Senior Product Marketing Manager, Azure Marketing. We are beyond excited to announce that Azure Cosmos DB serverless is now available in preview on the Core (SQL) API, with support for the APIs for MongoDB, Gremlin (graph), Table, and Cassandra coming soon. This new consumption-based model lets you use your containers cost-effectively, without having to provision any throughput.What is serverless on Azure Cosmos DB?
Announced at the Build conference this past May, serverless radically changes the way you use and pay for your Azure Cosmos DB resources. Until now, your only option for running a workload on Azure Cosmos DB has been to provision throughput. This throughput, expressed in Request Units (RUs) per second, is dedicated to your usage and available for your database operations to consume. This model comes with low-latency and high-availability SLAs, making it a great fit for high-traffic applications needing guaranteed performance - but not as well-suited to light traffic scenarios. Serverless is a cost-effective option for databases with sporadic traffic patterns and modest bursts. When your resources sit idle most of the time, it doesn’t make sense to provision and pay for unneeded per-second capacity. As a consumption-based option, serverless eliminates the concept of provisioned throughput and instead charges you for the RUs your database operations consume. Check this video for a visual comparison between provisioned throughput and serverless:Differences with provisioned throughput
Serverless containers expose the same capabilities as containers created in provisioned throughput mode. This means that you manage your resources and read, write and query your data the exact same way. Where serverless accounts and containers differ from those using provisioned throughput is:Provisioned throughput | Serverless | |
Maximum number of Azure regions per account | unlimited | 1 |
Maximum throughput burstability per container | unlimited | 5,000 RU/s |
Maximum storage per container | unlimited | 50 GB |
Use-cases
Because serverless is much more cost-effective in situations where you deal with light traffic and don’t need provisioned capacity, it naturally fits the following use-cases:- Development
- Testing
- Prototyping
- Proofs of concept
- Non-critical applications with sparse traffic
- In provisioned throughput mode, you would have to provision a container with 500 RU/s for a monthly cost of: $0.008 * 5 * 730 = $29.20
- In serverless mode, you would only pay for the consumed RUs: $0.25 * 20 = $5.00
Getting started
You must create a new Azure Cosmos DB account from the Azure portal to get started with serverless. When creating your new account, select Core (SQL) as the API type, then Serverless (preview) under Capacity mode:
