Appologies if this has been answered already. I searched for awhile and couldn’t find the answers I’m looking for.
I’m researching using Nakama for a game I’m building. It’s my first game, and I’m starting small, I don’t think I’ll need many of the real-time or matchmaking features, mostly just user accounts and friend finding. So I’m not willing to spend $600/mo on managed hosting yet. I saw some docs on how to get things started with a docker container, and I have experience self hosting things with that, so I’d like to start by hosting it on a cheap VPS somewhere, but I have a few questions.
Generally speaking, what kind of resources does Nakama need? I understand that there are a lot of variables, but for development or a small hobby-scale project starting out, will Nakama run ok on a low-spec VPS?
Does Nakama need any special features that might be difficult to setup on a generic VPS? I saw this thread about needed ports, but I’m not sure if I should interpret that as a basic-requirement to install/run Nakama, or just something that would be required for some optional features.
If my game is successful (let’s hope) and I need to scale up, is migrating to Heroic Cloud pretty much as straightforward as a database dump from one server to the other?
TL,DR; Can I set this up on a cheap VPS to get started, and then migrate to Heroic Cloud later if needed?
Generally speaking, what kind of resources does Nakama need? I understand that there are a lot of variables, but for development or a small hobby-scale project starting out, will Nakama run ok on a low-spec VPS?
As you’ve mentioned there are a lot of variables to keep in mind for performance as it relates to the type of game you plan to build. You can run on skinny hardware (1 CPU + 3.5GB RAM) for the Nakama game server, and separately 2 CPU + ~8GB RAM for the database server. That would be the smallest I’d start at unless you want to accept the tradeoffs I mention below.
Does Nakama need any special features that might be difficult to setup on a generic VPS?
I think some Platform as a Service (PaaS) solutions like Heroku are harder to deploy on because they restrict the number of ports that you can bind with the game server. Nakama bundles it’s own Console dashboard which is very useful but requires a separate port (or load balancer configuration) to reach. I think any VPS should be fine because they usually lease the machine rather than a limited form of access to it.
The biggest no-no that I see developers fall into when they run game servers themselves is to colocate both the Nakama game server and the database server on the same hardware. This creates a huge performance hit because two very different server systems are competing for resources available in terms of CPU and RAM.
They then proceed to imply the game backend is “slow” or “does not scale” which is absurd because we work with some of the largest games in the world at scales that exceed most smaller social networks . So keep this in mind when you set your servers up yourself and either be conscious of the perofrmance tradeoff if you colocate the tech or ideally run them on separate server instances.
is migrating to Heroic Cloud pretty much as straightforward as a database dump from one server to the other?
We can handle the transition this way though it can be significantly more complicated when a game does not implement some kind of maintenance UI which lets the player know that the game will be unavailable for a short period of time. Sometimes we’ll do zero-maintenance migrations but this is also complex.
Keep in mind that a migration to Heroic Cloud will also require the game client to switch over the DNS record it uses to find the server so you’ll need to either control that through remote configuration parameters or provide a new forced update game build to players.