Hi, I am currently exploring backend solutions for multiplayer games.
I wonder how it scales using unity also in the backend as a server. Even with the server build settings, it takes computing sources and how does it play out for a large player base? For example lets say I have a card game with 20k (hard to achieve number, just to compare) ccu. How much source usage difference does it make in the backend side using unity vs creating a custom game server with something like go. Especially for ram, even an empty build server running instance takes about 100 mb ram. So I dont think it scales well in this perspective. And each game session means a new unity instance running if my understanding is not wrong? Any insights about this would be appreciated.
I personally don’t know of any card game that runs a full blown Unity server or game engine on the server side. All the popular card games using Unity use a lightweight custom backend. Go, as you mentioned is pretty much ideal for this. How much faster will it be? That always depends on the specifics of course but I’d say you can expect at least a magnitude of better performance if not much more.
What lukeesta says makes sense to me, but I don’t have experience in this. A middle of the road approach might be using a Unity headless server that can serve multiple card games/matches at the same time. I’ve been looking at this Asset TCG Engine - Online Card Game | Systems | Unity Asset Store which I think does this. While i’m sure this isn’t as ideal as a lightweight custom backend, i wonder how it will scale.
Trading Card Games (or any card games) benefit from a networking transport that is highly optimized. There’s a few templates, but the CCG Kit is a great place to start from my perspective…
As for the cost of hosting your game servers, ideally you would want to fraction your vCPU to minimize cost. On Edgegap’s calculator, you can see that a TCG using a fractioned vCPU means barely pennies over a full month of matches played.