feat: via.tab.unknown metric to detect non-sticky routing#118
Merged
Conversation
StateTab and the tab Ctx live in this pod's memory, so an action or SSE request routed to a pod that doesn't hold the tab's Ctx 404s (or re-bootstraps) — the silent failure mode of running without sticky sessions. There was no signal an operator could alert on, just mysterious 404s. Emit a via.tab.unknown counter (label kind=action|sse) when a well-formed via_tab this pod never registered arrives. Under sticky routing it tracks only normal TTL churn; under round-robin it scales with traffic — a clear non-sticky-LB signal. An empty/malformed tab id is a probe and isn't counted. Documented in the metrics catalogue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Critic panel finding #3 (major; raised 4×). Sticky sessions are mandatory for correctness (Ctx/StateTab are pod-local), but a non-sticky LB just produced mysterious 404s with no signal to alert on.
Change
Emit
via.tab.unknown(labelkind=action|sse) when a well-formedvia_tabthis pod never registered arrives — the exact symptom of a request routed to the wrong pod. Under sticky routing it tracks only normal TTL churn; under round-robin it scales with traffic. Empty/malformed tab ids (probes) aren't counted. Added to the metrics catalogue (withvia.session.mismatch, the cookie-clobber signal).Tests
via.tab.unknown:kind,actionFull
ci-check.shgreen.