-
-
Notifications
You must be signed in to change notification settings - Fork 54
Load balancing configuration
yusing edited this page Feb 6, 2025
·
7 revisions
Routes with same load_balance.link
are grouped in the same load-balancer
Currently only support HTTP(s) routes
Property | Description | Default | Allowed Values / Syntax |
---|---|---|---|
link | name and subdomain of load-balancer | N/A | string |
mode | load-balance mode | round_robin |
|
options | mode specific options | N/A | N/A |
services:
whoami:
image: traefik/whoami
deploy:
replicas: 10
labels:
proxy.*.load_balance: |
link: whoami
mode: round_robin
ports:
- 80
restart: unless-stopped
Set the same load_balance.link
across all nodes
services:
whoami:
image: traefik/whoami
container_name: whoami
labels:
proxy.whoami.load_balance: |
link: whoami
mode: round_robin
ports:
- 80
restart: unless-stopped
whoami-1:
host: 10.0.2.1
load_balance:
link: whoami
mode: round_robin
whoami-2:
host: 10.0.2.2
load_balance:
link: whoami
whoami-3:
host: 10.0.2.3
load_balance:
link: whoami