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 overto 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 SLB management console interface, select the target SLB instance, click the instance to enter the instance details, and click the Primary/Secondary Server Groups tab. fg-dc-slb-3.3.10-1
  2. Click Create Primary/Secondary Server Groups. fg-dc-slb-3.3.10-2
  3. On the Create Primary/Secondary Server Group page, configure the primary/secondary server group. fg-dc-slb-3.3.10-3
  4. In the Primary/Secondary Server Group Name field, enter a name for the primary/secondary server group. fg-dc-slb-3.3.10-4
  5. Click Add. In the My Servers panel, select the ECS instances that you want to add.on the Select Servers wizard page. You can add only two ECS instances to a primary/secondary server group. fg-dc-slb-3.3.10-5
  6. Click Next.
  7. Configure the backend port opened on each ECS instance to receive requests, and then click Add. You can set multiple ports for an ECS instance. fg-dc-slb-3.3.10-6
  8. Set an ECS instance as the primary server. fg-dc-slb-3.3.10-7
  9. Click Create. fg-dc-slb-3.3.10-8