Configure Multiple Load Balancers
This feature was introduced in Hydrolix version 5.7.4.
The extra_loadbalancers tunable provisions additional Traefik load balancer services. Each additional service beyond the default traefik service interacts independently with external, cloud load balancer provisioning APIs.
Additional load balancers provide flexibility for handling high-traffic and advanced networking requirements.
When to use multiple load balancers⚓︎
Multiple load balancers are useful in several scenarios:
- High connection volumes: In busy clusters with sustained high traffic, additional load balancers distribute the connection load across multiple endpoints.
- Independent address family support: Deploy separate load balancers for IPv4 and IPv6, allowing independent configuration and management of each address family.
- Traffic isolation: Separate load balancers for different traffic types or services, improving fault isolation and traffic management.
- Regional or availability zone distribution: Distribute load balancers across different network boundaries for improved resilience.
Configuration⚓︎
Set the extra_loadbalancers tunable in the hydrolixcluster.yaml file under spec::
The value specifies the number of additional load balancers to create. When configured:
extra_loadbalancers: 0(default): Only the standardtraefikservice existsextra_loadbalancers: 1: Createstraefikandtraefik-extra-1extra_loadbalancers: 2: Createstraefik,traefik-extra-1, andtraefik-extra-2
Service naming⚓︎
Additional load balancer services follow the naming pattern traefik-extra-<N>, where <N> is a sequential number starting from 1. The original traefik service remains unchanged.
Scaling down⚓︎
Reducing the extra_loadbalancers value removes the highest-numbered services first.
Before scaling down⚓︎
This creates four services:
traefiktraefik-extra-1traefik-extra-2traefik-extra-3
After scaling down⚓︎
This removes the highest-numbered services, leaving:
traefiktraefik-extra-1
The services traefik-extra-3 and traefik-extra-2 are removed in that order.
Warning
Ensure traffic is properly drained from a load balancer before removing it to avoid connection disruptions.
Example: IPv4 and IPv6 separation⚓︎
This example configures separate load balancers for IPv4 and IPv6 traffic:
| IPv4 and IPv6 Separation Example | |
|---|---|
After applying this configuration, use the cloud provider's tools to assign the appropriate address families to each service:
traefik: Configured for IPv4traefik-extra-1: Configured for IPv6
The specific steps depend on the cloud provider.
Consult the relevant cloud load-balancer pages
- AWS NLB annotations
- GCP forwarding rules and LoadBalancer Service parameters
- Azure load balancer configuration
- Linode NodeBalancer settings
Verification⚓︎
After configuring additional load balancers, verify the services are created:
| Verify Load Balancer Services | |
|---|---|
Expected output when extra_loadbalancers: 2:
| Example Output | |
|---|---|
Related tunables⚓︎
disable_traefik_http_port: Disable port 80 forwardingdisable_traefik_https_port: Disable port 443 forwardingaws_load_balancer_subnets: Specify subnets for AWS load balancersaws_load_balancer_tags: Add tags to AWS load balancers