负载均衡的五种算法:点击打开链接
配置样例:
在http{}中添加:
upstream cluster {
server 127.0.0.1:9080;
server 127.0.0.1:8080;
}
server {
listen 8000;
location / {
proxy_pass http://cluster;
}
}
负载均衡的五种算法:点击打开链接
配置样例:
在http{}中添加:
upstream cluster {
server 127.0.0.1:9080;
server 127.0.0.1:8080;
}
server {
listen 8000;
location / {
proxy_pass http://cluster;
}
}