Scaling Gameservers

How to grow your server base.

General information about scaling

When you are in charge of dealing with game servers, scaling is probably one of the bigger problems you have to solve. Knowing this, zeuz has implemented a scaling feature that will make your life a lot easier. This includes different solutions for different use-cases.

Reservation & Unreservation

The “Reservation & Unreservation” feature is a way to let zeuz scale servers automatically. This is extremely useful for organizing pre-planned games and matches such as in a competitive environment.

Matchmaking

Matchmaking needs to rely on flexible infrastructure. With our reserving / unreserving option you can focus on your matchmaking system.

Not sure which method you should use?

Our sales team will be happy to hear your case and to work on a solution that fits all your needs. Don't hesitate to contact us.
Zeuz maintains a pool of bare-metal machines to make sure the right hardware supports your game. Furthermore, for every server reserved, zeuz will automatically set up an additional server - which leads to a nearly unlimited stack of resources.

Reserving a gameserver

If your matchmaking engine notices the need for an additional game server, you can reserve one simply by calling our resrving API.
Let’s have a look at how to reserve a gameserver via zeuz’ external API.

Example request in C++:

If you need more information about the zeuz C++ SDK, please visit the github repository

ZeuzAPI zeuzApi(ACCESS_TOKEN, ACCESS_KEY);

Json::Value ReserveData;
zeuzApi.ReserveService("123", ReserveData);

                    

Example request in C#:

If you need more information about the HttpClient class, please consult the Microsoft documentation.
                        
HttpClient client = new HttpClient();
client.baseAddress = new Uri("https://api.zeuz.io/v2/");

/* We assume that data is an array filled with payload informatin */
ReserveRequest payload = new ReserveRequest(data);

string path = "service/reserve";

HttpResponseMessage response = await client.PostAsync(path, payload);
                    

Example Request in Java:

If you need more information about the zeuz Java SDK, please visit the github repository

Api api = Api.fromConfig();

JSONObject jsonObject = new JSONObject();
jsonObject.put("serviceId", "123");

ApiResponse apiResponse =
        api.call(Endpoint.RESERVE_SERVICE, jsonObject, null);

                    

Example Request in PHP:

If you need more information about the zeuz PHP SDK, please visit the github repository

$api = new ZeuzApi($tokenKey, $accessKey);

$result = $api->reserveService("1", "1");

                    

Releasing a gameserver

When you no longer need the reserved game server, you have to ‘unreserve’ it. This happens by calling the unreserving endpoint of our API.
We will also have a look at how unreserving works with the external API.

Example Request in C++:

If you need more information about the zeuz C++ SDK, please visit the github repository

Json::Value UnReserveData;
zeuzApi.UnreserveService("123", UnReserveData);

                    

Example Request in C#:

If you need more information about the HttpClient class, please consult the Microsoft documentation.
                        
HttpClient client = new HttpClient();
client.baseAddress = new Uri("https://api.zeuz.io/v2/");

/* We assume that data is an array filled with payload informatin */
UnreserveRequest payload = new UnreserveRequest(data);

string path = "service/unreserve";

HttpResponseMessage response = await client.PostAsync(path, payload);
                    

Example Request in PHP:

If you need more information about the zeuz PHP SDK, please visit the github repository

$api = new ZeuzApi($tokenKey, $accessKey);

$result = $api->unreserveService("123");

                    
When a server IS unreserved there are two possible things that can happen. Either it is destroyed, so the hardware underneath is ready to be set up again, or it stays alive.
This is the fastest method of scaling, as servers are setup in advance. You can set this behavior up either by accessing the frontend or via our zeuz API.

self-managed scaling

There may be situations where you need to be in charge of your gameserver infrastructure. In such situations, we provide the option to handle the allocatingation and unallocation all by yourself.

MMORPG's

MMORPG's often need multiple servers to host their world. This could lead to a negative impact if unused servers get destroyed after some time. Self-managed scaling gives you every freedom, but also puts you in charge of unallocating servers that aren't needed.

Server browsing

Nothing is more frustracting for players if no free slots are available in the official server browser. With our reserving / unreserving option you can focus on your matchmaking system….

Allocation

The idea of allocating servers is to give you full flexibility for scaling. This means that zeuz will setup a server the moment you request one. Otherwise, with “reservation & unreservation” there is no pool of servers, meaning each request leads to setting up a new server. This gives you the opportunity to be as flexible as possible.

Example request in C#:

If you need more information about the HttpClient class, please consult the Microsoft documentation.
                        
HttpClient client = new HttpClient();
client.baseAddress = new Uri("https://api.zeuz.io/v2/");

/* We assume that data is an array filled with payload informatin */
AllocateRequest payload = new AllocateRequest(data);

string path = "service/allocate";

HttpResponseMessage response = await client.PostAsync(path, payload);
                    

Example request in Java:

If you need more information about the zeuz Java SDK, please visit the github repository

Api api = Api.fromConfig();

JSONObject jsonObject = new JSONObject();
jsonObject.put("gameProfileId", "123");
jsonObject.put("serverGroupId", "123");

ApiResponse apiResponse =
        api.call(Endpoint.ALLOCATE_SERVICE, jsonObject, null);

                    

Example request in PHP:

If you need more information about the zeuz PHP SDK, please visit the github repository

$api = new ZeuzApi($tokenKey, $accessKey);

$result = $api->allocateService("1", "1");

                    
This scaling option is neither managed nor handled by zeuz’ scaling engine. This means that if a server is no longer needed, you have to make sure it is destroyed. This also results in the need ro repeatedly checks for the status of the requested server to make sure it is running. Please be aware that the process of setting up a server can take several minutes, depending on the availability of hardwares and the size of the game image.

Example request in C#:

If you need more information about the HttpClient class please consult the microsoft documentation.
						
HttpClient client = new HttpClient();
client.baseAddress = new Uri("https://api.zeuz.io/v2/");

string path = "service/unallocate/123";

HttpResponseMessage response = await client.GetAsync(path);
					

Example request in Java:

If you need more information about the zeuz Java SDK, please visit the github repository

Api api = Api.fromConfig();

ApiResponse apiResponse =
        api.call(Endpoint.GET_SERVICE_STATUS, null, new HashMap() {{
            put("serviceId", "123");
        }});

                    

Example request in PHP:

If you need more information about the zeuz PHP SDK, please visit the github repository

$api = new ZeuzApi($tokenKey, $accessKey);

$result = $api->unallocateService("123");

                    

Optional: automatic scaling based on the number of players

In the case of MMORPG’s, this option may be espacially interesting. This optional feature is available for both available methods of scaling, and ensures that there is enough hardware to cover each user playing your game.