Ali cloud SLB load balancing scenarios and configurations

We take a quick look at understanding, Ali cloud load balancing --SLB. SLB load balancing is to distribute traffic to multiple back-end cloud server (ECS instance) to distribute traffic control services based forwarding policy. It contains two meanings: First, the flow through the distribution, the ability to expand service application system; the second is to eliminate single points of failure, improve application availability.

Scenarios

We take a look at its specific usage scenarios.

The first usage scenario is for high-traffic business.
When your application to access very large, single server has been unable to carry the traffic when you can use load balancing to distribute traffic to different servers up.

The second scenario is a lateral expansion of the system.
When you have to use load balancing, you can very easily add ECS to adjust and reduce their ability to service applications in the backend when a business fluctuations.

The third scenario is to eliminate single points of failure.
When we use load balancing, more than one back-end work at the same time the ECS. Once the application which on one ECS fails, then the load balancing will be time to find this failure mechanism through a health check, and can shield the flow of these units ECS forward, then forward the request to another user ECS a working instance.

More Ali cloud load balancing SLB knowledge introduction can participate: test aliyun Help Center - Load Balancing

City disaster recovery
Ali cloud load balancing can be achieved with the same geographical area between the disaster area and more available, the available area when the main failure is that in a short time you can switch to another available spare area to restore service capabilities. Meanwhile, the main access available recovery zone, it will automatically switch to the main usable area.

Cross-regional disaster
cross-regional disaster made by intelligent cloud resolution of DNS, the DNS load balancing to address instances in different regions, in order to achieve global load balancing, occurs when a region is not available, you can achieve all correspondence analyzing suspend users access is not affected.

Configure load balancing

Let us show you how to configure load balancing.

First, be prepared to work, we need to open an instance of load balancing and load balancing with two same geographical ECS servers.

 

After you've created, we can see such an example in load balancing console.

Next, we give this to create a load-balancing listener. "Listening" can be simply understood as a back-end server inside the corresponding application, such as a website we listen to click, and then click Add monitoring.

 

Suppose we have a back-end server inside the front-end website http protocol port, we can be around the end of the protocol TCP port 80 are written, and then select the scheduling algorithm according to their needs, in fact, it is the way forward traffic.

 

The next step is the health check, we can choose TCP mode.

 

Check the port and the port will default back-end servers are consistent, direct confirmation enough. Now, on a monitor configured.

Then go to the provisions of this back-end server load balancing is what. Click on the back-end server, and then click the server is not added, the two servers we just created check, and then add bulk on it.

 

There is a weight we need to pay attention to it, right here is the concept of a heavy proportion, if two servers are written in 100, will flow to 1: be forwarded to the back-end servers two ways 1.

Here we completed a simple configuration for load balancing.

 We should pay attention to the current load balancing state of health checks is abnormal, it is because we do not have to configure the service for the http port 80 in the back-end server inside, configured the future, the state will become a health check Normal.

Load Balancing SLB plays a very important role in the whole cloud product system, you can see almost all the load balancing figure in any of the following architecture.

Guess you like

Origin blog.csdn.net/qq_43303887/article/details/93741053