This commit is contained in:
Mateusz Gruszczyński committed 2026-11-23 12:23:41 +01:00
1 parent 54b2ac0838
commit 3b953dcdc6
23 files changed
+643 -29

No files matched your search

+3 -1
View File
@@ -121,11 +121,13 @@ In the panel: add the three backends with **Include in the default load-balancin
Locations can additionally require request conditions (header, cookie, query parameter, method, client IP, host, country), and a match type `any` turns a location into a rule for the whole host — together the full HAProxy `use_backend <group> if <acls>` pattern. See [Custom locations → Request conditions](CUSTOM_LOCATIONS.md#request-conditions-routing-by-header-cookie-ip).
To see which shard served a request, add a response header rule such as `X-S: %[srv_id]` or `X-LB: %[lb_algorithm] %[hash_key]` (one click under **Backends → Backend diagnostics**); see [Variables in header values](RESPONSE_DELIVERY.md#variables-in-header-values-diagnostic-headers).
## Panel helpers
- **Quick setup** buttons fill typical combinations: files by path, session cookie, tenant header, query parameter, client IP, or even load spreading.
- Each algorithm shows a short explanation, and hash settings show the **HAProxy equivalent** lines for comparison.
- **Test distribution** runs in the browser on the unsaved draft. Paste sample paths, URLs or key values to see the hash key and the selected backend for each, the share per backend, and — after ticking **Simulate failure of** — which keys would move. The simulator uses the same SHA-256 rendezvous scoring as the proxy (checked by `tools/dev/test_balance_simulator.js`); load-based algorithms show the expected share by weight instead. It does not account for current concurrency limits, bounded-load spill-over or live health.
- **Test distribution** runs in the browser on the unsaved draft. Paste sample paths, URLs or key values to see the hash key and the selected backend for each, the share per backend, and — after ticking **Simulate failure of** — which keys would move. The simulator uses the same SHA-256 rendezvous scoring as the proxy (reference vectors in `tests/fixtures/balance_rendezvous_vectors.txt`); load-based algorithms show the expected share by weight instead. It does not account for current concurrency limits, bounded-load spill-over or live health.
## Compatibility and limits