Hello CubeCrafters,
In this Behind the Cube, we will be exploring how our regions work behind the scenes, and the struggles that there are to actually be able to incorporate regions into our servers.
Overview
One of the goals we have with CubeCraft is to ensure the best experience for all players, no matter where you are in the world. This means that we need to ensure we have multiple countries with our servers in them, due to how the internet works - like a road network, the further away you are from your destination, the longer it takes to get there. This is called latency (or, more commonly, ping) and is easily measurable. You will have seen it in-game via the "green bars" you see on the server lists or tab list. Lower latency means the gameplay is smoother, less jittery and overall more satisfying for players.
On the surface, it seems simple to take servers and just put them in new regions. However, when you grow to the size of CubeCraft, you start relying on dozens of systems, some of which can easily be taken and moved, others which cannot You can imagine that it becomes tricky and cumbersome to do it whilst maintaining all features on the network, and more often than not requires a re-write of several core systems.
As a company, we have managed to overcome these challenges and we now have three regions around the world: our European region in Northern France, our North American region near Montreal in Canada, and our Asia region in Singapore.
Each region is connected to the other two regions with private transatlantic and transpacific cables from our datacenter provider - these provide a stable connection between the region which we extensively use to make cross-region gameplay possible as well as for data replication and many other tasks that require connecting between regions.
Here's a simple map that shows the way our locations are interconnected around the world:
View attachment 203566
Server Routing
As you may know, whenever you connect to CubeCraft, we try to send you to the best region for when you are connecting from, without you having to use a region-specific IP. We do this through something called DNS - the Domain Name System, which is responsible for making sure when you type āgoogle.comā into your browser, you get sent to Google.
You might have noticed that our solution sometimes got things wrong, and youāre right. We originally were maintaining a list of countries and continents, then mapping them to what region they should be sent to manually. This wasnāt always the best as it required us to keep the list up to date and regularly issue changes when we noticed players werenāt being sent to the right places.
Weāve since changed to doing it via something called geoproximity - we use software to generate a map of all our regions and the countries that should connect to it, and then send you to the region you match up with on that map. Since weāve moved to this system, weāve noticed that significantly more players have ended up in the right place, and so weāve decided to stick with this methodology of routing players for now.
Region-based Matchmaking
As we mentioned in a
previous Behind the Cube, we take the region of the player into consideration when matching them into a game. When deciding whether or not to send a player to a game in their region, we first have to decide whether or not the queue times are short enough - no-one wants to have to wait around for 10 minutes for a game to start. If this is not the case, for example during off-peak times, this sometimes isn't possible, so we favour sending players to the next closest available region that has acceptable queue times in order to maximise the player experience.
It's worth mentioning again that this process happens on a per-game basis, since the release of the North American region we've noticed that not all of our games are equally popular between all of our regions - often one game mode will be significantly more popular on one side of the world than another! This means that sometimes it's more likely that, when playing a specific game, to be sent across regions due to low demand where you are.
When you get sent to a different region than the one you're connected to, you will always get a message in the chat to inform you of this - we try to be as transparent as possible about this happening from time to time.
View attachment 203391
Sometimes this isnāt always the case - to socialise with friends, for example, you are able to select a lobby from a different region manually in the lobby selector. If you are in a party with friends from a different region, youāre more likely to get matched into games from their region.
When playing on a different region than the one you are connected to, we use those private network links we mentioned earlier between the regions to connect you to games on the other side. This gives you the most stable and best possible gameplay experience. It's also worth noting that you will always remain connected to the region closest to you - our software forwards you to a game that's in a different region. This means that switching regions would never improve your latency to CubeCraft - this is why we only make the matchmaking system to do it when it's really necessary.
Into the Future
We continue to listen to player feedback and work with our network and datacenter providers to achieve the best possible connection to all users and to allow users to play on games which are closest to them. We may expand our datacenter locations in the future and we would very much appreciate suggestions on what you'd like to see next.