Fluxheim/เอกสาร/ตัวกระจายโหลด

ตัวกระจายโหลด

Run several upstreams behind one public endpoint. Start 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"]

การควบคุมความสมดุล

การควบคุมใช้เมื่อ
upstream_weightsแบ็กเอนด์s should receive different ทราฟฟิก shares.
backup_upstreamsควรใช้ backend บางตัวเฉพาะเมื่อ backend หลักล้มเหลวเท่านั้น
drain_upstreamsA แบ็กเอนด์ should finish existing work but receive no new ทราฟฟิก.
disabled_upstreamsA แบ็กเอนด์ must be kept out of rotation.
upstream_max_in_flightA แบ็กเอนด์ needs a local concurrency cap.

Dynamic อัปสตรีม file

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

ใช้ static upstream เมื่อต้องการ weight, alias, backup, drain หรือสถานะ disabled ส่วน pool ที่อัปเดตจากไฟล์และ DNS จงใจรองรับความสามารถน้อยกว่า

สิ่งที่ได้

  • Focused load-balancer release images are available.
  • health check ช่วยนำ backend ที่เสียออกจาก rotation ได้
  • การดำเนินการระบายน้ำและการบังคับลงช่วยในการบำรุงรักษา
  • Managed-cookie affinity is available when sessions need a stable แบ็กเอนด์.
ไทย