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
-
An Alibaba Cloud account is created. To create an Alibaba Cloud account, go to the Sign up to Alibaba Cloud page.
-
You have an ECS instance to use as the source for replication. If not, see Create an instance.
Procedure
-
Create a custom image from the source ECS instance.
Log in to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the page, select a region and resource group.
-
Find the source instance. In the Operation column, choose .
-
Enter a name and description for the image.
-
Click OK.
NoteImage creation may take a few minutes.
In the left-side navigation pane, choose . The image creation is complete when its Progress shows 100% and its status is Available.
-
Create three ECS instances from the custom image.
In the left-side navigation pane, choose .
-
On the Custom Images tab, find your custom image and click Create Instance in the Operation column.
-
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.
-
-
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 . 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.
> Disks and Images > Create Custom Image