请教大神nginx负载问题
假如有ABCDE个相同配置和带宽主机。做负载均衡A为主服务器。那么流量大了。A主机相比较其他副主机的CPU内存带宽等是否承载更高? upstream HA {server AIP:port weight=10 max_fails=3 fail_timeout=5s;
server BIP:port weight=10 max_fails=3 fail_timeout=5s;
server CIP:port weight=10 max_fails=3 fail_timeout=5s;
server DIP:port weight=10 max_fails=3 fail_timeout=5s;
server EIP:port weight=10 max_fails=3 fail_timeout=5s;
}
server {
listen port;
server_name yourdomain.com;
...
location ~ \.*$ {
proxy_pass http(s)://HA;
...
}
...
} 本帖最后由 wangcan45 于 2017-9-4 10:57 编辑
nginx里有个weight 参数 可以设置权重 你都设成一样的权重肯定不会负载更多 楼上正确答案
页:
[1]