1分钟
Varnish负载均衡-如何设定使用多个后端主机
如何设定使用多个后端主机:
backend default {
.host = “172.16.100.6”;
.port = “80”;
}
backend appsrv {
.host = “172.16.100.7”;
.port = “80”;
}
sub vcl_recv {
if (req.url ~ “(?i).php$”) {
set req.backend_hint = appsrv;
} else {
set req.backend_hint = default;
}
…
}
nginx: proxy_pass
haproxy: use_backend
学员评价