Nginx upstream load balancer Nginx push stream nginx stream log nginx stream ProX

Source: Internet
Author: User
1. Polling (default)
Each request is assigned to a different back-end server in chronological order, and can be automatically rejected if the backend server is down.

## The default server#upstream192.168.93.128{        server192.168.1.8:80 weight=2;        server192.168.93.128:8080 weight=1;}server {    listen80;    server_name192.168.93.128;    location / {        #设置主机头和客户端真实地址,以便服务器获取客户端真实IPproxy_set_header$host;        proxy_set_header$remote_addr;        proxy_set_header$proxy_add_x_forwarded_for;        #禁用缓存proxy_bufferingoff;        #反向代理的地址proxy_passhttp://192.168.93.128;    }}

2, Ip_hash

Each request is allocated according to the hash result of the access IP, so that each visitor has fixed access to a back-end server that can resolve the issue.

3. Fair (third party)

The response time of the back-end server is allocated to the request, and the response time is short of priority allocation.

4. Url_hash (third Party)

Allocate the request by the hash result of the access URL so that the same URL is directed to the same back-end server, which is more efficient when the backend server is cached

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Nginx upstream load balancing, including the stream,nginx aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.