Traffic governance¶
Model traffic is governed by the control plane: what is queued, what is rate limited, what quota window applies, and what was consumed. All four are recorded rather than left to the serving runtime, so the answer to "why was this call throttled" is in the control plane's records.
Four things are tracked¶
| Tracked | Recorded as |
|---|---|
| Queue state | The current queue position and depth per scope |
| Rate limit events | An append-only record of each limiting decision |
| Token usage | An append-only record of what was consumed |
| Quota window | The window state a scope is currently inside |
Rate limits and token usage are appended rather than updated, so the history of limiting decisions survives the state that produced them.
Quota resolves the narrowest scope with state¶
flowchart TB
subgraph WS["WORKSPACE"]
direction TB
WQ[("window state")]
subgraph PR["PROJECT"]
direction TB
PQ[("window state")]
subgraph BD["BINDING<br/>by name, then project:binding"]
direction TB
BQ[("window state")]
end
end
end
The scopes nest, and the search starts in the innermost box and moves outward. The first scope with recorded window state wins and the search stops. A binding-level window overrides the project's; a project's overrides the workspace's. They do not compose.
The same resolution order governs assignment dispatch, so model traffic and dispatch admission answer to one hierarchy rather than two. See Fairness and quota.
A limiting decision carries its window¶
A blocked decision reports the scope it was made in, the window length, the maximum, what has been consumed, what remains, and when to retry. The retry delay comes from the window rather than from a fixed value, so a caller that honours it retries when the window could plausibly have moved.
Two reasons distinguish the cause:
assignment_dispatch_quota_exceeded the window's allowance is used up
assignment_dispatch_quota_hard_throttle the scope is hard throttled
A hard throttle allows nothing regardless of what remains, which separates it from exhausting a window.
Priority classes order what is allowed¶
Model traffic carries a priority that normalises to one of three classes:
An unrecognised priority becomes normal rather than sorting to an edge.
Within a class, candidates are distributed round-robin across projects, so one
busy project does not consume its class.
Cost is reportable because usage is recorded¶
Token usage is appended per call with its scope, so a cost report is a query over recorded facts rather than an estimate. The report is read through the same surface as the rest of the traffic records.
What the node contributes¶
Nodes produce the quota and rate-limit signals from what they observe while serving, and report them. The control plane holds the state and makes the decisions. A node enforces a decision it was given rather than deciding locally and reporting afterwards.