FerretDB has announced the first release candidate of version 2.0. Now powered by the recently released DocumentDB, FerretDB serves as an open-source alternative to MongoDB, bringing significant performance improvements, enhanced feature compatibility, vector search capabilities, and replication support.
Originally launched as MangoDB three years ago, FerretDB became generally available last year, as previously reported by InfoQ. Peter Farkas, co-founder and CEO of FerretDB, writes:
FerretDB 2.0 represents a leap forward in terms of performance and compatibility. Thanks to changes under the hood, FerretDB is now up to 20x faster for certain workloads, making it as performant as leading alternatives on the market. Users who may have encountered compatibility issues in previous versions will be pleased to find that FerretDB now supports a wider range of applications, allowing more apps to work seamlessly.
Released under the Apache 2.0 license, FerretDB is usually compatible with MongoDB drivers and tools. It is designed as a drop-in replacement for MongoDB 5.0+ for many open-source and early-stage commercial projects that prefer to avoid the SSPL license, a source-available copyleft software license.
FerretDB 2.x is leveraging Microsoft's DocumentDB PostgreSQL extension. This open-source extension, licensed under MIT, introduces the BSON data type and related operations to PostgreSQL. The solution includes two PostgreSQL extensions: pg_documentdb_core for BSON optimization and pg_documentdb_api for data operations.
According to the FerretDB team, maintaining compatibility between DocumentDB and FerretDB allows users to run document database workloads on Postgres with improved performance and better support for existing applications. Describing the engine behind the vCore-based Azure Cosmos DB for MongoDB, Abinav Rameesh, principal product manager at Azure, explains:
Users looking for a ready-to-use NoSQL database can leverage an existing solution in FerretDB (...) While users can interact with DocumentDB through Postgres, FerretDB 2.0 provides an interface with a document database protocol.
In a LinkedIn comment, Farkas adds:
With Microsoft's open sourcing of DocumentDB, we are closer than ever to an industry-wide collaboration on creating an open standard for document databases.
In a separate article, Farkas explains why he believes document databases need standardization beyond just being "MongoDB-compatible." FerretDB provides a list of known differences from MongoDB, noting that while it uses the same protocol error names and codes, the exact error messages may differ in some cases. Although integration with DocumentDB improves performance, it represents a significant shift and introduces regression constraints compared to FerretDB 1.0. Farkas writes:
With the release of FerretDB 2.0, we are now focusing exclusively on supporting PostgreSQL databases utilizing DocumentDB (...) However, for those who rely on earlier versions and backends, FerretDB 1.x remains available on our GitHub repository, and we encourage the community to continue contributing to its development or fork and extend it on their own.
As part of the FerretDB 2.0 launch, FerretDB Cloud is in development. This managed database-as-a-service option will initially be available on AWS and GCP, with support for Microsoft Azure planned for a later date. The high-level road map of the FerreDB project is available on GitHub.