Warning: count(): Parameter must be an array or an object that implements Countable in /home/iteanz/public_html/wp-includes/post-template.php on line 317

2. Create and modify auto-scaling polices

With an auto-scaling policy, you can create rules that determine when the Auto-Scaling service will increase or decrease the number of instances of your application. In this task, create and modify rules for your Java Liberty application.

  1. In your application, click the Auto-Scaling service shown in the Connections list.
  2. Click CREATE AUTO-SCALING POLICY.
  3. Enter the parameters for the policy:
    1. Enter minimum and maximum number of application instances:
      • Use the following default configuration or configure or as needed:
        Minimum: If the number of the instances equals this value, the Auto-Scaling service will not scale in the application any more.
        Maximum: If the number of the instances equals this value, the Auto-Scaling service will not scale out the application any more.
    2. Scroll to the Rule 1 section and make these changes:
      • Keep the Metric Type set to Memory.
      • Change Scale Out percentage to 30 and change Scale In to 15.
      • In the Advanced Configurations section, set the Statistic Window to 30 seconds. Then, set a value of 60 seconds for Breach Duration and both Cooldown periods. You’ll use these smaller time frames for testing later.

    These settings are much lower than in a typical production application. The values used are low enough to ensure that the Auto-Scaling service properly scales your application in a shorter test window during this lab.

  4. Click ADD A RULE to specify another rule.
  5. For Rule 2, set the Metric Type to throughput. Keep the other values as they were for Rule 1
  6. Click SAVE to apply all changes for Rule 1 and Rule 2
    Your application will now automatically scale based on the policies that you defined.