Stack Picker
a developer-grade decision engine
Back to the picker
Database

Cosmos DB

Azure's globally-distributed multi-model database.

Official site
Monthly cost
$25+ / mo
~$25+/mo provisioned
Popularity
3/5
LLM knowledge
4/5
Difficulty
Hard
#enterprise

What Cosmos DB is good at

Strengths
  • +Global distribution
  • +Multiple APIs
  • +SLA-backed latency
Tradeoffs
  • Expensive at scale
  • Complex pricing

Coding-agent prompt

You're working with Cosmos DB. Azure's globally-distributed multi-model database.

Best practices:
- Lean on: global distribution
- Lean on: multiple apis
- Lean on: sla-backed latency

Things to watch for:
- Watch out for: expensive at scale
- Watch out for: complex pricing

General guidance:
- Canonical docs: https://azure.microsoft.com/products/cosmos-db — check here before inventing APIs.
- Keep secrets in environment variables, never commit them.
- Write TypeScript where the ecosystem supports it; add types to every exported function.
- Add tests for the critical paths before declaring the task done.
- Read-the-docs is usually faster than guessing — cite the docs page in code comments when you apply a non-obvious pattern.

Beginner's guide to Cosmos DB

In one line: Azure's globally-distributed database — speaks multiple APIs (SQL, Mongo, etc).

Cosmos DB is Azure's answer to DynamoDB. It replicates your data globally with latency SLAs and lets you pick the query style (SQL, MongoDB, Cassandra, etc.).

Browse all categories