Welcome to the second part in our blog series on hosting for the online gaming industry. In the weeks leading up to GameConnection Europe, we’ll talk about various topics to keep in mind when looking for a suitable hosting solution for MMO games. This week we are looking at connectivity.
Latency and Network stability
So what do we actually mean with connectivity in relation to online gaming? Basically, it comes down to two things: low-latency and network stability.
Gaming professionals probably already know what latency is, but just to be sure: latency is the average delay experienced when an internet packet goes from source to destination and back again. We measure latency in milliseconds (ms) and a lower average latency score is better. The average latency score depends on the amount of jitter, which is the range between which an average latency score fluctuates. A stable network will have a small range of jitter. For example, when playing a first person shooter such as Battlefield 3, you need to be able to react extremely fast to win. If you have a jitter range between 30 and 60 ms, this won’t be a problem. But if your latency changes wildly between 30 ms and 150 ms, you’ll experience choppy gameplay (and will be shot or fragged continuously):
You can imagine that if you have too much latency, the game becomes virtually unplayable.
Getting the right connectivity
So the goal is to reduce latency while setting up a stable network environment. Here are some guidelines to do just that:
Find the right combination between hardware and software
Games that require fast responses are playable up until a latency of 60 ms. A game like Farmville on the other hand is still playable with a latency of 300 ms (though if it’s still fun when the connection is that slow is of course debatable). This means it is important to find the right match between software, hardware and network.
Optimizing the game server software for connectivity is something that has to be done during the development or testing phase. As for hardware: if you use only quality servers with multi-threading capabilities, the data can be processed as fast as possible. But how do you determine the right network infrastructure?
Host your game from a geographically close location
There are various elements that influence latency, but you can do a rough estimation of the theoretical latency of a network. All you need to know is the geographical distance between the datacenter hosting your games and the location of your player.
Every kilometer of fiber adds 0.02 ms latency. So to estimate the average network latency, take the distance between two places in kilometers, and multiply it by 0.02. For example, the distance from Frankfurt to Amsterdam is about 450 km. The calculation then becomes 450 x 0.02 = 9, which means the theoretical latency should be 9 ms on average. You can then compare this theoretical number with actual results from network tests, to determine the quality of the network. For instance, the Leaseweb network from Amsterdam to Frankfurt (and back) scores an average of 8.6 ms, which means it’s a great connection.
Keep in mind though that this is just a rough theoretical calculation. There are a few ‘real life’ factors that you need to take into account:
- Submarine cables add 0.015 ms latency per kilometer: When calculating the theoretical latency for networks that cross oceans, the multiplier changes to 0.015 ms latency instead of 0.02 ms. This is because submarine cables usually go in a straight line from point A to point B (as opposed to inland fibers, which often take quite optimal, though not necessarily straight paths).
- Not all continents are directly connected: If you want to send data from Europe to South America, you enter the American continent through North America. You then follow the inland line to South America, which easily results in a latency of 200 to 250 ms. This is why games often have continent based servers.
- Home ISP’s add latency too: Most gamers play from their home. Because of this, a player may get additional latency of up to 50 ms due to the technology used by his own home ISP.
Armed with this knowledge, it’s easy to understand why you should minimize the distance between your hosts and your player. This means spreading out your servers across many different datacenters. There are two ways you can facilitate this. The first is working with many (small) hosting providers, which can be a costly operation. The second way is working with a large hosting provider. They are often active in key datacenter locations, effectively becoming a one-stop-shop for all your connectivity needs.
Choose a network that has as many direct connections as possible
No matter how you choose to close the distance between your servers and your players, a good hosting providers has:
- High quality exchange connections: A hosting provider should be connected to quality internet exchanges. A European host for instance has to be connected with DE-CIX and AMS-IX (located in Frankfurt and Amsterdam respectively). These are the two largest internet exchanges in the world, both for volume of traffic and the amount of connected networks.
- Multiple quality transit providers: Having access to various Tier 1 transit providers provides both redundancy and high quality connectivity, in turn ensuring speed and global coverage.
- Multiple uplinks: If part of the network becomes unavailable due to maintenance or an incident, this has a direct impact on speed as there is less bandwidth for the same amount of traffic. The more uplinks a host has, the more room there is for traffic, which leads to a higher network stability.
Test your set-up
Once all the preparations are done, it’s time to put it all to the test. As Jay Wilson, Game Director of the Diablo III puts it:
(…) no matter how good your automation programs and software are, you can’t emulate having the game out in the real world and that’s the only way you can see what the hardware can take, how well the networking works, and optimize and tune to those things. There’s just nothing like the real environment for that.
That’s it for this week
If you keep all things mentioned in mind when deciding on the right hosting solution, your games will have good chance of running lag-free. Should you have any questions, you can always contact us through firstname.lastname@example.org, or drop by booth #220 during GameConnection Europe from 6th to 8th December. Will you be attending GameConnection Europe too? Let us know by leaving a comment in the section below or tweeting us (@Leaseweb)!
Be sure to tune in next week, when we discuss the various features of scalable hosting for MMO games.
The complete ‘It’s all in the game’ blog series:
- Reliable Hosting
- Worldwide Connectivity
- Fast Scalability
- Efficient Pricing