You can stop pay-as-you-go Elastic Compute Service (ECS) instances in economical mode to retain instance data and configurations and reduce costs. However, the restart success rate of ECS instances stopped in economical mode is subject to the resource inventory. During peak hours, the ECS instances that are stopped in economical mode may fail to restart due to insufficient resource inventory, which significantly affects business. This topic describes how to use private pools to improve the restart success rate of ECS instances that are stopped in economical mode.
Procedure
In this example, a pay-as-you-go ECS instance (Instance A) is stopped in economical mode. Perform the operations described in this section to ensure that the ECS instance can be restarted.
Step 1: Set the Private Pool Type parameter of Instance A to Open
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
On the Instance page, use one of the following methods to configure a private pool for one or more instances:
To configure a private pool for a single pay-as-you-go instance, find the instance and choose
in the Actions column.To configure a private pool for multiple pay-as-you-go instances at a time, select the instances and choose
in the lower part of the page.
In the Configure Private Pool dialog box, set the Private Pool Type parameter to Open and click OK.
Step 2: Create a private pool for the instance type of Instance A
Go to the Create Resource Reservation page.
Log on to the ECS console.
In the left-side navigation pane, choose .
Choose .
On the Resource Reservations tab, click Create Resource Reservation.
On the Create Resource Reservation page, configure the parameters. The following table describes the parameters.
Parameter
Description
Region/Zone
Select the region and zone where Instance A resides.
Resource Type
Select the instance type of Instance A.
Reservation Type
Select Immediate Capacity Reservation.
Expiration Method
Select a value based on your business requirements.
Before the immediate capacity reservation expires or is released, the resources that match the attributes of the immediate capacity reservation are reserved and the availability of the resources is guaranteed.
Private Pool Type
Select Open.
Click Next: Preview and complete the creation of the immediate capacity reservation as prompted.
On the Resource Reservations page, click the Private Pools tab and then click Details in the Actions column corresponding to the created private pool.
View the association between Instance A and the private pool.
On the Resource Reservation Details page, you can see that Instance A is automatically associated with the private pool. The resource inventory does not affect the restart success rate of the ECS instance after the instance is stopped in economical mode.
FAQ
Can I purchase or release multiple immediate capacity reservations? Can I use the reserved resources in an immediate capacity reservation multiple times?
Yes, you can purchase or release multiple immediate capacity reservations and use the reserved resources in an immediate capacity reservation multiple times within the validity period of the immediate capacity reservation. You can use all reserved resources in an immediate capacity reservation for an unlimited number of times before the immediate capacity reservation expires or is released.
If I purchased an immediate capacity reservation to reserve resources for one ECS instance, how do I use the immediate capacity reservation to improve the restart success rate of three ECS instances that are stopped in economical mode?
You can set Private Pool Type to Open for all ECS instances to ensure that the instances can match the attributes of the immediate capacity reservation.
However, the reserved resources in the immediate capacity reservation can be used by only one ECS instance and can help ensure the restart success rate of only one ECS instance. After one ECS instance restarts by using the reserved resources, the other two ECS instances may fail to restart if the resource inventory is insufficient. Any of the ECS instances can use the reserved resources to restart.