Repository navigation
feat(moq-net): a relay counts what its route layer does #9126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1ccfc1c
e36bcaf
b9b748c
a5b6740
d2e1176
ba856c1
982641e
e052da8
b68fdfc
ae382fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -366,7 +366,13 @@ limit: the track then ends with `FRAME_TOO_LARGE` instead of going stale. | |||||
| "sessions_refused": { "refused": 0, "unavailable": 0, "request": 0, "forbidden": 0, "membership": 0, "expired": 0 }, | ||||||
| "sessions_failed": { "idle_timeout": 1, "transport": 0, "application": 0, "expired": 0 }, | ||||||
| "announces_peak": 40, "subscriptions_peak": 900, | ||||||
| "wire_tx": 2048, "wire_rx": 1024, "routes_refused": 0 | ||||||
| "wire_tx": 2048, "wire_rx": 1024, "routes_refused": 0, | ||||||
| "routes": { | ||||||
| "changed": 4, "rewritten": 120, | ||||||
| "sent": { "dead": 1, "drain": 0 }, "received": { "dead": 0, "drain": 1 }, | ||||||
| "refused": { "path": 0, "scope": 0, "looped": 0 }, | ||||||
| "closed": { "stalled": 0, "overrun": 0, "malformed": 0, "role": 0, "unasked": 0, "regressed": 0, "other": 0 } | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
@@ -436,10 +442,28 @@ never goes down while the track lives. Summing | |||||
| nodes or labels takes the largest. | ||||||
|
|
||||||
| `routes_refused` counts the routes and claims that the label's moq-lite-07 | ||||||
| sessions forwarded and the relay refused, such as a route with a flag this | ||||||
| release does not know. The relay withdraws each one and keeps the session, so a | ||||||
| neighbour on a newer release costs only that route. A rising count during a | ||||||
| rollout means the releases disagree on route content. | ||||||
| sessions forwarded and the relay refused, keeping the session: the total of | ||||||
| `routes.refused`. The relay withdraws each one, so a neighbour on a newer | ||||||
| release costs only that route. | ||||||
|
|
||||||
| `routes` counts what the label's moq-lite-07 sessions did on the route layer, | ||||||
| each under the label of the session whose peer caused it. Its size never | ||||||
| depends on how many broadcasts or relays the mesh has. When rolling a mesh onto | ||||||
| a new release one relay at a time, compare a canary's rates with its | ||||||
| neighbours': | ||||||
|
|
||||||
| | Field | Counts | A rise during a rollout means | | ||||||
| | --- | --- | --- | | ||||||
| | `changed` | Times a route to a relay changed on what the peer sent or how its session ended, counting only changes that alter how its broadcasts are served (not a move to another path of the same rank). | The mesh churns through this peer: links flapping, or two releases ranking routes differently. | | ||||||
| | `rewritten` | Broadcasts rewritten into the origin behind those changes: every broadcast the relay still claims, once per change. | Each change is costing the relay work in proportion to what lies behind it. Divide by `changed` for the cost of one. | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document that The Suggested doc fix
Committable suggestion
|
||||||
| | `sent` / `received` | DEAD (a relay-to-relay session closed) and DRAIN (a relay sent GOAWAY) withdrawals, by kind. | Relays restarting or draining. A DRAIN rate without matching DEADs is a drain that never finishes. | | ||||||
| | `refused` | Refused routes and claims by reason: `path` (a path this relay cannot hold), `scope` (outside the session's root or grant, or what the relay serves), `looped` (the way already crosses this relay, or exceeds the hop limit). | `path` or `looped`: the releases disagree on route content. `scope`: a grant narrower than what the peer announces. | | ||||||
| | `closed` | Sessions the route layer closed, by kind: `stalled` (the peer stopped reading its route stream), `overrun` (it read too slowly for what changed), `malformed` (it sent what the rule never builds, or broke the stream), `role` (what its role never sends), `unasked` (its stream fell out of step), `regressed` (its relay restarted with an older start, or two relays share an id), `other` (such as announcing past the session's cap). | Anything here on a canary that its neighbours lack: the releases disagree on the route wire. `stalled` and `overrun` alone point at an overloaded peer. | | ||||||
|
|
||||||
| A route that ended takes its claims with it, so they count as claims ending | ||||||
| rather than in `rewritten`. On moq-lite-07 a route change updates a broadcast | ||||||
| in place: the broadcast's `announces_started` and `announces_ended` count it | ||||||
| coming and going, not its routes changing. | ||||||
|
|
||||||
| ### Counters | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute sent withdrawals to the session they are sent to.
The doc says every counter goes under the label of the session whose peer caused the event. That holds for route changes and received withdrawals. It does not hold for sent withdrawals. The relay records a sent withdrawal on the session it writes to, and
route_stats.rsexpects a withdrawal caused bycto appear asroutes("a").sent. State this split in the doc.Suggested fix
Committable suggestion