Several allocation methods for nginxupstream

Source: Internet
Author: User
Author: the upstream of ayoungparts currently supports four allocation methods. 1. Round Robin (default) each request is distributed to different backend servers one by one in chronological order. If the backend servers are down, can be removed automatically. 2. weight specifies the polling probability. weight is directly proportional to the access ratio, which is used in case of uneven backend server performance. 2. ip_hash each

Author: Ayou

Nginx upsTrCurrently, eam supports four allocation methods.

1. Round Robin (default)

Each request is distributed to different backend servers one by one in chronological order. If the backend servers are down, they can be removed automatically.

2. weight

Specify the round-robin probability. weight is proportional to the access ratio, which is used when the backend server performance is uneven.

2. ip_hash

Each request is allocated according to the hash result of the access ip address, so that each visitor accesses a backend server at a fixed time, which can solve the session problem.

3. fair (third party)

Requests are allocated based on the response time of the backend server. Requests with short response time are prioritized.

4. url_hash (third-party)

Requests are allocated based on the hash result of the access url so that each url is directed to the same backend server. The backend server is effective when it is cached.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.