GitHub Icon

Platform

Solutions

Resources

Company

Load Tests in Game Hosting, Part 1

In a recent chat with Edgegap’s CTO, Philip Cote sheds some light on one of the less talked about aspects of game hosting. He reveals how Edgegap helps game studios prepare their game for launch by using a variety of load testing methods.

Our first question is quite straightforward – what’s a load test?

It’s all about generating fake players to play a simulated game. Basically, it entails us trying to simulate the most extreme load possible in a game by spinning up a lot of virtual players around the world.

Why go through the trouble of load testing on a global scale?

The biggest online games today can host players from all corners of the world at the same time. Most upcoming game studios aspire to a global scale too. If we were to generate all our players from one location, then our systems wouldn’t perform optimally. By generating random IP addresses around the world and matching those players to get a real-life scenario, we’re preparing for any and every possibility.

That sounds like an extensive procedure. Is it?

It is – especially when you consider that we load test for at least twice the traffic volume in our clients’ games. This way, even if there’s a surge or an outage, we’ll always have enough legroom to double the capacity of our platform. But it’s easier for us now than it was at the beginning. Our initial load tests were carried out physically by actual people so it was incredibly tasking. Now, we generate some AI onto fake players and have them go at it. One of our newer methods of load testing is having these virtual players play one of the earliest video games ever made, Pong. We bring two fake players online, have them request for a match, and once our matchmaker automatically generates one, a server is deployed. As soon as the AI takes the lead and begins to control the white lines on the screen, we monitor every metric available. We test every aspect of our solution and even go so far as to test the players themselves.

Are load tests that important in online gaming?

Absolutely. If you were on an e-commerce site and your connection was so slow that you couldn’t find the hoodie you were looking for, what would you do? The typical user would minimize their browser, do something else, and come back to shop some other time. A gamer wouldn’t be this patient. Why? Because they are passionate people. If a player has a poor experience while playing a game, they usually go vocal on Reddit or Twitter. There’s no ‘I’m going to come back in an hour’. Because of the high probability of a player abandoning a game once they quit it, we need to be 100% certain that our tool is deploying all the right servers in the right place at the right time.

How do you prepare for a load test? What steps do you take?

The Edgegap team functions like a flight crew. At the helm, we have Mathieu, our founder and pilot. The first step usually involves a pre-flight check. Here, we get all of the relevant tasks listed on our internal Wiki pages which are automatically validated afterwards. Then, there’s me – the tower control chief. Like I mentioned earlier, our load tests are two times the largest traffic that a game client can send us. So I have to make sure that everything that needs tweaking is in order. I also tend not to announce that we’re going to do a load test beforehand. Most of our tests start with me calling an impromptu meeting with everybody and saying something like, ‘Hey, we’re meeting this afternoon at x time.’ After everyone has jumped in, I make the announcement and start running through the numbers. The calculations are done long before the tests so we know the exact numbers of games that we need to produce and the steps that we need to take to get there. The reason why we don’t schedule our load tests is that we want to imitate reality as closely as possible. In real life, we’d get no prior warning before a client’s game gets a traffic surge. Why should our load tests be any different?

Apart from ensuring that your servers can handle surges in concurrent players, what other goals do load tests aim to accomplish?

Our sights are often set on determining the stability of our platform. Edgegap’s Arbitrium is based on a micro-service system, which means that it’s not a single machine handling all the processes but a ton of tiny components, each with a specific function. These components scale up and down in magnitude, depending on the needs of the platform. And because there are hundreds of them actively working at any point in time, it’s easy for errors to build up and force the system to destabilize. That’s another thing we keep an eye out for: errors. Our load tests make sure each component always makes the right decision – whether it’s scaling up or down. That’s it for Part 1 of the interview with Edgegap’s CTO! Stay tuned for Part 2 where we’ll talk about what’s special about video games traffic that has to be taken into account during load tests, and why tracking results from test to test is so important. In the meantime, don’t hesitate to get in touch if you’d like to learn more.

Written by

the Edgegap Team