- 论坛徽章:
- 0
|
ngx_http_upstream_fair_module
This module is not distributed with the Nginx source. Installation instructions are below.
The upstream_fair module sends an incoming request to the least-busy backend server, rather than distributing requests round-robin.
Example
upstream backend {
server server1;
server server2;
fair;
}
Directives
fair
upstream_fair_shm_size
fair
syntax fair
context upstream
Enables fairness.
upstream_fair_shm_size
syntax upstream_fair_shm_size size
default upstream_fair_shm_size 32k
context main
Size of the shared memory for storing information about the busy-ness of backends. Defaults to 8 pages (so 32k on most systems).
Installation
This module is not distributed with the Nginx source. You can browse its git repository, or download the tar ball(http://github.com/gnosek/nginx-upstream-fair/tarball/master).
After extracting, add the following option to your Nginx ./configure command:
--add-module=path/to/upstream_fair/directory
Then "make" and "make install" as usual.
[ 本帖最后由 tianrenly 于 2008-9-1 21:39 编辑 ] |
|