At a Glance:
FerretDB is an open-source alternative to MongoDB that acts as a proxy, converting MongoDB 5.0+ wire protocol queries to SQL and using PostgreSQL with the DocumentDB extension as its backend database engine.
Overview:
FerretDB is an open-source database proxy designed to serve as a drop-in replacement for MongoDB 5.0+. It translates MongoDB wire protocol queries into SQL, with PostgreSQL and its DocumentDB extension used as the underlying database engine. The project targets users who need an easy-to-use document database without the licensing constraints that followed MongoDB's shift to SSPL. FerretDB maintains compatibility with MongoDB drivers and popular tools, allowing applications built for MongoDB to connect using standard MongoDB URIs. The project explicitly states it is continuously working to increase compatibility and performance, and that while suitable for many cases, feature parity is still evolving.
Key Decision Points:
PostgreSQL-backed architecture: Uses PostgreSQL with a DocumentDB extension as the storage engine, not a custom document storage system.
Proxy-based operation: Functions as a protocol translation layer that accepts MongoDB 5.0+ wire protocol connections and converts them to SQL.
Driver and tool compatibility: Designed to work with existing MongoDB drivers and tools, functioning as a drop-in replacement in many scenarios.
Known compatibility boundaries: Maintains a public list of known differences and supported commands, acknowledging that full MongoDB compatibility is still in progress.
Production deployment guidance: A Docker-based quickstart is provided for testing and experiments, but the project warns it is unsuitable for production and directs users to separate installation guides for persistent setups.
Core Features:
MongoDB wire protocol translation: Converts MongoDB 5.0+ client requests to SQL queries for PostgreSQL execution.
DocumentDB-backed storage: Relies on PostgreSQL with the DocumentDB extension to handle document data storage.
MongoDB client compatibility: Accepts connections from any MongoDB client application using standard MongoDB URIs.
Binary and package distribution: Provides pre-built binaries and packages for various Linux distributions.
Embeddable Go library: Offers a Go library package for embedding FerretDB directly into other applications.
Managed cloud availability: Available through several cloud providers, including FerretDB Cloud, Civo, and Tembo.
Use Cases:
Developers seeking an open-source document database for projects that cannot use SSPL-licensed software.
Projects already using MongoDB drivers and tools that need to switch to a PostgreSQL-compatible backend.
Local development and testing environments where a MongoDB-compatible API is needed without running MongoDB itself.
Open-Source Alternative Value:
FerretDB provides a practical option for developers who depend on the MongoDB wire protocol and driver ecosystem but require an open-source backend. By converting MongoDB queries to SQL and running on PostgreSQL with the DocumentDB extension, it avoids SSPL licensing restrictions. The project explicitly positions itself to fill the gap for users who do not need advanced MongoDB features but still need a compatible document database interface. It is available as a self-contained proxy, distributable binaries, an embeddable library, and through managed cloud services.

