Azure Cosmos DB Serverless
What you'll learn: How Azure Cosmos DB's serverless tier provides pay-per-use, multi-model database capabilities without capacity planning.
What Is Cosmos DB Serverless?
Azure Cosmos DB Serverless is a consumption-based pricing model where you pay only for the request units (RUs) consumed and storage used—no provisioned throughput required. Unlike traditional database services that require capacity planning, serverless mode automatically scales based on demand, making it ideal for intermittent workloads, development environments, or applications with unpredictable traffic patterns.
Think of it like a taxi versus owning a car: you only pay when you need rides, rather than maintaining infrastructure 24/7.
API Compatibility Options
Cosmos DB supports multiple APIs, allowing you to use familiar database interfaces:
- Core (SQL) API: Document-based queries using SQL-like syntax
- MongoDB API: Compatible with existing MongoDB drivers and tools
- Cassandra API: Wide-column store with CQL support
- Gremlin API: Graph database queries
- Table API: Key-value store compatible with Azure Table Storage
This flexibility means you can migrate workloads without rewriting application code, choosing the right data model for your use case.
Multi-Model Database Capabilities
Cosmos DB natively supports multiple data models within a single platform—documents, key-value, graph, and column-family structures. Each API provides a different view of the same underlying distributed storage engine, which handles global distribution, automatic indexing, and consistency guarantees uniformly.
In serverless mode, these multi-model capabilities remain fully available. You can store JSON documents via the SQL API while simultaneously accessing graph relationships through Gremlin—all billed per-request rather than reserved capacity.
Key Takeaway: Azure Cosmos DB Serverless eliminates capacity planning with pay-per-use billing while offering multi-API compatibility and multi-model flexibility, making it perfect for variable workloads in serverless architectures.