upstream backend { server squid1:3128; server squid2:3128; hash $request_uri; hash_method crc32; }
tips:
upstream bakend{#定义负载均衡设备的Ip及设备状态 ip_hash; server 127.0.0.1:9090 down; server 127.0.0.1:8080 weight=2; server 127.0.0.1:6060; server 127.0.0.1:7070 backup; } 在需要使用负载均衡的server中增加 proxy_pass