当前位置:网站首页>Alicloud configures SLB (load balancing) instances

Alicloud configures SLB (load balancing) instances

2022-06-11 00:53:00 Wenxiaowu

ECS After the instance is copied , Create load balancing in regions that support multiple zones SLB example , Used to mount across zones ECS example , Expand the external service capability of the application system 、 Eliminate single point of failure , Improve the usability of the application system . In this paper, SLB Deployment method of the instance .

Prerequisite

  • Three have been copied ECS example . For more information , Please see the Copy ECS example .
  • Four stations ECS Example of Web The services are started and running normally .

    Be careful   if Web The service is not running , be SLB Examples and ECS Instances cannot communicate normally .

Operation steps

  1. establish SLB example . Specific operation , Please see the Create examples . The configuration used in this tutorial is as follows :
    • regional : Must be with ECS Instances are located in the same region .
    • Zone type : Select multiple zones .
    • Instance type : Select private network .
    • Network type : Choose the VPC .
    • Primary availability zone and standby availability zone : On demand configuration .

  2. The public network of the source instance IP Convert to elastic public network IP. Specific operation , Please see the VPC type ECS Public network IP Switch to elastic public network IP.

    explain   To avoid impacting the business , Ensure that the source instance IP The address remains the same . therefore , You need to set the public network of the source instance first IP Convert to elastic public network IP, Unbind the source instance , Then bind it to the highly available version SLB For instance .

  3. Unbind the source instance and the elastic public network IP.
    1. In the source instance IP Address column , Click flex IP Address Links .

    2. In the elastic public network IP page , Click unbind .

    3. Click OK . For more information , Please see the Unbundling EIP.
  4. Binding elastic public network IP to SLB example .
    1. In the elastic public network IP page , Find the elastic public network unbound with the source instance IP.

    2. In the action column , Click bind .
    3. Instance type selection SLB example ,SLB Select the newly created instance SLB example , Click OK . For more information , Please see the binding SLB example .
  5. To configure SLB example . Specific operation , Please see the Configure the instance .

    The basic configuration is as follows :

    1. In the protocol & Listening tab , Complete the following configuration .
      • Load balancing protocol : choice TCP.
      • Listening port : Input 80.
      • Scheduling algorithm : Select on demand . This tutorial selects polling .
      • Other configurations use default values .

    2. Click next . On the backend server tab , Select the default server group , Click continue add add ECS example .

    3. Check the source instance and the three copied ECS example , Click next : Configure weights and port numbers . The port is configured as 80, Other values remain the default , Click next .

    4. On the health check tab , Use the default value , Click next .
    5. On the configuration approval tab , After checking the information , Click Submit .
    6. Click OK , Return to the instance management page , single click

      . When the health check status is normal , Said the back-end ECS The instance can normally handle the requests forwarded by load balancing .

      explain   A health check-up takes a few minutes , Please wait patiently and click the refresh icon to view the status .

Execution results

For the convenience of testing , This tutorial is on four platforms ECS A static web page is built on the instance , To identify each ECS example . Enter the service address of the load balancing instance in the browser , Test the load balancing service . Because the scheduling algorithm is polling , Requests will be sent to each machine in turn ECS example .

原网站

版权声明
本文为[Wenxiaowu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206102327576030.html