Skip to main content

Load Balancing Settings

This reference covers all of Pomerium's Load Balancing Settings:

Load Balancing Policy

Load Balancing Policy defines the load balancing strategy between multiple upstream servers.

See Envoy documentation for more details.

How to configure

Some policy types support additional configuration.

Config file keysTypeUsageDefault
lb_policyenumoptionalROUND_ROBIN

Examples

routes:
- from: https://myapp.localhost.pomerium.io
to:
- http://myapp-srv-1:8080
- http://myapp-srv-2:8080
- http://myapp-srv-3:8080
- http://myapp-srv-4:8080
- http://myapp-srv-5:8080
lb_policy: LEAST_REQUEST
least_request_lb_config:
choice_count: 2 # current envoy default

Load Balancing Policy options

Load Balancer Policy options
ROUND_ROBIN
RING_HASH (may be further configured using ring_hash_lb_config option)
LEAST_REQUEST (may be further configured using least_request_lb_config)
RANDOM
MAGLEV (may be further configured using maglev_lb_config option)

Health Checks

When defined, Health Checks will issue periodic health check requests to upstream servers and unhealthy upstream servers won't serve traffic.

See Envoy's outlier_detection for automatic upstream server health detection. In the presence of multiple upstream servers, it is recommended to set up either health_checks, outlier_detection, or both.

See the Envoy documentation for a list of supported parameters.

How to configure

Only one of http_health_check, tcp_health_check, or grpc_health_check may be configured per health_check object definition.

See Load Balancing for example configurations.

Config file keysTypeUsage
health_checksarray of objectsoptional