Help Center/ Auto Scaling/ User Guide (Kuala Lumpur Region)/ FAQs/ Instance/ When There Are Multiple Flavors Included in the AS Configuration of an AS Group, What Order Are the Flavors Selected in During Scale-out Events?
Updated on 2022-08-15 GMT+08:00

When There Are Multiple Flavors Included in the AS Configuration of an AS Group, What Order Are the Flavors Selected in During Scale-out Events?

The order depends on the AZs and multiple-AZ scaling policy used by the AS group. This section describes how flavors are selected during scale-out events in these the following two different scenarios:

Single AZ

If the AS group use only one AZ, new instances will be created in the AZ by following the configured flavor selection policy which determines the flavor priority order.

  • Sequenced: In this policy, the flavors are used in the order they were selected. For example, if you selected flavors 2, 3, and 1, and in that sequence, the system attempts to use flavor 2 to create instances at first. If flavor 2 is not available in the current AZ or an instance fails to be created due to other reasons, the system follows up with flavor 3 and again with flavor 1.
  • Cost-center: In this policy, the least expensive flavor is used first. For example, if you select flavors 1, 2, and 3 in sequence, where flavor 1 is the most expensive, followed by flavor 3, and flavor 2 is the least expansive, the system preferentially scales out the AS group by starting with flavor 2, then flavor 3, and then flavor 1.

Multiple AZs

If the AS group spans two or more AZs, you need to configure the multi-AZ extension policy. The system will scale out the AS group by following the scaling policy you configured using the flavor with the highest priority.

  • Balanced: In this policy, the system preferentially ensures that instances are evenly distributed across the AZs specified in the AS group. If it fails in the target AZ, the system selects another AZ based on the sequenced policy. For example, if:
    • You selected AZ 1, AZ 2, and AZ 3 in sequence.
    • You selected flavors 1, 2, and 3, where the flavor priority order is 2, 3, and 1.
    • AZ 1, AZ 2, and AZ 3 have, respectively, 3, 2, and 3 instances.

    AZ 2 has fewer instances. The system will try to create instances in AZ 2 first using flavor 2 (the one with the highest priority). If this attempt succeeds, the scaling action is complete. If this attempt fails, the system will try to create instances in AZ 2 using flavor 3, and then flavor 1. If all attempts fail in AZ 2, the system will try to fulfill the required capacity by starting with flavor 2, then flavor 3, and then flavor 1 in the AZ 1 based on the Sequenced policy. If all attempt fails in AZ 1, the system will try in AZ 3.

  • Sequenced: In this policy, the target AZ is chosen based on the order in which the AZs are selected. For example, if:
    • You have selected AZ 1, AZ 2, and AZ 3 in sequence.
    • You selected flavors 1, 2, and 3, where the flavor priority order is 2, 3, and 1.

    Regardless of how instances are distributed in three AZs, the system will try to use flavor 2 to create instances in AZ 1. If this attempt fails, the system will try flavor 3 and then flavor 1 in AZ 1. If all attempts fail in AZ 1, the system will do that again in AZ 2, and then AZ 3.

The flavor priority order is determined by the flavor selection policy in the AS configuration. For details, see Single AZ.