← All posts
· 3 min read

When should I use Azure Cosmos DB?

That is a common question, and getting it right can save you valuable time. Next, I will show you four selling points for Azure Cosmos DB and also the drawbacks that come with it.

Selling Points

Scale-Out Architecture

The first selling point of Azure Cosmos DB is its scale-out architecture, so no matter how much your workload increases, you won’t face scaling issues at the database layer. If you use SQL Server or Postgres instead, scaling would be your concern, and you would need DBAs to adjust to the increasing workload.

Two examples that profited from this kind of architecture are Vercel (1) and OpenAI (2). Both experienced scaling problems and solved them by switching to Azure Cosmos DB.

Global Distribution

The second selling point is that Azure Cosmos DB can be easily globally distributed with multi-write regions. So if you know you want to build a global app from day one, it’s worth considering as well. Global distribution is solved out of the box, so you can free up resources to tackle other problems.

Flexible Schemas

The third selling point is more about NoSQL in general. If you need flexible data schemas, it’s also worth considering using Azure Cosmos DB. For example, if you need to store AI outputs or are part of an early startup team where data models change frequently, you can benefit from that flexibility.

Low Latency

The last selling point is that Azure Cosmos DB has low latency out of the box. This can be useful for storing AI memory or for e-commerce apps that need fast response times even during busy times of the year.

Combined with its scale-out architecture, you can quickly serve as many customers as you have.

Drawbacks

No Joins Across Documents

If your application has many relationships and you’re used to joining tables, this won’t work in Azure Cosmos DB. A JOIN only works within a single document, not across documents.

Here you have two options.

Option 1: Join manually in code.

Option 2: Denormalize your data models.

The first option takes less development time but adds up on the bill later. The second option costs way more in development time but keeps the bill lower.

So if you have a relationship-heavy use case, be aware that you should either avoid Azure Cosmos DB or, if the selling points outweigh this drawback, plan how to deal with it.

No Transactions

Another drawback is that you lose transactions. Azure Cosmos DB supports transactions, but only within a single partition key in a single container.

Here you could try to implement transactions yourself in code, for example with a saga pattern and compensations, if the selling points are too compelling.

Otherwise, you’re best advised to use a SQL database in Azure, because it saves a lot of development time by not having to implement database transactions yourself.

Summary

In my opinion, Azure Cosmos DB has a strong use case in 4 scenarios:

  • AI agents
  • Seasonal apps like e-commerce or ticketing apps
  • IoT data storage
  • Global apps

So if your app can profit from Azure Cosmos DB’s scale-out architecture combined with low-latency writes and reads, then Azure Cosmos DB is a great choice.

If you have a regional app with predictable scale or a relationship/transaction heavy app, Azure Cosmos DB might not be your best option.

References

Keynote Interview: Vercel’s Guillermo Rauch on the Agent Era | Azure Cosmos DB Conf 2026 - YouTube (1)

Rapidly scaling online storage to serve over 1 billion ChatGPT users - OpenAI (2)