Enabling Dual-Stack Support for HAProxy for Runtime Services
Learn how to configure HAProxy to manage both IPv4 and IPv6 traffic. These settings ensure that Cloudera Runtime services, such as Impala, communicate effectively in dual-stack environments without connectivity failures.
HAProxy bind settings
The following table describes the bind parameter used to listen on multiple IP versions:
| Parameter | Description | Configuration Syntax |
|---|---|---|
| bind | Defines the address and port HAProxy listens on. To support dual-stack traffic, use the IPv6 wildcard address with the v4v6 option. | bind ::: <port_number> v4v6 |
HAProxy backend resolution settings
The following table describes the settings used to manage connectivity between HAProxy and backend Impala services in a dual-stack environment:
| Property | Location | Description |
|---|---|---|
| resolve-prefer ipv4 | defaults or server block | Instructs HAProxy to prioritize IPv4 addresses when a backend hostname resolves to both A (IPv4) and AAAA (IPv6) records. This prevents connectivity failures when the backend service only listens on IPv4. |
To address this issue, you must instruct HAProxy to prefer IPv4 when resolving backend service names by adding default-server resolve-prefer ipv4 to the defaults configuration block.
Configuration examples
- To configure HAProxy to listen on port 25003 for both IPv4 and IPv6 clients, add the following line to the frontend or listen section:
bind :::25003 v4v6 - To prevent HAProxy from failing when finding IPv6 DNS records for an IPv4-only Impala service, add the following line to the defaults configuration block:
default-server resolve-prefer ipv4
