Help Center> Auto Scaling> User Guide (ME-Abu Dhabi Region)> FAQs> Instance> What Are the Sequence of Selecting Flavors in Multi-Flavor AS Configuration?
Updated on 2022-02-22 GMT+08:00

What Are the Sequence of Selecting Flavors in Multi-Flavor AS Configuration?

When multiple flavors are selected in an AS configuration, the sequence varies according to the extension policies of a single AZ and multiple AZs. This section describes the sequence of selecting flavors in a single AZ and multiple AZs.

Single AZ

If only one AZ is selected for an AS group, all instances in the AS group are created in the AZ. If multiple flavors are selected in the AS configuration, there are two flavor selection policies:

  • Sequenced: During AS group expansion, flavors are used based on the sequence they are selected. For example, you have selected flavors 2, 3, and 1 in sequence. The system selects flavor 2 at first. If flavor 2 is insufficient or an instance fails to be created due to other reasons, the system selects flavor 3. Flavor 1 is used only when flavor 2 and 3 cannot be used.
  • Cost-center: During AS group expansion, the flavor with the minimum cost comes first. For example, you select flavors 1, 2, and 3 in sequence. The costs of flavors 1, 3, and 2 are in descending order. The system preferentially selects flavor 2 (with the minimum cost) to create an instance. When flavor 2 fails, select flavor 3. When flavor 3 also fails, flavor 1 is used.

Multiple AZs

When two or more AZs are selected for an AS group, you need to configure the Multi-AZ Extension Policy (load-balanced or sequenced). When you select different multi-AZ extension policies, the sequence of creating instances is also different. The sequence is described as follows:

  • Load-balanced: When expanding an AS group, preferentially ensure that ECSs are evenly distributed in AZs. If it fails in the target AZ, the system automatically selects another AZ based on the sequenced policy. The following is an example of selecting AZs and flavors:

    You have selected AZ 1, AZ 2, and AZ 3 in sequence and flavors 1, 2, and 3. The priority sequence of the flavors is 2, 3, and 1. AZ 1, AZ 2, and AZ 3 have 3, 2, and 3 instances respectively. According to the load-balanced policy, AZ 2 has fewer instances and is therefore preferentially selected to create instances. Use flavor 2 to create an instance in AZ 2. If the instance is successfully created, the scaling action is successful. If flavor 2 fails, use flavor 3, and so on. If all of them fail, the instance cannot be created in AZ 2. If instances cannot be created using load-balanced policy, select other AZs based on the sequenced policy and try to create instances using flavors 2, 3, and 1 in AZ 1. If ECSs still cannot be created in AZ 1, AZ 3 is selected and the sequence of selecting flavors is also 2, 3, and 1.

  • Sequenced: When expanding the ECS capacity, the target AZ is used based on the order in which AZs are selected. The following is an example of selecting AZs and flavors:

    You have selected AZ 1, AZ 2, and AZ 3 in sequence and flavors 1, 2, and 3. The priority sequence of the flavors is 2, 3, and 1. No matter whether instances in three AZs are evenly distributed, the system creates instances in sequence, that is, AZ 1, AZ 2, and AZ 3. Use flavor 2 to create an instance in AZ 1. If this fails, use flavor 3. Flavor 1 is used when both flavors 2 and 3 fail. If all three flavors fail in AZ 1, AZ 2 is selected. The sequence of flavors is also 2, 3, and 1. Similarly, if AZ 2 also fails, AZ 3 is selected. The sequence of flavors is also 2, 3, and 1.

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