浏览 578
nginx_upstream_hash:url_hash是nginx的第三方模块,nginx本身不支持,需要第三方模块。nginx在做负载均衡的时,把转发的URL以hash的形式保存。这样可以保证同一个URL始终分给同一个real server,来提高访问速度。
源码地址: https://github.com/evanmiller/nginx_upstream_hash
安装:
cd nginx-0.7.62 # or whatever
./configure --add-module=/path/to/this/directory
make
make install
用法:
upstream backend {
...
hash $request_uri;
hash_again 10; # default 0
}
在 32 位和 64 位系统上工作相同。
有关详细信息,请参阅 http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule
Evan Miller 的问题/补丁,emmiller@gmail.com
按点赞数排序
按时间排序