2019.9.21 Nginx load balancing algorithm

1, the polling (default)

Each request individually assigned to different backend services chronological order. If a back-end server crashes, automatically remove fault system that allows users to access affected

 

 weigth (polling weight)

The higher the value assigned to the weigth of greater access probability, mainly used for a background for each terminal server performance unbalanced situation, or just to set a different weight in the case of the master, to achieve rational and efficient use of host resources .

2、least_conn

least_connected embodiment the load more equally distributed to a plurality of the above machines. Use least_connected, nginx does not speak a request to distribute on a busy machine, and will distribute the new request to the relatively free of the machine above.

 

Guess you like

Origin www.cnblogs.com/990624lty-jhc/p/11562945.html