I'm using limit_conn_zone
(with limit_conn
) and limit_req_zone
(with limit_req
) in Nginx
which sits behind a HAProxy
. They both run on the same host.
I see whenever a limit is breached in Nginx
(resulting in 503 responses), the client IP is 127.0.0.1
. This is probably because the only connected client is in fact HAProxy.
This makes me wonder whether the usage of limit_conn
and limit_req
module behind HAProxy
is effective, as it seems to me that Nginx
is effectively limiting requests from HAProxy
but not those from actual users. If this is true, how should I adapt these settings for my set-up?