The fastest way to build online games without breaking a sweat.

Multiple Clusters

If you decide to get dedicated, private Multiplayer servers, the simplest option is to have a single private cluster, and run all rooms on that cluster. You can also get multiple clusters in different geographical regions, so that you can direct your players to a server that offers the lowest network latency. This leads to a better game experience for everyone.

Cluster Selection

If you have multiple clusters, the default when creating a room is that the Multiplayer Service will try the clusters in the order that you've configured in your Multiplayer Control Panel. If a room can't be created on any server in the first cluster, because they're all full, the service will try the next cluster, and so on.

To override this behaviour, simply pass in a cluster name in the RoomData argument, with the key "Cluster". If you have two private clusters in the EU and in Asia, and rely on the Main cluster for US players, like the image to the right shows, you would create a room on the EU cluster like this:

This causes the Multiplayer Service to override the configured order of clusters, and to try to create the room on the cluster that's passed in. If that fails, because the given cluster is full, the service will fall back to the normal rules, and try the remaining clusters in order until it finds a server where the room can be created.

Note that passing in a misspelled cluster name, or passing in the name of a cluster that doesn't exist or isn't active any longer won't cause CreateRoom to fail with an error, instead it will just ignore it and use the default cluster selection rules. You will be able to see these errors in your game ErrorLog, so keep an eye there during development.

Listing Rooms By Cluster

Since cluster selection uses RoomData on room creation, you can use the searchCritera parameter to easily search for rooms that were created on a certain cluster. Remember that you need to add "Cluster" to the search columns in the Multiplayer Settings for your game in the Control Panel to make that property searchable.

Once you've set that up, listing all rooms on the EU cluster in the example is as simple as this: