MongoDB Atlas vs CockroachDB: which fits your data model
A renewal, a licensing change or a data location rule is usually what forces this decision, so start with what the application needs from its database. Atlas fits teams with document data and MongoDB drivers: applications that store and query JSON-like documents and already call the MongoDB driver. CockroachDB fits teams that need distributed SQL with strong consistency across locations, where relational schemas, transactions and consistent writes in several regions are the requirement. Most teams can only choose after they check four things: the data model, where the data must physically live, the licensing terms, and how much operating work the team can carry over the next several years. Settle those four before comparing cluster prices, because a lower hourly rate does not help if the application cannot move.
Start with the code. List every MongoDB operation your services call, including aggregation pipelines, multi-document transactions, change streams and index types, and mark which ones depend on the document model. If most of your data already has a stable relational shape with joins and foreign keys, CockroachDB's SQL model may fit, but the schema and query work still has to be estimated by your own engineers. If your services depend on the MongoDB driver and flexible documents, the move is a rewrite of data access, and that effort belongs in the comparison from day one. Then record where each dataset must live. For each shortlisted option, confirm in writing which regions it can run in, who operates the infrastructure, and which backup and replication locations apply, because a managed service and a self-hosted deployment answer residency questions differently.
Licensing and operating work decide the rest. The MongoDB server released after October 16, 2018 is under the Server Side Public License v1.0, which is not OSI-approved, so self-managing MongoDB does not give you an open-source exit. CockroachDB releases from 24.3.0 onward fall under the CockroachDB Software License. The CockroachDB licensing FAQ says the Enterprise Free license is free only for businesses under $10M in annual revenue, counting affiliates, and must be renewed every year. Cockroach Labs also stated in a September 15, 2026 blog post that new source code will no longer be published to its public repository, so plan for vendor-supplied builds. On list prices, Atlas Dedicated starts at $56.94 a month and Cockroach Cloud Standard lists $0.092 per vCPU-hour. For relational workloads that do not need multi-region writes, PostgreSQL under the PostgreSQL License is the open-source path to compare first.
Which database fits which scenario
This table maps six common scenarios to the database that fits better, comparing MongoDB Atlas with CockroachDB and naming a self-hosted relational option where neither fits. Read each Why cell for the condition that makes the advantage matter, since most choices turn on driver compatibility, data location or license terms. The main takeaway is that Atlas favors MongoDB-driver applications and CockroachDB favors SQL across regions, while licensing and data location can override both.
| Scenario | Better fit | Why |
|---|---|---|
| Application built on MongoDB drivers and document schemas | MongoDB Atlas | Applies when the app depends on MongoDB drivers and document queries and a SQL rewrite is not planned. Atlas keeps the driver and document model without changes. |
| Team that needs SQL with distributed transactions across regions | CockroachDB | Applies when you need SQL and transactions across regions in one database. Confirm current feature and license terms in writing before you commit. |
| Small project on free tiers | MongoDB Atlas Free tier | Atlas Free offers $0 with 512 MB storage and up to 100 operations per second, enough for prototypes and tests only. |
| Requirement to run the database inside the organization's own data center | CockroachDB, self-hosted | Applies when data must stay in your facilities. Self-hosted CockroachDB runs under its license, and the free Enterprise option applies only below $10M annual revenue. |
| Team that must avoid proprietary server licenses | PostgreSQL or MySQL Community | Applies when licensing must be OSI-approved open source. MongoDB's SSPL is not OSI-approved, and CockroachDB uses its own license. |
| Team with standard relational workloads | PostgreSQL or MySQL, self-hosted | Applies when one region is enough. PostgreSQL supports each major version for 5 years, and version 14 ends November 12, 2026. |
Decision path: from data model to database choice
The path starts with the application's data model and asks whether the code uses MongoDB drivers and document schemas. If it does and a hosted service is acceptable, MongoDB Atlas is the direct fit. If the driver must stay but the data has to run on your own servers, FerretDB on PostgreSQL keeps the MongoDB wire protocol while storing data in PostgreSQL. SQL workloads split on consistency needs: CockroachDB suits distributed consistency across nodes or regions, while self-hosted PostgreSQL or MySQL covers standard relational workloads. Before choosing FerretDB, check its command coverage against your queries, and confirm the distributed consistency requirement with the application owners.
Decision path from the application data model to a database option.
MongoDB Atlas vs CockroachDB capabilities side by side
This table compares MongoDB Atlas and CockroachDB on data model, hosting, server licensing, free tiers, backup, export and restore rules. Read each row side by side, and where a cell says to confirm, check that point in the vendor's documentation before you decide. The main takeaway is that the licensing and free tier terms differ in ways that matter for self-managed use, so check them against your revenue, deployment and version plans.
| Capability | MongoDB Atlas | CockroachDB |
|---|---|---|
| Data model | Document database with collections of BSON documents, accessed through MongoDB drivers. | Distributed SQL database with relational tables and SQL queries. |
| Hosting options | Managed cloud service run by MongoDB in hyperscaler regions, with Flex and Dedicated clusters. | Self-hosted in your own infrastructure, or CockroachDB Cloud with Standard and Mission Critical plans. |
| Server license | SSPL v1.0 for releases after October 16, 2018 (not OSI-approved); AGPL v3.0 for earlier releases. | CockroachDB Software License from version 24.3.0 onward, plus patch fixes for 23.1 to 24.2 released from that date. |
| Source code access | Server releases remain licensed as listed above; confirm managed service terms with MongoDB. | Per a September 15, 2026 post, new source versions will no longer be published to its public repository. |
| Free tier | M0 free cluster with 512 MB storage, 32 MB sort memory and up to 100 operations per second. | Enterprise Free license at no charge for businesses under $10M in annual revenue, renewed yearly. Free clusters throttle after 7 days without telemetry. |
| Backup and restore | Scheduled and on-demand snapshots, continuous cloud backup, or downloaded snapshot files; collection or database restores. | Confirm backup, restore and scheduling options for your deployment type in the CockroachDB docs. |
| Export tools | mongodump binary export of documents, metadata, options and index definitions, including Flex clusters. | Confirm export options and formats in the CockroachDB docs before planning an exit. |
| Self-managed edition | MongoDB Enterprise Advanced, licensed through sales, with Enterprise Server, Ops Manager and consultative support. | Self-managed with Enterprise Free or paid Enterprise licenses; paid licenses are never throttled. |
| Restore compatibility | mongodump output restores into deployments on the same major version or feature compatibility version. | Confirm which versions can restore a backup or export, and any upgrade path, in the CockroachDB docs. |
How MongoDB Atlas vs CockroachDB pricing is structured
Atlas prices by cluster tier, and CockroachDB Cloud prices by vCPU-hour, so the same workload can land on different bills. The cards below cover each tier and the self-managed licenses, using the figures published on each vendor's pricing page. Check the storage, hours and vCPU count you actually need before comparing.
Atlas Free tier
The Atlas Free tier has no monthly charge, and MongoDB's FAQ lists its limits as 32 MB of sort memory and up to 100 operations per second. Those limits suit development, testing and short proof-of-concept work, and production sizing needs a separate plan. Before you plan a migration around it, check the current free tier terms in your project and confirm which features and regions it supports. Record any free clusters during your inventory, because they are easy to miss.
- Free storage
- 512 MB
Atlas Flex clusters
Flex is billed from $0.011 per hour and capped at a monthly amount, with 5 GB of storage in the published tier. The hourly rate with a monthly ceiling suits variable development, staging or small internal workloads, since you pay for the hours a cluster runs until the cap applies. Confirm how the cap interacts with storage and data transfer, and whether your region and features are available on Flex. Check whether the workload will outgrow 5 GB, because growth beyond it will need a tier change that you should plan for.
- Monthly ceiling
- $30
Atlas Dedicated clusters
Dedicated clusters start at $0.08 per hour and scale from 10 GB to 4 TB of storage across 2 to 96 vCPUs. The vCPU and storage tier sets the bill, so the first decision is how many vCPUs and gigabytes the workload needs at peak. Confirm which items beyond the tier rate, such as backups, data transfer and additional replica nodes, are billed separately. Request a monthly estimate for the exact configuration you plan to run before you commit.
- Starting monthly price
- $56.94
CockroachDB Cloud Standard
CockroachDB Cloud Standard bills per vCPU-hour, and the pricing page gives an example of about $203 a month for 2 vCPUs and 100 GB. The bill is driven by vCPU count, hours running and storage, so a cluster that scales its vCPUs changes the monthly figure directly. New Cloud organizations get a 30-day trial with $400 in credit, which is useful for evaluating the platform before committing. Confirm the storage rate separately, since the example's 100 GB is a single point, not a full pricing schedule.
- Per vCPU-hour
- $0.092
CockroachDB Cloud Mission Critical
Mission Critical uses a higher per-vCPU-hour rate than Standard, so each vCPU costs more for every hour it runs. Choose it when the workload's availability requirements justify that premium, and confirm which availability terms, regions and support levels the tier includes. Ask Cockroach Labs for a monthly estimate that uses your expected vCPU count, storage and hours. Compare that estimate with the cost of running a self-managed cluster, including the staff time to operate it.
- Per vCPU-hour
- $0.162
Self-managed licensing for both
Self-managed MongoDB server releases after October 16, 2018 fall under the SSPL, and MongoDB Enterprise Advanced is priced through sales, which includes its Enterprise Server, Ops Manager and Kubernetes Operator. CockroachDB releases from 24.3.0 onward fall under the CockroachDB Software License, and the Enterprise Free license covers businesses below the revenue limit, counting affiliates, and must be renewed every year. Confirm your revenue position with counsel, and ask both vendors for written terms before you plan a self-hosted deployment.
- Annual revenue limit
- $10M
What the SSPL and the CockroachDB Software License mean for self-hosting
Self-hosting MongoDB depends on which release line you run. MongoDB states that its database server and tools released after October 16, 2018 are licensed under the Server Side Public License v1.0, which is not an OSI-approved open source license. Versions released before that date are under the GNU AGPL v3.0. Patch fixes for earlier versions released after that date are also under the SSPL, so check the release date of each build in your change record. Ask counsel whether the SSPL's conditions on offering MongoDB to others as a service apply to your plan, especially if you run it for customers, partners or affiliates. Read the full terms on the MongoDB licensing page before you sign off.
CockroachDB uses a different arrangement. From version 24.3.0 onward, and for patch fixes to versions 23.1 through 24.2 released from that date, the software is under the CockroachDB Software License. Its Enterprise Free license is free of charge for businesses with less than $10M in annual revenue, counting the parent company and all affiliates, but it must be renewed every year. Confirm your revenue figure against that group definition, and put the renewal date in your operations calendar. If a Free license expires, Free clusters are throttled 30 days later and Trial clusters 7 days later, while paid Enterprise licenses are never throttled. Throttling also limits open SQL transactions to 5, so test your connection pooling against that limit before you rely on a Free license in production. Check the CockroachDB licensing FAQ for the terms that apply to your cluster type.
Source availability is the third term to plan for. In a September 15, 2026 blog post, Cockroach Labs stated that new versions of CockroachDB's source code will no longer be published to its public repository, and that the existing repository will no longer be maintained. For a self-hosted plan, your upgrade path therefore depends on the artifacts your agreement lets you obtain from the vendor. Record the versions you have verified, keep copies of the binaries you deploy, and ask the vendor in writing which distribution channel your contract covers. Have counsel review the license terms for your use, including affiliate counts, internal and customer-facing use, renewal obligations and any clauses on offering the software to others, before you commit a production system to either product.
Where the data lives and what leaving each product involves
Each product keeps data in a different place and offers different ways out. Atlas runs on infrastructure MongoDB operates, while CockroachDB's control depends on whether you self-host or use its cloud service. The cards cover data location, backup and restore, licensing effects on control, and what leaving each product costs.
Where Atlas data runs
Atlas clusters run in cloud regions operated by MongoDB, and your region choices are limited to what Atlas offers. The operator runs the database servers, backup system and underlying platform, so your control comes from access settings and region selection. Confirm which cloud providers and regions your tier supports, and ask where MongoDB support staff can reach data and whether that access is logged. If a residency rule requires your own administrators, document this gap before the contract renews.
How Atlas backups restore
Atlas cloud backup can restore from scheduled snapshots, on-demand snapshots, continuous cloud backup, or snapshot files you download locally. It supports collection-level and database-level restores, so one damaged collection does not force a full cluster restore. Each route has its own recovery point, retention setting and cost, so confirm them for your tier before you rely on a restore plan. Test a downloaded snapshot restore in a non-production environment, because an unread snapshot file proves little.
Atlas restore overviewCockroachDB deployment and licensing
CockroachDB releases from 24.3.0 onward fall under the CockroachDB Software License, so self-hosting alone does not give you open-source terms for new versions. The free Enterprise license covers businesses under $10M in annual revenue, counting the parent company and all affiliates, and it must be renewed every year. Free and Trial clusters face throttling, while paid Enterprise licenses are never throttled, so confirm which license each production cluster uses. Cockroach Labs also stated on September 15, 2026 that new source code will no longer be published to its public repository.
Licensing FAQsExit cost for each product
Leaving Atlas starts with mongodump, which writes a binary export of documents, metadata, options and index definitions. The output restores only into deployments on the same major version or feature compatibility version, so choose the target version before you dump. For CockroachDB, confirm export tooling and cloud data regions with Cockroach Labs' documentation before you commit to a plan. Exit cost follows three drivers: data volume, application SQL or driver dependencies, and the cutover window, which sets how long writes must be paused or synchronized.
mongodump referenceWhen PostgreSQL or MySQL fits better than either product
Neither MongoDB Atlas nor CockroachDB is the right answer when the goal is self-hosting under a permissive license for a standard relational workload. If your data is relational, your transactions are ordinary and your team can operate a database server, PostgreSQL is the usual starting point. It is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, which permits use, modification and redistribution with few conditions. Supported major versions are 18 (final release November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028) and 15 (to November 11, 2027). PostgreSQL 14 reached the end of its support window on November 12, 2026, so new deployments should start on 17 or 18, and any existing 14 cluster belongs on the upgrade plan now.
MySQL Community Edition is the other common choice. It is available under the GPL, so have your legal or compliance team confirm how that license applies to your planned use, especially if you embed or redistribute the software. It ships on two tracks. The LTS track follows the Oracle Lifetime Support Policy, with 5 years of premier and 3 years of extended support, and the download page lists 9.7.2 and 8.4.11 as LTS releases. The Innovation track, currently 26.7.0, is supported only until the next Innovation release, so it suits teams that can upgrade often. If the application must keep the MongoDB driver, FerretDB on PostgreSQL is the route, since it speaks the MongoDB 5.0+ wire protocol and stores data in PostgreSQL with the DocumentDB extension. Check your application's commands against FerretDB's compatibility list before you commit to that path.
Running either engine yourself means owning the operations that a managed service otherwise absorbs. PostgreSQL ships minor releases at least once every three months. Minor updates replace executables and restart the server without changing the storage format, so plan a recurring maintenance window and staff time for it. Major upgrades use pg_upgrade, a dump and restore with pg_dumpall, or logical replication, and each has a different downtime profile that your team should rehearse on a copy of production. Your team also owns backups with regular restore tests, high availability with tested failover, monitoring and on-call coverage. If your real requirement is distributed SQL across regions, do not assume PostgreSQL or MySQL covers it. Run your transaction patterns, failover behavior and latency tests against the candidate before any move.
What a move between MongoDB Atlas and CockroachDB involves
This sequence moves an application from MongoDB's document model to CockroachDB's distributed SQL model, with a tested target and a documented cutover at the end. The main work is remodeling documents into relational tables and rewriting queries, so the effort depends on how far the application relies on document-specific behavior. Each step names who does the work and the check that closes it.
Confirm the data model and driver dependencies
The application team and the database team list every Atlas collection, the shape of its documents, and the MongoDB driver version each service uses. They also flag features that need a different approach on CockroachDB, such as Atlas Search and change streams, along with any reliance on deeply nested documents, since each one changes the schema design. Effort grows with the number of services and the depth of nesting. This step is done when each collection has a proposed relational table design or a documented exception, and each driver dependency is marked for replacement or retention.
Inventory queries, indexes and transactions
The application team records every query, aggregation pipeline, update operator, index and multi-document transaction the application runs, with its location in code and how often it executes. Pipelines and operators that depend on document structure will need rewriting as SQL or as reworked application logic, and each transaction must be checked for the isolation behavior it assumes. Effort is driven by the number of distinct query shapes and how many depend on arrays inside documents. This step is done when every query has an owner, a test case and a planned replacement.
Choose the target and deployment model
The database team, often with an implementation partner, chooses between self-managed CockroachDB, Cockroach Cloud, PostgreSQL, MySQL or another relational option based on data location, operating skills and licensing. Cockroach Labs' licensing FAQ states that the Enterprise Free license is free only for businesses under $10M in annual revenue, counting the parent and all affiliates, and that it must be renewed every year. Cockroach Labs has also stated that new versions of its source code will no longer be published to its public repository. This step is done when a written decision record covers license, hosting region, support and an exit plan.
Export and load a test copy
The database team takes a consistent mongodump of a non-production Atlas copy or a restored snapshot, then transforms the documents into the target tables with a script or ETL tool. Mongodump output restores into deployments on the same major version or feature compatibility version, so plan the transform with that constraint in mind. Confirm CockroachDB's import and export options in Cockroach Labs' documentation before choosing a load method. This step is done when row counts, key ranges and sampled records match between the transformed data and the source, and every mismatch has an explanation.
Run application tests and a parallel period
The application team runs its test suite against CockroachDB, then replays production-like traffic or writes to both systems during a parallel period and compares the results. Transaction retry handling, isolation behavior, sort order and type handling are the first areas to check, and each mismatch needs a cause and a fix. The database team supports this work by monitoring load and error rates. Effort rises with the number of query shapes, the write volume and the number of services sharing the data. This step is done when read results match within an agreed tolerance, error patterns are understood, and cutover criteria are signed off in writing.
Cut over and retire the old cluster
The database team stops writes to Atlas, runs a final sync and confirms the copy is complete, then switches connection strings and driver configuration to CockroachDB. The Atlas cluster and its backups stay available for an agreed rollback window before anything is deleted. Retirement means archiving a final backup under the retention rules your compliance team requires, revoking access and removing or downgrading the Atlas project. This step is done when the application runs on CockroachDB, the rollback window closes without a rollback, and the archive and access revocation are recorded.
Questions buyers ask before comparing MongoDB Atlas and CockroachDB
What drives the cost of MongoDB Atlas and CockroachDB, and what should I ask for?
Cost depends on a different set of drivers for each product. MongoDB Atlas Free is $0 with 512 MB of storage, Flex runs from $0.011 per hour up to $30 a month with 5 GB, and Dedicated starts at $56.94 a month, per MongoDB's pricing page. CockroachDB Cloud Standard is listed at $0.092 per vCPU-hour, about $203 a month for 2 vCPUs and 100 GB, and Mission Critical at $0.162 per vCPU-hour, per Cockroach Labs' pricing page. For self-managed deployments, MongoDB Enterprise Advanced is priced through sales, and CockroachDB's enterprise license terms must be confirmed directly. In a quote, ask for the tier, storage and vCPU counts, replica and backup retention settings, support level, data transfer charges and the renewal price terms. Then add your own costs: servers, storage, staff time for patching and backups, and any migration work.
Are free tiers enough for a pilot, and what does CockroachDB throttling mean?
Free tiers can suit a short functional pilot, but their limits rule out most load testing. MongoDB's Atlas M0 free tier includes 512 MB of storage, 32 MB of sort memory and up to 100 operations per second. CockroachDB's Enterprise Free license is free for businesses with less than $10M in annual revenue, counting the parent company and all affiliates, and it must be renewed every year. Trial licenses require telemetry, and Free and Trial clusters are throttled after 7 days without telemetry. Throttling limits open SQL transactions to 5, so test your application's concurrency against that cap before the pilot starts. Free licenses throttle 30 days after expiration and Trial licenses 7 days after expiration, while paid Enterprise licenses are never throttled. Confirm current terms in the licensing FAQ before you start a pilot.
How long does a database migration off MongoDB Atlas or CockroachDB take?
No duration is given here because the time depends on the application. The factors that move it most are the number of collections or tables, total data volume, how many queries and drivers the application uses, whether it depends on multi-document transactions, how much downtime the business accepts, and how many environments need testing. A service with simple reads and writes and a short cutover window is a very different project from one with many transactional paths. Before agreeing to a date, ask for a written plan that covers an application inventory, the export and restore method (for example, mongodump for MongoDB), test cases, a cutover runbook and a rollback path. Use that plan to compare proposals on the same scope.
What does a database migration need from our engineering and operations team?
The migration depends on named owners on your side. An application owner should list the queries, drivers, transactions and reports the system uses. A data owner should confirm which data is in scope, how long it must be kept and who can approve its copy into a new environment. An operations owner should provide access to networks, servers or cloud accounts, backup storage and monitoring. Security and compliance staff should review encryption, access control, audit logging and data location before cutover. You also need a test environment close to production for application and restore tests, plus someone who can approve the cutover window and the rollback plan. Ask any implementation partner to list these dependencies in the written scope so the quote reflects them.
Can our internal team move a database to self-hosted PostgreSQL alone?
An internal team can run a self-hosted move alone if it already operates PostgreSQL in production and can give the project time for testing. Self-hosting shifts provisioning, high availability, backups and restore tests, monitoring, security patching and upgrades to your staff. PostgreSQL releases a new major version about once a year, minor releases at least every three months, and supports each major version for 5 years. Supported versions include 18 (to November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028) and 15 (to November 11, 2027). PostgreSQL 14 support ended on November 12, 2026, so any server still on it needs an upgrade plan. If your team has not run PostgreSQL before, bring in outside help for the migration and handover while keeping operations in-house. DeployOpen implements, hardens, backs up and documents self-hosted platforms in your own infrastructure, with scope agreed in writing first.
Can a renewal with CockroachDB or MongoDB Atlas be negotiated using a self-hosted option?
A credible self-hosted option can support a renewal discussion, but it does not guarantee different terms. Start with your contract's notice period, term length, termination rights, data return and exit help clauses, and any minimum commitments. For CockroachDB, confirm which license applies to your version: the CockroachDB Software License covers all versions from 24.3.0 onward and patch fixes for 23.1 to 24.2. Cockroach Labs also stated in a September 15, 2026 blog post that new versions of its source code will no longer be published to its public repository, and that the existing repository will no longer be maintained. For MongoDB, server and tools releases after October 16, 2018 fall under the Server Side Public License, so check which license your version uses. Ask the vendor for a written renewal quote, then compare it with a written self-hosted scope.
How DeployOpen helps evaluate and implement the database route
DeployOpen plans, implements, hardens, backs up and documents self-hosted open-source platforms in your own cloud accounts, data centers or air-gapped networks. For MongoDB Atlas vs CockroachDB, that means testing your workload against the candidate options before anything moves, then running the chosen platform under written scope.
How we scope
- The written scope lists which databases, applications, data sets and environments are covered for MongoDB Atlas vs CockroachDB.
- Scope also names the deployment target, such as your cloud account, a data center or an air-gapped network.
- Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts.
How we build
- Map the Atlas features your applications depend on, such as driver usage, indexes and transactions, against each candidate.
- Build the target environment in your infrastructure with access control, audit logging and backup configuration documented as you go.
- Rehearse export and restore on copies of your data before any production cutover is scheduled.
How we hand over
- Handover includes architecture notes, runbooks, configuration records and the evidence your compliance team asks for.
- Handover notes record the license terms that apply to each option, so your legal and procurement teams can review them.
- Your team receives the platform in your environment, with administrative access kept under your control.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainers can cover minor and major database upgrades, planned around your own change windows and maintenance policy.
- Ask for the support scope, response expectations and who owns the backup and restore procedures in the quote.

