Nginx Reverse proxy--upstream module

Source: Internet
Author: User
Tags nginx reverse proxy
The 1.nginx load balancer relies on the Ngx_http_upstream_module module, which supports the following proxy modes:

Proxy_pass: Typically used for reverse proxies

Fastcgi_pass: Generally used for interacting with dynamic files, PHP, etc.

Memcached_pass:

2.upstream Module Authoring

Upsrtream Module Name {

Server abc.example.com weight=5;

Can be connected to the domain name or IP, if not the port number by default is 80,weight is the weight, the higher the value the higher the weight

Server abc.com:8080;

Server Unix:/tmp/backend3;

Specify the socket file

}

3.upstream Module Related Instructions

1) should be placed within the Config file http tag

2) Upstream default algorithm is WRR (weighted polling)

3) Content-related parameters

Max_fails Maximum number of attempts, number of realserver after connection

Backup hot standby configuration, enabling backup when the active Realserver fails

Fail_timeout failure timeout time, match above max_fails, check n times, wait n seconds

Down server is not available for use with Ip_hash

The above describes the Nginx reverse proxy--upstream module, including the 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.