Fluxheim/ドキュメント/ロードバランサー

ロードバランサー

実行 several upstreams behind one public endpoint. 開始 simple, then add health checks and runtime controls.

2つのupstream

[[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

制御使う場面
upstream_weightsbackendsに異なるtraffic sharesを割り当てたい場合。
backup_upstreams一部のbackendsをprimary choices失敗時だけ使いたい場合。
drain_upstreamsbackendは既存作業を終えるがnew trafficを受け取らない状態にしたい場合。
disabled_upstreamsbackendをrotationから外したままにする必要がある場合。
upstream_max_in_flightbackendにlocal concurrency capが必要な場合。

dynamic upstream file

[vhosts.routes.proxy]
upstreams_file = "/run/fluxheim/backends/app.txt"
upstreams_file_refresh_secs = 5

weights、aliases、backup、drain、disabled stateが必要な場合はstatic upstreamsを使います。FileおよびDNS refreshed poolsは意図的にcontractを小さくしています。

得られるもの

  • Focused load-balancer release images are available.
  • Health checksは壊れたbackendsをrotationから外せます。
  • drainとforce-down操作はmaintenance windowsで役立ちます。
  • sessionsにstable backendが必要な場合はmanaged-cookie affinityを使えます。
日本語