Database / Azure Cosmos DB interview questions
What is provisioned throughput vs autoscale vs serverless in Cosmos DB?
Cosmos DB offers three throughput provisioning models, and choosing the right one significantly affects cost and performance:
Provisioned Throughput (Manual) — You pre-set a fixed RU/s number (minimum 400) that is guaranteed and always available. The cost is flat per hour regardless of actual usage. Best when you have a stable, predictable workload and need guaranteed performance. You can change the provisioned value at any time, but scaling down has limits (cannot drop below 10% of the highest RU/s set in the past hour).
Autoscale — You set a maximum RU/s ceiling (e.g., 10,000 RU/s), and Cosmos DB automatically scales between 10% of the max (1,000 RU/s) and the max based on actual workload. You are billed for the highest RU/s reached in any one-hour window. This eliminates over-provisioning during off-peak hours while still providing burst capacity. Best for variable workloads with unpredictable spikes.
Serverless — No pre-provisioning at all. You are billed only for the RU/s actually consumed per operation, plus storage. The per-RU rate is higher than provisioned, but there is no charge for idle time. A serverless account is limited to a single region, 50 GB of storage, and lower burst RU/s compared to provisioned. Best for development, testing, or workloads that are truly sporadic (hours or days between activity).
| Model | Billed On | Multi-Region | Best For |
|---|---|---|---|
| Provisioned | Provisioned RU/s (always) | Yes | Steady, predictable load |
| Autoscale | Peak RU/s per hour | Yes | Variable with defined maximum |
| Serverless | RU/s consumed + storage | No | Dev/test, sporadic workloads |
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
