ECS 7 days training camp series third day

Start the ECS server

The generous Ali directly lent me a server for learning, and students who have a server can use their own. Install Openssh terminal for remote connection. (Be careful to protect your username and IP)

What is load balancing

Load balance: Load Balance, referred to as LB, is a service or high-availability reverse proxy technology based on hardware devices. Load balance shares specific services (web services, network traffic, etc.) to one or more designated backends. Terminal specific servers or equipment, thereby improving the concurrent processing capabilities of the company’s business, ensuring the high availability of the business, and facilitating the dynamic expansion of the later level of the business.
It's a pity why the school selection system can't load balance it qwq

Start the server

First start the two ECS provided by Ali, log in and check the corresponding IP.

Perform load balancing configuration

1. Log in to the Alibaba Cloud Load Balancing Console first
. 2. Search and select Load Balancing
. 3. Follow the wizards to set the
load balancing setting to HTTP, because we are just a pure access test.
Listening port 80 (HTTP default port)
4. Add two servers for testing
5. Enable health check

Load balancing verification

1. First enter the ip in the panel for multiple visits, and you will find that different backend IPs of the two pages alternately appear continuously.
Insert picture description here
Insert picture description here
2. Enter the instance management and adjust the weight. (30 90)
After refreshing several times, you will find that the number of occurrences is also 1:3
. 2. Enter the instance management and configure the advanced settings of the monitoring. The
session remains selected for 180s, and other defaults.
When you open it again, you will find that it has been accessing a server for 180s.
3. When you close one, the instance management interface will also give a warning,
but when you still access the ip given by the panel, you can still access normally, because the load balancing is still working .


After experimenting with today's project, I fell into deep thought. Why is the school's course selection server so rubbish, CET server so rubbish, etc.? So why can't they load balance? Taobao is visited by so many people every day, and DingTalk is used by multiple people at the same time, so there will be no problems. When you actually manage the server in the future, you should be familiar with all aspects of server maintenance.

Guess you like