Azure Cosmos DB database services for production teams.
JusDB provides Azure Cosmos DB services for scoped projects, ongoing remote DBA coverage, and production support. Our engineers work in your Azure subscriptions on partition keys, request units per second (RU/s), consistency, failover, and backups across the Cosmos DB APIs. 24x7 on-call is available under your service agreement.
Or request a free audit of one database instance. Already in an incident? See how incidents are handled.
- NDA before access
- Read-only by default
- Changes measured against your baseline
Cosmos DB API status
Pick the API you run
Azure Cosmos DB for NoSQL
Native APIThe native API, and the one Microsoft suggests for most new applications that need global scale.
Hierarchical partition keys, per-partition automatic failover, and Fabric mirroring are NoSQL only.
Review your Cosmos DB designAzure Cosmos DB for MongoDB (RU)
SupportedMongoDB drivers over the wire protocol, on the request-unit engine with multi-region writes.
The former vCore option is now Azure DocumentDB, which Microsoft suggests for MongoDB migrations.
See MongoDB servicesAzure Cosmos DB for Apache Gremlin
SupportedA managed property graph database, queried with Gremlin traversals.
For analytical graphs or Gremlin migrations, Microsoft now points to Graph in Microsoft Fabric.
Plan a graph migrationAzure Cosmos DB for PostgreSQL
RetiringRetires on 31 March 2029, and Microsoft no longer recommends it for new projects.
Microsoft's migration target is elastic clusters in Azure Database for PostgreSQL, built on Citus.
Plan the move to PostgreSQLAPI status from Microsoft Learn and the Azure Updates retirement notice, checked 28 October 2026.
- Platforms
- NoSQL, MongoDB, Apache Cassandra, Apache Gremlin, and Table APIs, in your Azure subscriptions
- High availability
- Availability zones, read regions with failover priorities, multi-region writes, and continuous backup
- Incidents
- Initial-response targets are set in your service agreement. See the targets
Symptoms
Eight Cosmos DB problems we are asked to fix
Each one has a cause we can measure. The scoping call starts from the symptom you see and the API and throughput mode involved.
Requests return 429 while the container has RU/s to spare because throughput divides evenly across physical partitions (each serves at most 10,000 RU/s), and one hot key value uses up its partition's share.
A large tenant stops taking writes at 20 GB because one partition key value holds at most 20 GB, and the key cannot change without a new container.
Queries cost far more RUs than point reads because they omit the partition key, so every physical partition runs them (a fan-out query) and adds to the charge.
Writes cost more RUs than the team planned because the default indexing policy indexes every property, including ones no query filters on.
Backups reach back eight hours at most because periodic backup mode, by default, takes a full backup every 4 hours and keeps only the latest two.
Users miss their own updates after a load balancer switches servers because session consistency follows each client's session token, and the other server's client does not have the token from that write.
Concurrent edits in two write regions overwrite each other because the default conflict policy keeps the version with the highest timestamp (last write wins).
Nobody has restored from backup so the team has not seen a restore create a new account without your firewall rules or private endpoints.
If one of these is costing your team time, a scoping call is the place to start.
Book a 30-min scoping call (opens Google Calendar in a new tab)Region failover
How a write region outage stops Cosmos DB writes
With one write region, Cosmos DB copies each write to the other regions asynchronously, unless the account uses strong consistency. If that region fails, writes stop until a failover completes, and Microsoft's service-managed failover can take an hour or more.
One write region, two read regions, three outcomes
Choose a state to see where the writes go.
Application and routing
The SDK sends writes to region 1 and reads to the first available region in its list.
Region 1
Write region: takes every write
Healthy
Region 2
Read region, failover priority 1
Replicating
Region 3
Read region, failover priority 2
Replicating
Every region holds a copy of the data, and read regions can trail region 1 slightly.
Application and routing
Writes fail while the account waits for service-managed failover. Reads continue elsewhere.
Region 1
Outage, holding writes not yet copied out
Unavailable
Region 2
Next in failover priority, still read only
Waiting
Region 3
Serving reads
Read only
Nobody has practiced a forced failover, so the team waits for Microsoft, which can take an hour or more. Writes that region 1 never copied out could be lost.
Application and routing
The runbook takes region 1 offline (a forced failover), and writes move to region 2.
Region 1
Offline, and returns later as a read region
Offline
Region 2
Promoted by the forced failover
Write region
Region 3
Serving reads
Read region
Writes resume without waiting for Microsoft, but unreplicated writes can still be lost: Microsoft states an RPO under 15 minutes for session consistency. We read them from the conflict feed once region 1 is back.
We usually keep one write region with failover priorities, adding per-partition automatic failover (PPAF) where the API for NoSQL and your SDK versions allow it. Multi-region writes need a conflict policy and rule out strong consistency, the only level for which Microsoft states an RPO of zero.
We alert on Azure Resource Health and Service Health, since Microsoft does not automatically report region outages to you. The runbook covers the forced failover, private DNS for private endpoints, and the conflict feed, rehearsed with service-managed failover turned off, as Microsoft advises.
What we cover
Full-spectrum Cosmos DB engineering
From one hot partition key to a multi-region design, RU charges and Azure Monitor metrics drive every change.
RU/s sizing and optimization
We size RU/s from what your real operations cost, and remove waste before you buy more.
- Hot keys found in RU logs and spread with hierarchical keys
- Indexing policies trimmed to the paths your queries use
- Manual, autoscale, or serverless chosen from your traffic
Multi-API strategy
Each workload on the API that fits it, checked against Microsoft's product changes.
- NoSQL, MongoDB, Cassandra, Gremlin, or Table, per workload
- Azure DocumentDB or Azure Managed Instance for Apache Cassandra for migrations
- Moves off Azure Cosmos DB for PostgreSQL before 31 March 2029
Global distribution and multi-region writes
Regions and failover chosen for the data loss and downtime you can accept (RPO and RTO).
- Failover priorities, forced failover runbooks, or per-partition automatic failover
- Multi-region writes with last write wins or a merge procedure
- Drills run with service-managed failover turned off
Consistency level design
The weakest level each workload accepts, since strong and bounded staleness reads cost about twice the RUs.
- Session tokens shared so users read their own writes
- Bounded staleness limits, at least 100,000 writes or 300 seconds across regions
- Strong consistency only with a single write region
Synapse Link and Fabric mirroring
Analytics without an extract pipeline (ETL), through Fabric mirroring now that Microsoft no longer supports Synapse Link for new projects.
- Synapse Link workloads moved to Fabric mirroring
- Continuous backup turned on first, as mirroring requires
- Analytics that use no RUs from your containers
Integrated vector search
Vectors stored with your data, so one query can filter and rank them.
- A flat, quantizedFlat, or DiskANN index chosen per workload
- Vector policies set before loading, as changing one means dropping it first
- Recall and RU charges measured on your own data
Incident support
A critical (P1) page, answered within your agreement's target
JusDB keeps your recovery procedures (runbooks) written down, so an incident starts from a known plan instead of a blank page.
Initial-response targets
2 to 4 hours
Business hours
During covered business hours
15 minutes
24x7 on-call
P1 incidents
Production database down, primary unreachable, data corruption risk, or active failover event.
Severe latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.
Non-critical slow query regression, staging issue, backup warning, or replication check alert.
Configuration question, index advisory, planned schema review, or general operational request.
Our engineering team is in India; business-hours coverage is Mon–Fri 09:00–18:00 IST (UTC+5:30), and 24x7 on-call is available under your service agreement.
Initial-response targets, not resolution guarantees. The target for your engagement is set in your service agreement.
What happens on a P1 page
Page
You page the on-call engineer
Through the escalation path your service agreement names.
Triage
Root cause from Azure Monitor and diagnostic logs
Normalized RU consumption by partition key range, and the CDBPartitionKeyRUConsumption log, name the container and key behind the 429s.
Mitigate
Stabilize first, from the runbook
Raise RU/s on the hot container or take a failed write region offline, then fix the cause once production is steady.
After
A review after every P1
What happened, why, and the change that stops it happening again.
Before and between incidents
- Your setup, written down firstDuring onboarding we record your accounts, APIs, partition keys, regions, consistency, and backup mode, so an incident starts with context.
- One escalation path, in writingYour service agreement names how to reach the on-call engineer, in which hours, and the Azure roles our engineers may use.
- Reviews between incidentsWe review RU use, 429 rates, partition skew, replication, and restore readiness, and report open risks with next steps.
- Service changes trackedWe track Microsoft's Cosmos DB changes, such as API retirements and new defaults, and plan the work they require.
Process
How a Cosmos DB engagement runs, step by step
Written findings come before any change. Your team approves production changes, except routine actions you have pre-approved.
Scoping call
Your accounts, APIs, regions, throughput modes, and what you need covered.
Read-only review under NDA
Our engineers use Azure roles limited to read access, then read your account settings, indexing policies, Azure Monitor metrics, and diagnostic logs.
A written report before any change
Each finding comes with the change we propose, how we will measure it, and a way to undo it (a rollback plan).
Changes, then handover
We test risky changes on a copy of the container, apply them in the windows you approve, and hand over updated operating instructions (runbooks).
Step one is a 30-minute scoping call.
Book a 30-min scoping call (opens Google Calendar in a new tab)Ways to work
Choose the Cosmos DB service your team needs
Start with the responsibility you need covered. Each engagement has its own scope, deliverables, access requirements, and acceptance criteria.
Projects
Scoped Cosmos DB projects
A defined piece of work with written findings, hands-on changes, and validation against your baseline.
- Cosmos DB consultingPartition keys, RU/s, API choice, consistency, and region design, scoped as one project.
- Database migrationMoves between APIs, to a new partition key, or off Azure Cosmos DB for PostgreSQL.
- High availabilityRegion layout, failover priorities, and forced failover drills.
- Backup and disaster recoveryContinuous backup tiers, point-in-time restores, and restore drills.
Ongoing
Ongoing coverage and support
JusDB monitors the databases, carries out the agreed maintenance, and responds to incidents during the coverage the proposal names. The team keeps a change record, recovery procedures, and a review after every P1.
Where your Cosmos DB runs, and the tools around it
Your team and ours
What fully managed Cosmos DB still leaves to your team
Managed cloud databases automate much of the infrastructure layer, but your team still owns query performance, capacity, cost, and incident decisions.
| Question | Provisioned throughput | Serverless |
|---|---|---|
| Capacity planning | Your team sets RU/s per container or database, by hand or as an autoscale maximum. | None up front. Each container starts at 5,000 RU/s and grows with its physical partitions. |
| Billing | Hourly, for the RU/s provisioned, used or not. Autoscale bills each hour at its peak. | Hourly, for the RUs your operations consume, plus storage. |
| Regions | As many Azure regions as you need, with one or several write regions. | One Azure region, and regions cannot be added later. |
| Sudden spikes | Autoscale scales instantly, but a momentary spike may not take it to its maximum. Requests above the RU/s available return 429 errors. | Each physical partition serves up to 5,000 RU/s, so a hot key still throttles. |
| Changing mode | Moving to serverless means a new serverless account. | An API for NoSQL account can switch to provisioned throughput once, with no way back. |
Your team keeps control
- Set business priorities, application requirements, and release plans
- Approve production changes, except routine actions you have pre-approved
- Own your cloud accounts, access policies, and vendor relationships
- Decide when maintenance can happen and how quickly service must recover
- Move the work in-house or to another provider after your agreement's notice period, with your data returned or deleted and the transition help your agreement sets out (Terms, section 8)
JusDB handles the agreed database work
- Monitor database health, investigate alerts, and involve the right people
- Review query performance, replication, capacity, and backup health
- Carry out approved changes and update the operating instructions they affect
- Report completed work, open risks, and recommended next steps
Weighing provisioned throughput against serverless? We compare both against your workload on a scoping call.
Book a 30-min scoping call (opens Google Calendar in a new tab)Further reading
Guides on partitions and regions, and a comparison
Blog guides on partition design and multi-region architecture, plus our DynamoDB comparison.
Guide
Partitioning and sharding techniques
Shard key criteria, cross-shard queries, and resharding, the trade-offs behind a partition key.
Guide
Multi-region database architecture
Switchover against failover, measurable recovery objectives, and a cross-region drill runbook, shown on Aurora.
Comparison
DynamoDB vs Cosmos DB
Capacity units against request units, hot partitions in both, and migration paths in each direction.
FAQ
Common Cosmos DB questions
What buyers ask about fit, request units, consistency, APIs, regions, vector search, and DynamoDB.
Still have a question?
Ask it on a scoping call. No production access needed.
Book a 30-min scoping call (opens Google Calendar in a new tab)What is Azure Cosmos DB and where does it fit?
JusDB recommends Azure Cosmos DB for applications on Azure that need fast reads and writes at scale. It is Microsoft's fully managed NoSQL and vector database, with NoSQL, MongoDB, Apache Cassandra, Apache Gremlin, and Table APIs. Microsoft points analytics to Microsoft Fabric and highly relational applications to Azure SQL.
RU/s: what does it really mean and how to size it?
JusDB sizes Cosmos DB throughput in request units per second (RU/s), which every read, write, and query consumes. A point read of a 1 KB item by its ID and partition key costs 1 RU, while queries, larger items, and more indexed properties cost more. We read the RU charges of your real operations, then choose manual throughput, autoscale, or serverless.
Five consistency levels: when does tunable consistency matter?
JusDB starts most Cosmos DB accounts on session consistency, the default, which lets a client read its own writes. The five levels, strongest first, are strong, bounded staleness, session, consistent prefix, and eventual. Tuning matters across regions: strong and bounded staleness reads cost about twice the RUs, and multi-region writes rule out strong consistency.
Multi-API: is the MongoDB API really compatible?
JusDB treats Azure Cosmos DB for MongoDB (RU) as compatible at the wire protocol, not as MongoDB itself. Supported commands depend on the server version: on 6.0, $lookup with let and pipeline returns an error. For MongoDB Query Language features, Microsoft points to Azure DocumentDB, formerly the vCore option. We test your real queries first.
Multi-master vs single-master multi-region?
JusDB keeps most Cosmos DB accounts on one write region, adding multi-region writes (multi-master) only when users in several regions must write locally. With one write region, an outage there stops writes until a failover completes. With several, writes move to another region, but concurrent updates to one item conflict, and by default the highest timestamp wins.
Integrated vector search: production-ready?
JusDB runs vector search in Azure Cosmos DB for NoSQL in production only after measuring recall and RU charges on your data. Flat indexes take up to 505 dimensions, and quantizedFlat or DiskANN indexes need 1,000 vectors before they replace a full scan. Accounts with shared throughput cannot use it, and it cannot be turned off once enabled.
Cosmos DB vs DynamoDB: when to pick which?
JusDB usually follows your cloud: Azure Cosmos DB on Azure, and Amazon DynamoDB on AWS. Cosmos DB adds a choice of APIs and five consistency levels, and charges every operation in request units. DynamoDB, AWS's serverless key-value and document database, bills per request or in provisioned capacity units. Our DynamoDB vs Cosmos DB comparison covers moving either way.
Next step
Talk to a Cosmos DB engineer about your databases
Tell us what is slow, fragile, or due to change. The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance, subject to availability: mutual NDA before read-only access, a prioritized report within one week after access is ready, and no obligation.
NDA before access, read-only by default, and written scope first
Compare with other databases
If you are weighing alternatives, these are the databases most often compared with this one.
DynamoDB
The AWS counterpart for serverless key-value and document data. Multi-cloud teams compare capacity models and consistency options.
MongoDB
Cosmos DB offers an API for MongoDB, so teams compare it with MongoDB Atlas or self-managed MongoDB on features, version support, and cost.
Cassandra
Azure Cosmos DB for Apache Cassandra speaks CQL, so Cassandra teams compare it with running their own clusters.
SQL Server
The relational choice on Azure. Teams decide which data belongs in SQL Server or Azure SQL Database and which belongs in Cosmos DB.