Scaling the Game Application

Scale the wow-auth workload in manual or automatic mode by using CCE.

Manual Scaling

  1. Log in to the CCE console, choose Workloads > Deployments in the navigation pane, and click wow-auth to access its details page.
  2. On the Scaling tab page, click under Manual Scaling, change Pods to 2, and click Save.

    Figure 1 Manual scaling

  3. On the Pods tab page of the details page, you can view that the new pod is being created. The creation will be completed within seconds. If the pod status is not refreshed, click . The status of the instance is Running.

Auto Scaling

  1. Log in to the CCE console, choose Workloads > Deployments in the navigation pane, and click wow-auth to access its details page.
  2. On the Scaling tab page, click Add Scaling Policy under Auto Scaling.

    CCE supports auto scaling in seconds to ensure high service stability and improve user experience. In addition, reserved resources are reduced, saving investments by millions of dollars. Based on features of games, CCE provides flexible auto scaling policies, which can be selected and combined for use as required.

    Table 1 Flexible auto scaling policies

    Recommended Auto Scaling Policy

    Description

    Periodic Policy

    For example, the number of players of a game reaches the peak in the afternoon and evening on a given day.

    You are advised to use the Periodic Policy. For example, 100 pods are added at 13:00 every day from January 1, 2018 to January 1, 2019.

    Metric-based Policy

    After a new game is released, it is uncertain whether how many players will play this game. It is difficult to reserve a proper number of machines based on existing experience.

    You are advised to use the Metric-based Policy. For example, if the CPU or memory usage exceeds 70%, one instance is added. If the CPU or memory usage is less than 40%, one pod is reduced.

    Scheduled Policy

    In-game events are frequently held. You are advised to configure the Scheduled Policy before an event begins. For example, 100 pods are added at 12:00 on August 8.

  3. Add a metric-based policy. In this policy, one pod is added when the CPU usage is greater than 70%.

    Figure 2 Adding a metric-based policy
    • Policy Name: Enter a policy name, for example, policy-01.
    • Metric: Select CPU Usage.
    • Policy Type: Select Metric-based Policy.
    • Trigger Condition: The average CPU usage is greater than 70%.
    • Monitoring window: Set a period for collecting metric statistics. Select a value from the drop-down list. If the parameter is set to 60s, metric statistics are collected every 60s.
    • Threshold Crossings: If the parameter is set to 1, the configured action will be triggered when the threshold is reached for one consecutive statistical period.
    • Action: Add one pod.

  4. Click OK. This policy is displayed under Auto Scaling. If the average CPU usage is greater than 70%, this policy is triggered.