Hello!
We are looking for a solution helping us distribute(balance) incoming traffic to server farm. We are interested in to use HAPROXY as load balancer. Provided some experiments we had realized we weren’t able to transmit sourceIP (clientIP) to the back-end. It is because of the back-ends placed in local area network ip space and clients connects from the Internet.**
Scheme is:
clientIP – (Internet)–>[ HA frontendIP | HA backendIP] --(LAN)–> backends
If we cannot send clientIP to backend we cannot use HAPROXY as balancer. But we want:)
Backend supports special protocol allowing receive clientIP. Is there ability integrate it to HAPROXY? May there another way solve out issue?
Thanks for help
Let me know. This solution uses Proxy Protocol (Proxy Protocol - HAProxy Technologies) and I have to add support it in my software working at backends. Am I right?
The solution could be either proxy protocol, as already mentioned, if traffic is loadbalanced on layer 4 (TCP). Indeed the proxy protocol of the same version must be activated in both HAProxy backend config and in the server farm.
Or the solution could be X-forwarded-for header, if traffic is loadbalanced on layer 7 (HTTP). This option is typically easier to use. Look at HAProxy configuration directive option forwardfor, see here.