时间:2023-02-17 20:28:01 | 来源:建站知识
时间:2023-02-17 20:28:01 来源:建站知识
Server Weightsupstream backend { server backend1.example.com weight=5; server backend2.example.com; server 192.0.0.1 backup;}
In the example, http://backend1.example.com has weight 5; the other two servers have the default weight (1), but the one with IP address 192.0.0.1 is marked as a backup server and does not receive requests unless both of the other servers are unavailable. With this configuration of weights, out of every six requests, five are sent http://backend1.example.com and one to backend2.example.com.关键词:地址