stream{
upstream backup{
server 103.229.213.228:22;
server 103.229.215.172:22;
}
server{
listen 12345;
#proxy_connect_timeout 1s;
#proxy_timeout 3s;
proxy_pass backup; //请求处理不了,转发给 backup的服务端
}
}
[root@10-100-10-21 ~]# ssh -p 12345 163.53.168.43
upstream webserver{
ip_hash;
server 103.229.213.228:8080 max_fails=1 fail_timeout=30;
server 103.229.215.172:8080;
#server 103.229.215.172:8080 down;
}