Skip to main content

Add ECS instances to a primary/secondary server group

Overview

This topic describes how to create a primary/secondary server group and then add Elastic Compute Service (ECS) instances to the primary/secondary server group. A primary/secondary server group contains a primary server and a secondary server that can fail to prevent service interruptions. By default, the primary server receives all requests that are distributed by a Server Load Balancer (SLB) instance. When the primary server fails, requests are redirected to the secondary server.

Prerequisites

Before you create a primary/secondary server group, make sure that the following requirements are met:

  • An SLB instance is created. For more information, see Create an SLB instance.
  • ECS instances are created and applications are deployed on the ECS instances to receive requests.

Procedure

  1. On the Instances page, click the instance.
  2. On the Instances Management page, click the Primary/Secondary Server Groups tab.fg-dc-slb-3.3.10-1
  3. On the Primary/Secondary Server Groups section, click the Create Primary/Secondary Server Group button. fg-dc-slb-3.3.10-2
  4. On the Create Primary/Secondary Server Group section, configure the primary/secondary server group name. fg-dc-slb-3.3.10-3
  5. On the Create Primary/Secondary Server Group section, click the Add button.
  6. On the Select Servers section, select the ECS instances that you want to add.
    Note: You can add only two ECS instances to a primary/secondary server group. fg-dc-slb-3.3.10-4
  7. On the Select Servers section, click the Next button.
  8. On the Configure Ports and Weights section, configure the backend port opened on each ECS instance to receive requests.
  9. On the Configure Ports and Weights section, click the Add button.
    Note: You can set multiple ports for an ECS instance.
    fg-dc-slb-3.3.10-6
  10. On the Create Primary/Secondary Server Group section, select an ECS instance as the primary server. fg-dc-slb-3.3.10-7
  11. On the Create Primary/Secondary Server Group section, click the Create button.
  12. On the pop-up message, click the OK button.fg-dc-slb-3.3.10-8