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.