Reply
Explorer
Posts: 14
Registered: ‎11-12-2015

How to keep original IP address when using HA Proxy with Impala

We are using HAProxy as Load balancer for Impala as recommended by https://www.cloudera.com/documentation/enterprise/5-9-x/topics/impala_proxy.html#proxy_overview 

 

But we'd like to see the original IP address of the client connecting (in the  Network Address attribute - see https://www.cloudera.com/documentation/enterprise/5-6-x/topics/cm_dg_impala_queries.html)

 

But we get the IP of the HAproxy.

 

One solution was using Proxy Protocol : 

 

http://blog.haproxy.com/haproxy/proxy-protocol/

https://cbonte.github.io/haproxy-dconv/configuration-1.7.html#5.2-send-proxy

 

 

But it appears that Impala Deamon (Server) is not compatible with it. Can you recommend other solution to the problem? Or are there plans to make impalad compatible with Proxy Protocol

 

Thanks

 

Cloudera Employee
Posts: 82
Registered: ‎12-07-2015

Re: How to keep original IP address when using HA Proxy with Impala

Hi Antoni,

I don't think there is a way to achieve what you're looking for. Proxy
forwarding headers are an HTTP extension and won't work with the TCP
connections that Impala uses. There are also no other ways I can think of
to identify the IP address of the client machine that connects to the load
balancer.

Cheers, Lars
Explorer
Posts: 14
Registered: ‎11-12-2015

Re: How to keep original IP address when using HA Proxy with Impala

Thanks,

 

To clarify, the proxy protocol is not HTTP related. IT works on TCP level (http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) but it does require that client and server be compatible with it.