TheKoguryo's Tech Blog

 Version 2024-11-29

Warning

This content has been generated by machine translation. The translations are automated and have not undergone human review or validation.

13.2 Autoscaling Configuration

The following are required for autoscaling.

  • Instance Pool: Autoscaling automatically changes the current number of instances in the Instance Pool according to a set metric, and an Instance Pool is required.
  • Enable Monitoring: Compute instances are monitored and based on resource status, Monitoring must be enabled.
  • Service Limit: You must have enough relevant resources to start a new instance with Autoscaling.

Autoscaling settings

  1. Open the navigation menu in the OCI console. Go to Compute > Instance Pools.

  2. Click More Actions > Create autoscaling configuration on the detail screen of the instance pool to be autoscaling. image-20220117171710234

  3. Autoscaling Configuration

    • Name: Enter a name, eg autoscalingwebserver-autoscaling-config

    • INSTANCE POOL: Select the instance pool to use, automatically selected when moving from the instance pool to Create Autoscaling Configuration.

      image-20220117171842875

  4. Autoscaling Policy

    • Metric-based autoscaling: Automatically adjusts the number of instances according to the metric value. Currently, it can be set based on CPU and memory usage.
    • Schedule-based autoscaling: Changes the number of instances defined according to the set schedule, or changes the status of all instances.
  5. Metric-based autoscale settings

    • Autoscaling policy name: Enter a name

    • Cooldown in seconds: Cooldown time, default 300 seconds, Autoscaling evaluates metrics during the cooldown period and determines whether to autoscaling, that is, adjusting the size of the instance pool again after the cooldown time has passed.

    • Performance metric: As a baseline metric, CPU Utilization and Memory Utilization are currently supported.

      image-20220117173106652

    • Scale-out rule: Set criteria to increase instances based on the specified metric

    • Scale-in rule: Set criteria for reducing instances based on the specified metric.

    • Scaling limits: Specify the minimum and maximum instances to maintain during Scale In & Out.

    • For testing, if one instance exceeds 80% of CPU load, add an instance, and when CPU load is less than 20%, set the policy as follows.

      image-20220117181648734

  6. (Reference) Schedule-based autoscale setting

    • Scale pool size: You can specify the number of instances according to the set schedule.
    • Change lifecycle state of all instances: You can change the state of an instance according to the schedule you set. Instances can be terminated on the weekend and started on Monday morning.
    • Another policy: Unlike metric-based, it is applied according to the schedule specified by the administrator, so you can set multiple rules according to the schedule.

    image-20220117173740248

  7. Complete test auto scale creation

    image-20220117181746578

  8. As you can see on the screen, you can click Edit to change the rule even after creation. It is not possible to change a metric-based schedule to a schedule-based schedule.

    image-20220117181841096



As an individual, this article was written with my personal time. There may be errors in the content of the article, and the opinions in the article are personal opinions.

Last updated on 17 Jan 2022