http { upstream backend { server 10.0.0.100:1234; server 10.0.0.101:1234; } server { # ... location / { # ... proxy_pass http://backend; proxy_bind $split_ip; proxy_set_header X-Forwarded-For $remote_addr; } } split_clients "$remote_addr$remote_port" $split_ip { 10% 10.0.0.210; 10% 10.0.0.211; 10% 10.0.0.212; 10% 10.0.0.213; 10% 10.0.0.214; 10% 10.0.0.215; 10% 10.0.0.216; 10% 10.0.0.217; 10% 10.0.0.218; * 10.0.0.219; } }
https://blog.csdn.net/realmardrid/article/details/111143443
Overcoming Ephemeral Port Exhaustion in NGINX and NGINX Plus
评论前必须登录!
注册