Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Highlighted

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

Explorer

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

 

2 REPLIES 2

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

Expert Contributor
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

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

Explorer

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.

Don't have an account?
Coming from Hortonworks? Activate your account here