Use without CockroachDB

Hi folks,

I was wondering how one would go about using Nakama without CockroachDB. Is it extremely reliant on Cockroach features? The reason I ask is that while Nakama seems quite lightweight, CockroachDB is very expensive to run in production, requiring at the minimum two k8s nodes all to itself.

Is the database client on the Nakama side integrated in such a way that it would be easy to swap out for something else, such as a PostgreSQL client?

Thanks.

@JoelOtter Nakama uses the PostgreSQL wire protocol and supports any database engine that uses it and has support for the JSONB column type. This includes Postgres, AWS Aurora for Postgres, and other database engines like CitusData (though its now owned by Microsoft).

We chose CockroachDB as our preferred option because it fits with the goals for scale, availability, and ease of maintenance in a modern cloud-native development workflow. We run all our tests on this database and so your mileage may vary with the other options. Though you’re welcome to report issues or submit patches to the codebase on GitHub if you come across any compatibility bugs.

Hope this helps.

Hey @JoelOtter,

I had a similar question a little bit ago, and was able to get everything working with a Postgres DB in Digital Ocean. Here are some notes on how I was able to get that working if it helps: Setting up DBA with Nakama
Let me know if you have any questions on it!