DocumentDB is now on the Free plan
DocumentDB is now available on the Layerbase Free plan. If you want a MongoDB-compatible database for a side project, a prototype or a CI job, you can create one without a card.
When we launched DocumentDB 1.0 last month, it started on Solo. I said at the time that we needed more testing within the Free plan's memory budget before offering it there. We did that testing, and it fits.
What DocumentDB is on Layerbase
This is the open-source DocumentDB project: MIT licensed, originally built at Microsoft and now a Linux Foundation project. It stores BSON documents in PostgreSQL and ships its own gateway that speaks the MongoDB wire protocol, so mongosh and the MongoDB drivers connect to it with a normal connection string.
It is a separate engine from FerretDB. FerretDB 2.x also builds on the DocumentDB PostgreSQL extension, but puts its own protocol layer in front. On Layerbase you pick one or the other when you create the database, and they have different compatibility profiles. It is also not Amazon DocumentDB, which is an unrelated AWS service that happens to share the name.
The DocumentDB engine page has the details, and the October 23 YCSB run compares the two engines on matched hardware.
What the Free plan gives you
- 2 databases and 5 GB of storage, across any of the Free engines.
- 20 concurrent connections per database.
- Sleep after 15 idle minutes, wake on connect. No dashboard click to bring it back.
- 1 branch per database, if you want a writable copy before trying a risky change.
- 1 manual backup slot per database.
- No card and no expiry.
Free databases do sleep, and that is the trade. The first connection after a sleep waits for startup. In our tests DocumentDB took about 20 seconds to start, so give your client a 30-second connection timeout and let it retry. A Free database also has to spend at least a quarter of each week asleep; the acceptable-use page has that rule and what Free is meant for.
Why it fits now
The 512 MB memory floor that kept DocumentDB on Solo was a placeholder we set at launch, not a number anyone had measured. On November 3 we measured it on our staging host: a disposable DocumentDB 1.0.0 container next to PostgreSQL 18.6, loaded with 50,000 documents of about 1 KB each plus an index (59 MB of data, 5 MB of index). Memory is PSS, so shared pages are counted once.
| Phase | DocumentDB | PostgreSQL |
|---|---|---|
| Idle, 60 seconds after start | 41 MB | 32 MB |
| During 10 concurrent query streams | 114 MB | 103 MB |
| 15 seconds after the clients disconnected | 141 MB | 32 MB |
Under load the two are close. The thing to know is the last row: DocumentDB's gateway keeps its backend processes open after clients leave, so it settles around 140 MB instead of dropping back to idle. It stays there until the database sleeps. That is still well inside the 256 MB each Free database is budgeted (the Free plan's 512 MB of memory, split across its two databases), which is why this is a plan change and not a special case.
One test on one host is not a guarantee about your workload. A heavy aggregation over a large collection will use more memory than our test did, and if you outgrow Free, a paid plan keeps the database running.
Moving data in
The guided Atlas migration still imports into FerretDB today. If you want your data in DocumentDB, use your own export and import, run it into a disposable database first, and check representative documents, indexes and queries before you rely on it. Compatibility with the MongoDB API is not the same as running MongoDB, so test the operations your application actually uses.
Solo and Pro
Nothing changes on the paid plans. Solo is $5/month and keeps one database always on. Pro is $15/month with 10 databases, 25 GB and a shared 1.5 GB always-on pool, and it comes with a seven-day free trial. The pricing page has the full comparison.
If you are still choosing between document databases, I wrote up the MongoDB alternatives worth comparing, including the ones we do not host.
Create a free DocumentDB database and point your driver at it.
Keep reading
- MongoDB alternatives: DocumentDB, FerretDB and the managed services worth comparingThe MongoDB alternatives people actually compare, starting with open-source DocumentDB and FerretDB, then Atlas itself, Azure, Amazon DocumentDB, Firestore, Couchbase and plain PostgreSQL JSONB. What each one is, what it costs to start, and what it asks you to change.
- MongoDB vs FerretDB vs DocumentDB: benchmarks across two runsMongoDB, FerretDB, and standalone DocumentDB side by side, with August and October results clearly separated. Throughput, update p99 latency, and what the two runs can tell us.
- Introducing DocumentDB 1.0: Our 19th Cloud EngineDocumentDB 1.0 joins Layerbase Cloud alongside FerretDB. Run MongoDB-compatible workloads on Free, Solo or Pro, or try it locally on Linux without Docker.
- Northflank alternatives: a preview environment is not a database branchNorthflank gives every pull request its own stack, and the database in that stack starts empty unless you seed it or restore it from a backup you already had. Here is exactly how their forks work, what a copy-on-write branch does differently, what each one costs while a PR sits open, and the cases where Northflank is the right answer.