All Products
Search
Document Center

Elastic Compute Service:Replicate ECS instances

Last Updated:Mar 21, 2024

High-availability architectures provide features such as service distribution, scalability, and multi-zone deployment. Compared with an Elastic Compute Service (ECS) instance, a high-availability architecture is more stable and scalable when databases and applications are deployed. If you want to use a multi-zone high-availability architecture, you must deploy multiple ECS instances that have the same configurations. This topic describes how to use a custom image created from a source instance to replicate three ECS instances. One instance is assigned to the same zone as the source instance, and the other two instances are assigned to a different zone in the same region as the source instance.

For more information about the multi-zone high-availability architecture, see Deploy a high-availability architecture.

Prerequisites

  • An Alibaba Cloud account is created. To create an Alibaba Cloud account, go to the Sign up to Alibaba Cloud page.

  • An ECS instance to be replicated is created. For more information about how to create an ECS instance, see Creation methods.

Procedure

  1. Create a custom image from an ECS instance.

    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. Find the desired instance and choose 图标 > Disk and Image > Create Custom Image in the Actions column.

    5. Enter an image name in the Image Name field and enter a description for the image in the Image Description field.

    6. Click OK.

      Note

      The image creation process requires a while to complete.

      In the left-side navigation pane, choose Instances & Images > Images. When the progress of the image reaches 100% in the Progress column and the status becomes Available, the image is created.

  2. Create three ECS instances from the created custom image.

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

    2. On the Custom Images tab of the Images page, find the custom image created in the previous step and click Create Instance in the Actions column.

    3. On the Custom Launch tab, scroll down to the Image part in the Instances & Images section. The custom image you created is automatically selected. Continue with other settings as prompted and set Quantity to 1.

      Take note of the following parameters:

      • Region: Select the same region as the source instance.

      • Network and Zone: Select the same zone as the source instance.

      • Public IP Address: Select Assign Public IPv4 Address.

      For more information, see Create an instance on the Custom Launch tab.

    4. Repeat Step a and Step b. On the Custom Launch tab, scroll down to the Image part in the Instances & Images section. The custom image you created is automatically selected. Continue with other settings as prompted and set Quantity to 2.

      Take note of the following parameters:

      • Region: Select the same region as the source instance.

      • Network and Zone: Select a zone that is different from that of the source instance.

      • Public IP Address: Select Assign Public IPv4 Address.

      • Quantity: Set the value to 2.

      For more information, see Create an instance on the Custom Launch tab.

Verify the result

In the left-side navigation pane, choose Instances & Images > Instances. On the Instance page, the four ECS instances are in the Running state. Two instances are located in a zone, and the other two are located in another zone.

What to do next

Create a Classic Load Balancer (CLB) instance and add the ECS instances from different zones to the backend server group of the CLB instance to achieve high business availability. For more information, see Configure a CLB instance.

References

For more information about how to use other methods to create ECS instances that have the same configurations, see Purchase an instance with the same configuration or Create an instance by using a launch template.