Cluster Server ?

I am not a pro, and i have question.

What if i want to deploy a game with a server and a instance based play.

The questionis should i run all instance s of the game as virtual instances on server or should i run dedicated server for every instance.

For example games like PUPG do that (i think), how ever this is not easy so when is it worth it.

What if 10k / 500 people playing the game and use 60000 / 6 Kb/s?

For most games, you should not need a dedicated server. A VPS should be enough.

If you build your own networking stack and your own server instance from scratch, you can easily scale to thousands of simultaneous players. If you are using an off the shelf network stack and using a headless build from Unity, then don’t expect it to scale that much. If you really need to support 10k simultaneous players, you will need to custom build your own solutions that are specific to your game.

PUBG runs VPS instances at Amazon AWS.

The go to approach I believe would be to have a master server which players first connect to and which coordinates availability of individual game play instance servers. This functionality could all be in a single master server instance, or spread across multiple different servers, depending on your needs and expected load.

As for how many game play server instances you should run on each physical or virtual server, that really comes down to your game and what servers you are using. If you’re using primarily low spec servers that can barely run a single instance of your game play server, well then you’re not really going to run multiple on the same server then. You could easily rent much higher spec servers though that are capable of running dozens or more of your game play server instances. You can just run them on different ports.

As for dedicated servers vs VPS, well the advantage of dedicated servers is you usually get a lot more server resources for your money. (my server is 16 cores, 32GB RAM, 2TB storage, 25 TB data transfer, for $65/month) VPS/Cloud is generally more stingy on the resources, but far more flexible. Where you can quickly spin up new servers as needed on the fly during high load, and bring them back down when not needed. You generally only pay for what you use instead of paying a flat monthly rate even if you’re not utilizing the hardware fully.

Thanks guys. However i would realy like to hear your opinion on, when do i need one server solution like EVE online and when an scaleable solution like PUBG.

The real questions to ask are more specific to your own game. For example, how many simultaneous players need to interact with each other? You could have millions of people playing at once, but if only 100 players need to interact with each other at that same time, then you should have lots of instances running and each instance would handle up to 100 players.

Technically speaking, most scalable solutions have more than one kind of server involved. For many games, there might be one match making server (or one per geo region) that figures out which server instance to connect players to to actually play. Match making servers can manage players connecting to server instances and/or players connecting peer-to-peer with each other. With PUBG, the match making servers direct players to server instances. Once players are connected to a server instance, PUBG actually connects the player clients peer-to-peer for voice chat. That is why voice chat continues to work even if a PUBG server instance crashes.

Server instances can use something like Unity (or Unreal) in a headless mode, or server instances can be built completely from scratch. Building a headless mode of an existing Unity game is generally easier, but building a custom server instance from scratch with offer many more opportunities for scaling to support lots of players.

1 Like

EVE Online isn’t a one server solution though, but a server cluster. They can run multiple star systems on a single server, and allocate high traffic star systems to their own hardware for better performance under load.

As already stated, it comes down to your game. How much resources does it use, what would cause resource usage to increase, etc.

1 Like

Well for a start i want to run 6 people instances, and i want like 600 such instances.
I thik that maybe i can run that on my own server but i worry about handling those connections.
Its easy to make instances run on their own apps but that would make things complicated, and i try to keep things simply.

What do you mean by “6 people instances”? Do you mean you want to have 6 simultaneous players (clients) per server instance? That is easy to do.

As for running 600 server instances on one server, that can be tricky. If each server instance is a VPS, your server would need enough RAM and IP addresses for all of that. If each server instance is a process, then your server would still need lots of RAM, but your could use one IP and simply place each process on a different port. One big question is if you are going to use a headless build of Unity for the server process or if you are going to design your server process completely from scratch. That will have a huge impact on how well your design will scale.

The most scalable game server solution I built was when I built the network stack and the server code completely from scratch. On the server side, I set up one game server process per VPS, and my game server process could spawn hundreds of threads. Each thread was a game server instance listening on its own port while sharing the same IP. Each game server instance thread could support up to 250 clients per game server instance. In addition to that, I built a custom match making server and deployed many VPS instances around the globe. My design could handle 10k simultaneous users per process, and I could easily scale the overall infrastructure up or down as needed. All of my VPS were running in AWS, so it was pretty flexible. This was all admittedly very over-engineered, since my marketing skills are minimal compared to my programming skills, though.