Open Source Spotlight: FerretDB

· 1 min read
Open Source Spotlight: FerretDB
Photo by Steve Tsang / Unsplash

There are a lot of applications out there, especially NodeJS apps, that require MongoDB to run. Even when the application is incredibly basic, and doesn't make any uses of it's advanced features. So why are we running multiple database services? FerretDB can help us by reducing the number of engines running.

What is FerretDB

FerretDB is a MongoDB protocol to Postgres or SQLite translation layer. Essentially, if you have a small app that uses MongoDB you can instead put FerretDB in front of your already existing PostgreSQL server, or in front of an SQLite file, and point your MongoDB consuming application at the FerretDB address instead.

Getting Started

Before you start using FerretDB, it's important to note some differences between what FerretDB supports, and MongoDB. To do that you can refer to their known differences documentation.

For an incredibly quick start, you can run FerretDB in docker using the following compose file:

    restart: on-failure
      - 27017:27017
      - FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/ferretdb

For more advanced installations you can refer to the FerretDB Get Started documentation. Additionally, their documentation has an incredible amount of information on migrating from existing MongoDB installations and other useful tricks.

Join the Discussion

Use our forums to discuss this post, or disuss other things

Join the discussion