1
\$\begingroup\$

In my spare time for the past few years, I have been working on both the front-end and back-end for a space-based online game. This game is initially designed for the PC, and is hopefully able to host thousands of players in a massively playable universe.

Along with the development of the game, I have been building the networking solution almost entirely from scratch. The architectural design of the networking solution is based on a fairly traditional master-server > sub-server model. I recently was able to run some fairly decent-scale tests on this model and was pleased to see that both my expectations and goals were met. Which leads me to my current fear.

The basic idea behind the current solution is that the master server acts as a router. It knows about all of the currently active sub-servers, including their load (cpu, memory, bandwidth etc) and what the sub server is assigned to handle. The master server has literally no other purpose.

Each sub server is designed to handle one (or more) solar systems. The idea being: as a player, you connect to the master server and tell it which solar system you want to go to. The master server looks to see if there is a sub server already assigned to this solar system and sends you there, otherwise it finds the sub server with the least load and assigns that sub server to the solar system before sending you there.

The part that I am worried about is that this is pretty much as much as I can get out of this model. Once you have been sent to a solar system, you (and everyone else in that solar system) are on that sub server until you leave that solar system. Although I am happy with my testing so far, and that it looks to be able to handle around 300 fairly active peers, fairly comfortable on a well-fitted server, I am worried if I ever end up in the situation where this isn't enough.

I discussed this recently with a few acquaintances of mine. The discussion lead to a cloud-based network maybe being a better solution than single server machines acting as sub servers. Atmittedly, cloud commputing is fairly unknown territory for me. With that being said I've spent some time looking into this and I am fairly confident with the basics, but I have the following questions:

I assume that if I were to re-design the networking solution to work within a cloud-based network, I would no longer need the master-server > sub-server model, since I could build a single application that would handle all solar systems and peers, and that the cloud would scale based on the number of solar systems and peers?

Any and all advice is welcome!

\$\endgroup\$
  • \$\begingroup\$ Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. \$\endgroup\$ – Kromster says support Monica Jan 11 '16 at 11:13
  • \$\begingroup\$ @KromStern - thanks for the feedback. I'm struggling to work out what more I can add to this. I have added that my dilemma is that my current solution relies a single-server per master/sub server which has some fairly obvious limitations. Ultimately I am wondering how this compares to a cloud-based networking solution and really whether I should be considering going down that route instead. \$\endgroup\$ – Donny Sutherland Jan 11 '16 at 11:27
  • \$\begingroup\$ I'd recommend not to add more but to remove excessive details. \$\endgroup\$ – Kromster says support Monica Jan 11 '16 at 11:29
  • 1
    \$\begingroup\$ "Cloud computing" is just a marketing buzzword for "running on a server of someone else". \$\endgroup\$ – Philipp Jan 11 '16 at 11:36
  • \$\begingroup\$ @Philipp - maybe I am using the wrong terminology. I am referring to the process of having a set of computers share resources, alas allowing much greater computing power. I found this article rather useful for explaining it: uk.pcmag.com/networking-communications-software-products/16824/… \$\endgroup\$ – Donny Sutherland Jan 11 '16 at 11:39
2
\$\begingroup\$

I assume that if I were to re-design the networking solution to work within a cloud-based network, I would no longer need the master-server > sub-server model, since I could build a single application that would handle all solar systems and peers, and that the cloud would scale based on the number of solar systems and peers?

I don't know what you think "cloud computing" is. "The cloud" is a marketing buzzword for "others people's servers". It's not a magically scaling supercomputer.

If you decide to move your application "into the cloud", what you would be doing is rent some virtual machines from a company and run your server applications on them. These virtual machines run on normal commodity hardware.

That means your distributed architecture might already be a solution which might scale quite well.

Turning it all into a monolithic server which handles the whole world might be a step back. You could of course try to rent the biggest, most expensive server you can find, but at one point you will hit the limit of what is technically possible.

A distributed approach, however, allows you to rent multiple smaller servers and distribute your server instances on them. When you have some locations in your game which are more frequented than others and start to lag, you could move them to their own servers.

When individual systems become so load-heavy that even the largest servers can't handle them, the next step might be to use sharding. Instead of running one star system with 10,000 users, you run 10 identical copies of that star system with 1,000 users each and put each on its own server. If this is a viable option depends on your game.

Some cloud computing companies even have APIs which allow you to automatically rent and cancel virtual machines, so you might even be able to automate this.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.