I’m using nginx (with ngx_redis2 module) as a redis client, and would
like to establish more than 64511 keep alive connections with a redis
instance. The local port range of Linux is limited to 64511, so I’d like
to set up multiple ip addresses for nginx machine, but I don’t know how
to tell nginx to bind local port on multiple ip addresses. Anyone has
the experience? Thanks in advance.
I’m using nginx (with ngx_redis2 module) as a redis client, and would
like to establish more than 64511 keep alive connections with a redis
instance. The local port range of Linux is limited to 64511, so I’d like
to set up multiple ip addresses for nginx machine, but I don’t know how
to tell nginx to bind local port on multiple ip addresses. Anyone has
the experience? Thanks in advance.
You could also give the redis instance multiple IP addresses and then
put those instances in an upstream block so Nginx will round-robin them.
The port limitation is 64K per address pair (local, remote), so you
can add IP’s on either side to get the same effect.
Cliff
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.