Does nginx use the direct client's IP for ip_hash, or does it also observe X-forwarded-for HTTP header to use as the IP address to ip_hash?
For example, in a situation where some clients using a shared proxy server access an nginx load-balancer w/ ip_hash, would all of those clients hash to the same node?
Or would nginx use the X-forwarded-for header to hash them to different nodes?
Best Answer
From:
http://wiki.nginx.org/HttpUpstreamModule#ip_hash
Also from:
Validating the documentation. It would be pretty easy to modify the code to include data like the XFF.