HAProxy ALOHA Documentation 11.5

Client IP preservation

When you use the LB Layer 7 tab to load balance traffic, HAProxy ALOHA acts as a proxy connected to the client on one end and the backend server on the other. In practice, that means that the server sees connections as through they originated from HAProxy ALOHA, with the client's source IP address masked by the load balancer's IP. That can skew the server's logs.

To overcome this, you can use the following techniques to preserve the client's source IP address and pass it to backend servers:

Enable the Proxy Protocol

Preserve the client's IP address by using the Proxy Protocol.

Add an X-Forwarded-For header

Preserve the client's IP address by adding an X-Forwarded-For header.


Next up

Enable the Proxy Protocol
HAProxyConf 2022 - Call for papers