Nginx as Reverse Proxy
We are using Nginx as a reverse proxy which is in front of 2 clustered application and sitting behind a Load Balancer. We are using ip_hash as Load balancing algorithm for session persistance as mentioned in this link but we see that all the requests goes to only one 1 application server due to which load is not getting balanced. In access.log file we see that all the incoming requests consists of only LB ip and not the Real client IP address due to which Nginx assumes all the requests are coming from a single user, hence transferring request to only 1 application server (another sits idle all the time). How can we get the real client IP address so that the ip_hash algorithm can recognize the real client ip instead of LB ip.
Alot thanks in advance.