Replicate ECS instances

更新时间:
复制 MD 格式

A high-availability architecture provides features such as traffic distribution, elastic scaling, and multi-zone deployment. A high-availability architecture is easier to set up and more stable and scalable than deploying applications on a single ECS instance. For a multi-zone high-availability architecture, you must first deploy multiple ECS instances with identical configurations. This topic describes how to use a custom image from a source ECS instance to replicate three new ECS instances. One of the new instances is created in the same zone as the source instance, and the other two are created in different zones within the same region.

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

Prerequisites

Procedure

  1. Create a custom image from the source ECS instance.

    1. Log in to the ECS console.

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

    3. In the upper-left corner of the page, select a region and resource group.地域

    4. Find the source instance. In the Operation column, choose 图标 > Disks and Images > Create Custom Image.

    5. Enter a name and description for the image.

    6. Click OK.

      Note

      Image creation may take a few minutes.

      In the left-side navigation pane, choose Instances & Images > Images. The image creation is complete when its Progress shows 100% and its status is Available.

  2. Create three ECS instances from the custom image.

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

    2. On the Custom Images tab, find your custom image and click Create Instance in the Operation column.

    3. On the Custom Launch page, the Images parameter in the Instance and Image section is already set to your custom image. Configure the other parameters and create one ECS instance.

      The following table describes the key parameters.

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

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

      • Public IP Address: Select Assign Public IPv4 Address.

      For information about other parameters, see Create an instance by using the wizard.

    4. Repeat Step 2.a to Step 2.c to create two more instances.

      The following table describes the key parameters.

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

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

      • Public IP Address: Select Assign Public IPv4 Address.

      • Quantity: Set this parameter to 2.

      For information about other parameters, see Create an instance by using the wizard.

Result

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

Next steps

Create a Classic Load Balancer (CLB) instance and add the ECS instances to its backend server group. This setup distributes traffic to the instances across zones to ensure high availability for your services. For more information, see Configure a CLB instance.

Related documents

You can also create ECS instances that have identical configurations by using other methods. For more information, see Create an instance that has the same configurations as an existing instance or Create an instance from a launch template.