Skip to content

feat: via.tab.unknown metric to detect non-sticky routing#118

Merged
joaomdsg merged 2 commits into
mainfrom
feat/sticky-detect
Jun 10, 2026
Merged

feat: via.tab.unknown metric to detect non-sticky routing#118
joaomdsg merged 2 commits into
mainfrom
feat/sticky-detect

Conversation

@joaomdsg

Copy link
Copy Markdown
Member

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 (label kind=action|sse) when a well-formed via_tab this 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 (with via.session.mismatch, the cookie-clobber signal).

Tests

  • unknown well-formed tab → 404 + via.tab.unknown:kind,action
  • missing tab → not counted

Full ci-check.sh green.

joaomdsg added 2 commits June 10, 2026 19:20
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.
@joaomdsg
joaomdsg merged commit ff2f1e1 into main Jun 10, 2026
6 checks passed
@joaomdsg
joaomdsg deleted the feat/sticky-detect branch June 10, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant