Skip to content

MongoDB Atlas alternatives: DocumentDB, FerretDB and a document database you can branch

Updated 10 min readMongoDBDocumentDBFerretDBDatabases

Short version: Layerbase hosts two MongoDB-compatible engines, and both keep your existing driver and mongodb:// connection string. DocumentDB is the open-source, MIT-licensed engine with its own MongoDB-compatible gateway, and it is now on our Free plan. FerretDB is the Apache 2.0 option, starts on Solo, and is where our guided Atlas import lands today. Instead of an hourly per-tier meter you get a free plan or a flat monthly price, and you get branching that Atlas does not offer at any tier. At matching memory, Atlas M20 and M30 list at roughly 4x and 6x our flat dedicated prices. The catch is compatibility: neither engine is the MongoDB server, and if your app leans on Atlas Search, change streams or $lookup, you should test hard or stay on Atlas.

Prefer video? Watch the Atlas to DocumentDB migration in the Layerbase walkthrough, or see the chapter guide.

Start with the part most posts like this bury. Layerbase does not host MongoDB. We cannot, for licensing reasons: the MongoDB server is under the SSPL, which no independent host can offer as a service. So the two targets are:

  • DocumentDB, the open-source project that started at Microsoft and is now a Linux Foundation project. It stores BSON documents in PostgreSQL and ships its own gateway. This is not Amazon DocumentDB, which is an unrelated AWS service with the same name. You can create one on the Free plan: 2 databases, 5 GB, no card.
  • FerretDB, which implements the MongoDB wire protocol in front of PostgreSQL using the same DocumentDB extension underneath. It has the longer track record on Layerbase and the guided migration.

With either one, your driver does not change, your connection string format does not change, and ordinary find, insertOne and aggregation pipelines keep working. A few things do change. For FerretDB, text indexes and $text, change streams and $lookup are the gaps that catch people, and the FerretDB compatibility rundown lists the rest. DocumentDB has its own compatibility profile, so test your queries, indexes and aggregation pipelines against it in a disposable database. Do that before anything else in this post matters.

If you are comparing more broadly, including Azure, AWS, Google Cloud, Couchbase and plain PostgreSQL, the MongoDB alternatives post covers those.

The prices

Atlas rates verified 2026-08-25 and rechecked 2026-11-03 from mongodb.com/pricing, converted at 730 hours per month, compute only.

PlanRateMonthlyvCPU / RAM / Storage
Atlas Free (M0)free$0shared / 512 MB storage
Atlas Flex$0.011/hrcapped at $30shared
Atlas M10$0.08/hrabout $582 / 2 GB / 10 GB
Atlas M20$0.20/hrabout $1462 / 4 GB / 20 GB
Atlas M30$0.54/hrabout $3942 / 8 GB / 40 GB
Layerbase Dedicated 4GBflat$352 / 4 GB / 25 GB
Layerbase Dedicated 8GBflat$654 / 8 GB / 50 GB
Layerbase Dedicated 16GBflat$1202 / 16 GB / 100 GB

The Atlas monthly figures are compute alone. Storage past what the tier includes, backups, and egress all bill on top. Our prices are flat and include the storage listed, the backups, and the transfer.

At matching memory, Atlas lists at roughly 4x our flat price (M20 against our 4GB) and roughly 6x (M30 against our 8GB), before any of the metered extras.

One caveat that belongs right here rather than in a footnote: an Atlas M-tier is a three-node replica set. Our dedicated preset is a single node with backups and branching. That is a price-for-workload comparison, not an architecture-parity comparison. If you need a replica set today, Atlas has something we do not.

The performance question

We ran YCSB against MongoDB 8.0 and FerretDB 2.7 on the exact hardware behind the $65 preset, 4 vCPU and 8 GB of RAM, with a working set larger than RAM.

YCSB workload, 64 client threadsMongoDB 8.0 stockFerretDB tuned
50% read / 50% update464 ops/sec1,752 ops/sec
100% readabout 750 ops/secabout 4,000 ops/sec

One hardware profile, a working set larger than RAM, and we did not benchmark Atlas itself. The full writeup carries every caveat, including the two misconfigurations the benchmark found in our own fleet and the point where the picture inverts. Read it before you quote these numbers at anyone.

DocumentDB was not part of that run. In a separate October 23 run on matched 4 vCPU / 8 GB instances, DocumentDB had more throughput than FerretDB in every workload row, and FerretDB had lower update p99 latency in every 50/50 row. MongoDB was not rerun there, so do not stitch the two tables together; the three-engine writeup explains how they relate.

Branching, which Atlas does not have at any tier

Atlas has snapshots. You can restore one into a new cluster, which is slow and costs you a whole cluster, so nobody does it per pull request.

Because DocumentDB and FerretDB databases on Layerbase are Postgres databases wearing a Mongo interface, we branch them copy-on-write with the same mechanics we use for Postgres. Hit Branch, get an isolated copy of the data in seconds, point a preview deploy or a CI job or an agent at it, delete it when the pull request merges. No export, no restore, no Mongo-specific machinery. Branching with MongoDB shows the workflow.

This is the capability I would move for, more than the price. A document database you can fork per branch changes how you test migrations.

For FerretDB, the same Postgres underneath buys the other half of that story: point-in-time restore. (Point-in-time restore is not offered for DocumentDB today.) An always-on FerretDB database on the Pro plan archives PostgreSQL's write-ahead log continuously, so a restore targets a timestamp rather than the last snapshot, and it lands in a new database with its own connection string instead of rewinding the one you are still trying to read. It answers your existing Mongo credentials, because FerretDB keeps its authentication state in Postgres. Atlas has an answer here, so this is not a row where we are the only option: continuous cloud backup runs on dedicated clusters, on by default, and MongoDB's own docs note that enabling it increases the monthly cost of the cluster (verified 2026-08-26). What is different here is the mechanism: the same Postgres storage that gives us copy-on-write branching is what gives us replay, on a database you talk to with find and insertOne. The writeup has the drill and the scope.

Moving the data

The guided import lands on DocumentDB by default, with FerretDB as the other choice. Paste a mongodb+srv:// connection string on the Atlas migration page. We connect once, copy every collection with its documents and ordinary indexes, verify the document counts against your source, and hand you a report naming anything that did not come across, such as views, time-series collections, or an index the target cannot create. Your Atlas cluster is read and never modified.

It is a one-shot copy rather than live replication, so plan a cutover window. The full walkthrough, including the Atlas Network Access setting to change first, is Migrate from MongoDB Atlas to DocumentDB. The FerretDB migration guide covers the compatibility checks worth running before you commit to a date.

When to stay on Atlas

Not a rhetorical section. Four real cases:

  • You need a replica set or multi-region today. Our dedicated preset is a single node. Atlas is the answer until that changes.
  • You are write-heavy at billion-document scale. The write picture inverts at that scale and our own benchmark post says so.
  • You depend on Atlas Search, change streams, $lookup-heavy aggregation, or time-series collections. These are the FerretDB gaps, and neither engine is the MongoDB server. If testing shows DocumentDB does not cover them either, working around them is a rewrite, not a config change.
  • Your Atlas bill has never surprised you. If the free M0 cluster or a Flex cluster capped at $30 covers you and nothing is on fire, flat pricing is not solving a problem you have.

The case for moving is strongest when you are paying M20 or M30 money for a working set that fits on one box, or when you have wanted a branch of your production data and settled for a restored dump.

FAQ

What is the best MongoDB Atlas alternative?

It depends on which part of Atlas you are trying to leave. If you want the document model without the metered bill, DocumentDB on Layerbase gives you the MongoDB wire protocol on the Free plan, and FerretDB gives you the same protocol from Solo with a guided import. If you need a replica set, multi-region, Atlas Search, or change streams, nothing here replaces Atlas and you should stay.

Does Layerbase host MongoDB itself?

No. MongoDB's license does not allow it, so we host two MongoDB-compatible engines instead: open-source DocumentDB (MIT) and FerretDB (Apache 2.0). Both store documents in PostgreSQL.

Will my MongoDB driver work without changes?

Yes for the ordinary path. Your mongodb:// connection string, your driver, and find, insertOne, and normal aggregation pipelines all work as they are. On FerretDB the exceptions are text indexes and $text, change streams, and $lookup, which is why the compatibility rundown is the first thing to check. DocumentDB has its own profile, so test your own queries against it.

How much cheaper is this than Atlas?

At matching memory, roughly 4x on the M20 comparison and 6x on the M30 comparison, and that is before the metered extras. Atlas hourly rates cover compute alone; storage past the tier allowance, backups, and egress bill on top. Our dedicated prices are flat and include the listed storage, the backups, and the transfer. The honest asterisk is that an Atlas M-tier is a three-node replica set and our dedicated preset is a single node.

Can you branch a MongoDB database?

Atlas cannot, at any tier. DocumentDB and FerretDB databases on Layerbase are Postgres databases wearing a Mongo interface, so we branch them copy-on-write the same way we branch Postgres: hit Branch, get an isolated copy in seconds, point a preview deploy or a CI job at it, delete it when the pull request merges.

Can you restore a document database to a point in time?

Yes, on an always-on FerretDB database on the Pro plan. It is not offered for DocumentDB today. Its documents are rows in PostgreSQL, so the write-ahead log covers them, and archiving that log continuously is what makes a restore to an arbitrary timestamp possible. The restore builds a new database with its own connection string and never writes to the source, and it accepts your existing Mongo credentials. Atlas has its own continuous cloud backup on dedicated clusters, at an increase to the cluster's monthly cost per MongoDB's docs.

How do I move my data across?

For FerretDB, paste a mongodb+srv:// connection string on the Atlas migration page. We copy every collection with its documents and indexes, verify the document counts against your source, and report anything that did not come across. It is a one-shot copy rather than live replication, so plan a cutover window. For DocumentDB, use your own export and import for now and validate it in a test database before cutover.

Is there a free Atlas alternative?

Yes. DocumentDB is on the Layerbase Free plan: 2 databases, 5 GB of storage and 20 connections per database, no card. Free databases sleep when idle and wake on the next connection. The announcement has the memory measurements behind that change.

Starting

DocumentDB is on the Free plan. FerretDB is not; it starts on our lowest paid plan. The pricing page has the current numbers for the shared plans and the dedicated presets.

If you are starting fresh, create a DocumentDB database at cloud.layerbase.com/create and point your existing driver at it. If you already have data in Atlas and want the guided copy, start at the migration page and paste the connection string; that import creates a FerretDB database.