In an Elastic Compute Service (ECS) cluster, you can bind a Server Load Balancer (SLB) instance to an application. This way, traffic is forwarded from the IP address of the SLB instance to all instances of the application.


An SLB instance is created. For more information, see Create a CLB instance.

Background information

You have an application that is deployed on multiple ECS instances. To ensure the security of these instances, you can bind an SLB instance to the application. This way, you can configure an IP address for the application to enable access from other applications.

Architecture of a dedicated SLB instance for an application

This topic takes an Internet-facing SLB instance as an example. If you need to bind an Internal-facing SLB instance to the application, you must specify the private network when you verify the binding result.

Bind an SLB instance to the application

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications.
  3. On the Applications page, select a region in the top navigation bar and an option from the Microservice Namespace drop-down list. Select ECS Clusters from the Cluster Type drop-down list. Then, click the name of the required application in the application list.
  4. In the Application Settings section of the Basic Information page, click Add next to SLB (Internet).
    Note If you have configured an SLB instance, the IP address and port number of the SLB instance are displayed. You can click Modify to go to the configuration page and modify the settings of the SLB instance. You can also click Unbind to unbind the SLB instance.
  5. Configure the SLB instance in the Bind SLB Instance to Application wizard.
    1. In the Select SLB step, select the SLB instance that you have created from the SLB (Internet) drop-down list, and then click Next.
    2. In the Select and Configure Listener step, configure a listening port, and then click Next.
      • If you want to use the listening port that is configured for the specified SLB instance, select Select an Existing Listening Port and then select the required listening port.
      • If no listening port is configured for the specified SLB instance or you want to add a listening port to the application, select Add Listening Port and then create a listener.


        Parameter Description
        Protocol TCP and HTTP are supported. Select a protocol as needed. For more information, see Listener overview.
        Frontend Port Number The number of the port that is used by the SLB instance to provide external services.
        Health Check Path (URI) The URI that is used by the SLB instance to check the status of the backend. The default value is /_ehc.html. Enter a valid URI. For more information, see Configure health check.
        Backend Port Number The port number of the application. The value is fixed.
    3. In the Configure Virtual Groups and Forwarding Policies step, configure a vServer group for the SLB instance, and then click Next.
      Note If you bind a dedicated SLB instance to an application, you do not need to configure a forwarding policy.
      • If you configure a dedicated SLB instance for the application, we recommend that you use the default server group.
        Note The default server group does not support forwarding policies.
      • If you may need to configure a forwarding policy later, we recommend that you use a vServer group. You can use the following methods to configure vServer groups for applications:
        • If you want to use a vServer group created for the specified SLB instance, select Existing VServer Group and select an existing vServer group.
        • If no vServer group is configured for the specified SLB instance or you want to configure a new vServer group, select Create VServer Group and specify VServer Group Name.
    4. In the Confirm SLB Change step, check the SLB instance settings, and click Confirm.

Verify results

  1. Navigate to the Basic Information tab. In the Application Settings section, paste the IP:Port of the SLB instance next to SLB (Internet), for example, 115.28.XX.XX:80.
    If IP:Port does not appear next to SLB (Internet), the SLB instance fails to be bound. Check the change records to identify the error cause and fix the error. For more information, see View application changes.
  2. Paste the IP:Port in the browser and check whether you can access the application.