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
Create a custom image from an ECS instance.
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.
Find the desired instance and choose
in the Actions column.Enter an image name in the Image Name field and enter a description for the image in the Image Description field.
Click OK.
NoteThe image creation process requires a while to complete.
In the left-side navigation pane, choose
. When the progress of the image reaches 100% in the Progress column and the status becomes Available, the image is created.
Create three ECS instances from the created custom image.
In the left-side navigation pane, choose .
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.
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.
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
. 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.