Reverse Proxy - Both Servers Returned in Logs?

mevans336 nginx-forum at forum.nginx.org
Wed Nov 30 16:45:45 UTC 2016


We are experiencing an issue where we have Nginx configured as a reverse
proxy. SSL terminates with Nginx also. On the back end are two Wildfly
servers. If a session is bound to server 2 (via Nginx ip_hash) after 30
minutes the user is redirected back to server 1 and the following is logged
in Nginx. We can also recreate by stopping server1 and forcing all requests
to server2, then restarting server1. Sessions are immediately sent back to
server1.

[30/Nov/2016:11:34:55 -0500] 172.72.208.12 - - - mysite.mydomaincom  to:
10.0.0.106:8080, 10.0.0.107:8080: GET /blank.gif HTTP/1.1
upstream_response_time 0.000, 0.007 msec 1480523695.444 request_time 0.007 

What would cause both back end servers to be logged? A normal request only
shows a single IP for the backend server.

Here is the relevant nginx.conf:

upstream prodtemp {
                ip_hash;
                server 10.0.0.106:8080 max_fails=1 fail_timeout=5s;
                server 10.0.0.107:8080 max_fails=1 fail_timeout=5s;
                keepalive 50;
}

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,271247,271247#msg-271247



More information about the nginx mailing list