摘要:
1 server { 2 include listen.conf; 3 server_name ucenter.gznow.org; 4 5 location ~ \.php$ { 6 limit_conn one 20; 7 limit_rate 50k; 8 proxy_pass http://s1; 9 include proxy.conf;10 }11 12 location / {13 expires max;14 ... 阅读全文
posted @ 2012-05-23 15:47
Rayol
阅读(800)
评论(0)
推荐(0)
摘要:
Nginx中Upstream目前支持4种方式的分配1、轮询(默认)每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。2、weight指定轮询几率,weight和访问比率成正比,用于后端服务器性能不均的情况。 例如: upstream bakend { server 192.168.0.14 weight=10; server 192.168.0.15 weight=10; }3、ip_hash 每个请求按访问ip的hash结果分配,这样每个访客固定访问一个后端服务器,可以解决session的问题。例如:1 upst... 阅读全文
posted @ 2012-05-23 15:25
Rayol
阅读(1295)
评论(0)
推荐(1)

浙公网安备 33010602011771号