GitHub | Documentation | Become a Patron

Scaling across multiple servers

  • This question is not necessarily specific to Colyseus, but I am trying to implement it with Colyseus. Multiplayer games sometimes have a list of servers that you can connect to (eg. US West 1, US East 1, etc.), so obviously they have a cluster of servers. I am wondering how you would implement this. Maybe this is a simple problem, but I don't know much about server architecture.

    My initial thought was to deploy my Node.js app to multiple servers, then manually create a list of host names that the client should ping. This seems like it could get hard to maintain when I change things or add more servers.

    The other thought I had was to have a central master server, then have that server keep track of the other servers and tell the client where they can go.

    I found this: but if someone could explain more in-depth how I would do what is suggested there, it would be much appreciated. If I used Redis or uTT to allow communication between servers (I have no experience using these), how would I know which server to communicate with? Are there server cluster solutions that can help me with this on Heroku or AWS?

    Also, what is a presence server?

    EDIT: Is this what I should try to implement: Have each of my servers be a Redis node, then have one of the master nodes send data to the client about the state of all servers in the cluster?