Reverse Proxy with 500k connections

larsg nginx-forum at
Thu Mar 9 14:52:13 UTC 2017

Thanks for the advice.
I implemented this approach. Unfortunately not with 100% success.

When enabling sysctl option "net.ipv4.ip_nonlocal_bind = 1" it is possible
to use local IP addresses ( as proxy_bind address.
But than using such an address (other than, nginx will produce an
error message.
Interesting aspect is: attribute "server" in the log entry is empty. 
When using as proxy_bind, everything is fine.

Do you have any ideas?

2017/03/09 14:27:09 [crit] 69765#0: *478633 connect() to
failed (22: Invalid argument) while connecting to upstream, client: x.x.x.x,
server: , request: "GET /myservice HTTP/1.1", upstream:
"", host: "xxxxxxx:44301"

split_clients "${remote_addr}AAAA" $proxy_ip {
     # does not work 
     # works

server {
  listen              44301 ssl backlog=163840;
  #does not work
  proxy_bind $proxy_ip;

Posted at Nginx Forum:,272808,272854#msg-272854

More information about the nginx mailing list