Auto Scaling

Last updated: 2020-08-04 11:30:42

    Overview

    This document describes how to implement auto scaling through a server fleet.

    Prerequisites

    You have completed the steps in the Demo.

    Directions

    Modifying the scaling configuration and the number of processes

    1. Log in to the GSE Console and click Fleet on the left sidebar.
    2. Click the ID of the server fleet created in the "Demo" to enter the fleet details page. Click the Scaling tab to view scaling details.
    3. Click Modify in the top-right corner to modify the scaling configuration as follows:
      1. Select "Automatic adjustment" as the adjustment mode.
      2. Set "Instance Range" to 0–3 so that there will be room for expansion.
      3. Set the game server session buffer to 30%, i.e., when the number of game battles (sessions) loaded on the server exceeds 70% of the limit, expansion will be performed.
      4. After making the modifications, click OK.

        Note:

        • Game server session buffer = number of available game server sessions / maximum number of game server sessions
          = (maximum number of game server sessions - number of active game server sessions) / maximum number of game server sessions.
        • If the game server session buffer is configured as 30%, expansion will be performed when the available game server sessions are below 30%; otherwise, reduction will be performed.

    Creating game server session and observing expansion result

    1. In the console, click Demo on the left sidebar, complete the first three steps in the Demo, and click Create Game Server Session for seven times to create eight game server sessions and trigger expansion.

    Note:

    • In GSE Console > Demo, one server can sustain up to 10 game server sessions by default. Therefore, when the server sustains seven game server sessions, the game server session buffer will be number of available game server sessions / maximum number of game server sessions = (maximum number of game server sessions - number of active game server sessions) / maximum number of game server sessions = (10 - 7) / 10 = 30%.
    • Therefore, you need to create eight game server sessions at least to trigger expansion.
    1. Click Fleet on the left sidebar, and select the ID of the created server fleet to enter the fleet details page. Now, click the Instance List tab and observe. After two minutes, you will see that the number of instances is increased to two.

      Note:

      After the creation, do not click Complete for next round of trial. Instead, you will still need the above configuration for subsequent reduction steps.

    Ending game server session and observing reduction result

    1. In the console, click Demo on the left sidebar and proceed with the subsequent steps after the above expansion. After selecting each game server session, click Create Player Session once to create a player session.
    2. Click Redirect to client webpage to enter the client page. Click Connect to successfully connect to the server. Click End Game Session to end the game server session. Repeat steps 1 and 2 once to end 2 game server sessions and trigger reduction.

    Note:

    • Game server session buffer = number of available game server sessions / maximum number of game server sessions = (maximum number of game server sessions - number of active game server sessions) / maximum number of game server sessions = (20 - 6) / 20 = 70%.
    • As there are only six active game server sessions left now, making the buffer increased to 70%, reduction is triggered (above 30%).
    • Currently, if you close your client webpage, the previously created player sessions will not be able to reconnect to your client. In this case, you have to create a new player session for reconnection in order to close the game server session.
    1. Click Fleet on the left sidebar, select the ID of the created server fleet to access the fleet details page, and select Instance List. Observe the instance quantity. After two minutes, you will see the number of servers decreases to two.