All Products
Search
Document Center

Elastic Compute Service:Use private pools to ensure resource transfers within an account

Last Updated:Aug 20, 2024

In specific scenarios, you must release Elastic Compute Service (ECS) instances and re-create the instances. For example, to scale resources based on your workload requirements, move resources from one cluster to another cluster for cross-region disaster recovery, or quickly create, destroy, or adjust testing environments in DevOps processes, you must release ECS instances and re-create the instances. If a released ECS instance is of an instance type that is highly in demand, the instance may fail to be re-created when ECS runs out of capacity for the instance type. As a result, resource loss or capacity loss occurs. This topic describes how to use a private pool to reserve resources and ensure resource transfers between ECS instances.

Billing

Assume that you release Instance A and create Instance B of the same instance type.

  • If the capacity of a private pool is exhausted by ECS instances, you are not charged for the capacity of the private pool and are charged only for the ECS instances.

  • If the capacity of the private pool is not exhausted by ECS instances, you are charged for the unused capacity of the private pool.

    In this case, you pay for Instance A, Instance B, and the unused capacity based on the period of time that elapsed from when Instance A is released to when Instance B is created. The following table describes the capacity usage of a private pool and how you are charged in different steps.

    Step

    Used capacity/total capacity of a private pool

    Billing

    Create a private pool

    1/1

    You are charged for Instance A. You are not charged for the private pool.

    Release Instance A

    0/1

    You are charged for the unused capacity of the private pool based on the amount of time during which the capacity remains unused.

    Create Instance B

    1/1

    You are charged for Instance B. You are not charged for the private pool.

    The following figure shows how you are charged for the ECS instances and the private pool capacity.

    image

Procedure

Assume that you want to release Instance A and create Instance B of the same instance type.

Step 1: Set the Private Pool Type parameter of Instance A to Open

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. 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 image.png > Instance Settings > Configure Private Pool in the Actions column.

      image

    • To configure a private pool for multiple pay-as-you-go instances at a time, select the instances and choose More > Instance Settings > Configure Private Pool in the lower part of the page.

      image

  5. In the Configure Private Pool dialog box, set the Private Pool Type parameter to Open and click OK.

    image

Step 2: Create a private pool for the instance type of Instance A

  1. Go to the Create Resource Reservation page.

    1. Log on to the ECS console.

    2. In the left-side navigation pane, choose Deployment & Elasticity > icon1 > Resource Advisor.

    3. Choose Guaranteed Provision > Resource Reservations.

    4. On the Resource Reservations tab, click Create Resource Reservation.

  2. On the Create Resource Reservation page, configure parameters to create a resource reservation. Take note of the parameters that are described in the following table.

    Parameter

    Description

    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. In this example, we recommend that you select Manual Release.

    Private Pool Type

    Select Open.

  3. Click Next: Preview and follow the on-screen instructions to complete the creation process.

Step 3: Release Instance A and create Instance B of the same instance type

  1. On the Resource Reservations page, click the Private Pools tab, find the private pool that is generated for the resource reservation that you created in Step 2, and then click Details in the Actions column.

    image

  2. On the private pool details page, check the association between the private pool and ECS instances.

    The Resource Details tab indicates that Instance A is automatically associated with the private pool. The total capacity of the private pool is one ECS instance. The used capacity is one ECS instance.

    image

  3. Release Instance A. For more information, see Release an instance.

    After the instance is released, the total capacity of the private pool is one ECS instance and the used capacity is zero ECS instances.

    image

  4. On the Resource Details tab, click Purchase Instance to create Instance B.

    image