Load Balancer
Run several upstreams behind one public endpoint. Start simple, then add health checks and runtime controls.
Two upstreams
[[vhosts.routes]]
name = "app"
path_prefix = "/"
action = "proxy"
[vhosts.routes.proxy]
upstreams = [
"10.0.0.11:8080",
"10.0.0.12:8080",
]
upstream_weights = [100, 50]
upstream_aliases = ["app-a", "app-b"]
Balancing controls
| Control | Use it when |
|---|---|
upstream_weights | Backends should receive different traffic shares. |
backup_upstreams | Some backends should be used only when primary choices fail. |
drain_upstreams | A backend should finish existing work but receive no new traffic. |
disabled_upstreams | A backend must be kept out of rotation. |
upstream_max_in_flight | A backend needs a local concurrency cap. |
Dynamic upstream file
[vhosts.routes.proxy]
upstreams_file = "/run/fluxheim/backends/app.txt"
upstreams_file_refresh_secs = 5
Use static upstreams when you need weights, aliases, backup, drain, or disabled state. File and DNS refreshed pools intentionally keep the contract smaller.
What it gives you
- Focused load-balancer release images are available.
- Health checks can keep broken backends out of rotation.
- Drain and force-down operations help with maintenance windows.
- Managed-cookie affinity is available when sessions need a stable backend.