Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use Redware, Nginx and Keepalive to realize load balancing

Shulou Source: shulou.com Published: 2022-06-01 02:41:58 10月03日 Update

In this issue, the editor will bring you about how to use Redware, Nginx and Keepalive to achieve load balancing. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.

Load balancing with Redware, Nginx and Keepalive

First of all, there are two types of architecture:

The first kind: stand-alone active and standby

The upper layer redware for distribution, two Nginx for active and standby, and Keepalive for VIP

Usually, the data from redware is distributed to the downstream tomcat,nginx2 through nginx1 as a standby. When Nginx1 is down or something goes wrong, keepalive automatically distributes the data to Nginx2.

[disadvantages]: if the downtime of Nginx1 is caused by too many requests, the problem still exists when switching to Nginx2.

Architecture diagram:

The second kind: dual computer hot standby

Redware provides VIP directly, and both Nginx are alive to distribute data. If one Nginx is down, the other can survive.

The third kind: active and standby mode

The two Nginx point to tomcat1,tomcat2 that the slave is not put into use. When the tomca1 is down, Nginx points to tomcat2.

The fourth kind: polling

Each request of Nginx1 and Nginx2 is allocated to Tomcat1 and Tomcat2 one by one in chronological order. When the backend server Tomcat1 goes down, it can be automatically eliminated and distributed to Tomcat2 sequentially.

IP_hush

The above is what the editor shares with you how to achieve load balancing with Redware, Nginx and Keepalive. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Balance two data content direction architecture problem order analysis upper layer professional small and medium rich content stand-alone that is drawbacks articles aspects time time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Information Shulou Technology Huawei Apple