1.roundrobin
Polling method, which distributes requests to each background server in turn, is the default load balancing method.
It is suitable for situations where the background machine performance is consistent.
Broken machines can be automatically removed from the service list.
2.weight
distributes requests to different machines based on weight, which is suitable for situations where the background machine performance is different.
3.ip_hash
Send the request to the backend server based on the hash value of the requester's IP, which can ensure that requests from the same IP are sent to a fixed machine, which can solve the session problem.
4.url_hash
Divides requests into different machines according to the hash value of the requested URL. It is highly efficient when the backend server is cached.
5.fair
distributes requests based on the background response time. The shorter the response time, the more requests will be distributed.
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });The above introduces the five load balancing modes of Nginx, including nginx and load balancing. I hope it will be helpful to friends who are interested in PHP tutorials.