Fluxheim/문서/로드 밸런서

로드 밸런서

실행 several upstreams behind one public endpoint. 시작 simple, then add health checks and runtime controls.

두 업스트림

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

제어사용할 때
upstream_weightsbackend가 서로 다른 traffic share를 받아야 합니다.
backup_upstreams일부 backend는 primary 선택지가 실패할 때만 사용되어야 합니다.
drain_upstreamsbackend가 기존 작업은 끝내되 새 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

weight, alias, backup, drain, disabled state가 필요하면 static upstream을 사용하세요. file 및 DNS refreshed pool은 의도적으로 contract를 더 작게 유지합니다.

제공하는 것

  • Focused load-balancer release images are available.
  • health check는 고장난 backend를 rotation에서 제외할 수 있습니다.
  • drain 및 force-down 작업은 maintenance window에 도움이 됩니다.
  • session에 stable backend가 필요하면 managed-cookie affinity를 사용할 수 있습니다.
한국어