External Weight Feeds¶
License: all tiers.
A weight feed lets an outside system say how much traffic a member should take right now, without saying anything about whether it is up. It is the load-shedding counterpart to External Health Signals, which only answer up/down.
Typical inputs: connection count approaching a limit, a bandwidth commit about to be exceeded, a spot-instance price spike, a cache that has gone cold after a restart. In each case the member is perfectly healthy — you just want less traffic on it for a while, and you want that to revert on its own if the feeding system goes quiet.
Feeds are ephemeral, exactly like health signals: each carries a TTL, expires on its own, and lives in the cluster's NATS KV rather than in rqlite. There is no config to persist and nothing to clean up.
Why this is not the health-signal endpoint¶
Posting a weight through /health-signal would be a trapdoor: a JSON body that
omits healthy unmarshals it to false, so "reduce this member's share" would
silently become "mark this member down". The two are separate endpoints backed
by separate stores for that reason alone.
The contract is a multiplier¶
curl -X POST "$GSLB/api/v1/members/$MEMBER_ID/weight-feed" \
-H "Authorization: Bearer $GSLB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"source":"datadog","weight":0.5,"metric":"connections","value":8500,"ttl":120}'
| Field | Meaning |
|---|---|
source |
Who is speaking. Feeds are keyed per source, so several systems can feed one member. Required. |
weight |
Multiplier against the member's configured weight. 1 = no change, 0.5 = half, 0 = drain. Capped at 10. Required. |
metric, value |
Optional, echoed back for operators. What the number actually was. |
ttl |
Seconds the feed stays live. Default 300, max 3600. |
Nexus does not accept a raw metric and guess a scale for it, because the scale
lives with the pusher, not with us — "8500 connections" only means something
next to a limit. The one exception is ?format=generic, where the caller
supplies the scale in the same request:
curl -X POST "$GSLB/api/v1/members/$MEMBER_ID/weight-feed?format=generic" \
-H "Authorization: Bearer $GSLB_API_KEY" \
-d '{"source":"exporter","metric":"connections","value":8500,"max":10000,"ttl":120}'
# multiplier = 1 - 8500/10000 = 0.15
How it is applied¶
The multiplier scales the member's configured weight in the one place every algorithm reads weight from, so weighted round-robin shifts without anyone editing a filter chain, and the shadow path and the query tracer see the same number the resolver used.
- Several feeds on one member: the lowest multiplier wins. Two systems disagreeing about how much to shed should shed the larger amount, matching how health signals aggregate conservatively.
- Expiry: the member returns to its configured weight on its own. This is what makes a feed safe to push from something that might stop pushing.
- Draining to zero is allowed and does not mark the member unhealthy — it stays in the pool, in health checks, and in AXFR.
- Only weight-sensitive algorithms respond. A feed changes a member's
weight, so it moves traffic under
weighted-round-robinand any filter chain that scores on weight. Plainround-robinignores weight by definition, and a service using it keeps its even split however hard a feed sheds — including a drain to zero. Verified on the wire: the same drain that left a round-robin service at 50/50 sent 20 of 20 queries to the other member once the service was switched toweighted-round-robin. - Amplification is capped at 10x (
health.MaxFeedMultiplier). The API rejects a larger multiplier with400andweight must be a multiplier between 0 and 10, rather than accepting it and clamping silently — a feed asking for 50x is a bug in the pusher, and finding out at push time beats finding out from a traffic graph. The mirror image of fail-open: a telemetry fault can neither empty a pool nor flood one member. - Fail-open: if feeds would drain every member of a pool to zero, they are
ignored and configured weights are restored. Shedding only means something
relative to somewhere else to send traffic; a single exporter pushing
0to every member must not empty the pool.
Feeds are mirrored across the cluster over NATS, so a feed posted to one node's API shifts traffic on every node. Without NATS configured they stay node-local, which on a multi-node cluster means only that node's answers shift — the daemon logs which mode it is in at startup.
Seeing what a feed is doing¶
203.0.113.10 — configured weight 10
SOURCE MULTIPLIER METRIC EXPIRES
datadog x0.5 connections=8500 2026-08-09T19:12:04Z
cost x0.2 spot-price=1.42 2026-08-09T19:11:40Z
Effective weight: 2 (x0.2)
The WebUI shows the same on the member panel, and the
query tracer reports both baseWeight and weight per
candidate — the pair is how you tell a feed apart from a configuration change.
API¶
| Method | Path | Permission |
|---|---|---|
| POST | /api/v1/members/{id}/weight-feed |
member:write |
| GET | /api/v1/members/{id}/weight-feeds |
member:read |
Both return 503 when weight feeds are unavailable on the node (no DNS server
running).
Limits¶
- A feed cannot raise a member above
10×its configured weight. One misconfigured exporter should not be able to pull a whole pool's traffic onto a single member. - Feeds scale weight only. They do not override health, priority, or geo placement — a drained member is still chosen if it is the only candidate a filter chain leaves standing.