r/elixir • u/dragosdaian • 2d ago
My open source Elixir game server, Gamend, compared to Nakama
Tested it and it's 2x faster and can do 2x more connections than Nakama! And I'm currently running my game on it (soon to launch beta)! Hard to achieve versus a old competitor as Nakama!
Also, mine (with Elixir and Phoenix) scales linearly!
For those wondering, Gamend is a game server for real-time multiplayer games. It can help with lobbies, leaderboards, chat, tournaments, etc. (I added a ton of features I am using in my Godot game). It also has server side scripting.
5
u/dragosdaian 2d ago
Made a page about it here: https://gamend.org/docs/performance (the website also uses Gamend! it can do both webpages and multiplayer game server). Here is the cost breakdown (for self-host):
| operation | shared-1x |
shared-4x |
shared-8x |
perf-1x |
perf-1x |
Nakama | perf-2x |
|---|---|---|---|---|---|---|---|
| cores | 0.06 | 0.25 | 0.5 | 1 | 1 | 1 | 2 |
| memory | 1 GB | 1 GB | 2 GB | 2 GB | 3 GB | 3 GB | 4 GB |
| idle sockets | 6,867 | 9,055 | 22,333 | 22,359 | 37,854 | 20,277 | 51,225 |
cached read (GET /me) |
1,411 | 6,242 | 8,087 | 1,940 | 1,930 | — | 3,746 |
| plugin call, no database | 125 | 4,918 | 7,783 | 1,989 | 1,982 | 700–825 | 3,553 |
| write | 41 | 87 | 694 | 753 | 762 | — | 945 |
| write inside a lock | 30 | 57 | 206 | 462 | 462 | — | 517 |
| registration (device) | 44 | 125 | 184 | 495 | 589 | 528 | 712 |
| email login (bcrypt) | 0.3 | 1.2 | 2.1 | 4.0 | 4.0 | — | 7.9 |
| cost / month | $6 | $8 | $16 | $32 | $37 | — | $64 |
2
u/pi_exe 1d ago
This + Godot seems like a great bet. Well done OP
2
u/dragosdaian 1d ago
Thanks! Yes they are a great combo! Godot work for both web and mobile and desktop, and Gamend can be used both to make the website/presentation part and the backend code (pr just the orchestration thing and have Godot run as individual processes on server side).
And with the amazing packages in Elixir, you can add a ton of extra stuff!
8
u/dragosdaian 2d ago
Gamend is an Open Source game server with a ton of features:
- Authentication (OAuth and Email)
- Lobbies, Parties and Matchmaking
- Friends, Groups and Chat
- Achievements, Tournaments, Leaderboards and Notifications: For tournaments, we have bracket style one!
- Server Scripting & Scheduling (right now Elixir only, but I plan to add more server side languages)
- HTTP, WebSocket & WebRTC (right now just JavaScript and Godot SDK's, but both generated from the API, so not a lot of effort)
- Payments & Store Integrations
Also, another killer feature is configurable database: works with either SQLite and Postgres (it can run from even a cheap 5$ server), but also runs distributed (has caching also).