Skip to content

Observed-dependency TTL expiry drops actively-used clusters mid-traffic; ODCDS recovery can stall for minutes under snapshot churn #636

Closed

Description

@bpalermo

Found live during the 2026-08-09 soak (rev 187 / 0.91.0). Every UDS-client ledger burst tonight — and retroactively the "unexplained" pre-soak burst at 17:56Z — is one mechanism, fully evidenced end to end.

The failure

The uds-client (worker-01, ~1 rps alternating between two backends) periodically gets multi-minute windows of 503 NC cluster_not_found from its own node proxy — reporter=source, upstream_cluster="-", each request ~2001–2041ms (on-demand timeout shape). Worst observed window tonight: 5.5 minutes (04:04:35Z → 04:10:05Z).

Causal chain (each link evidenced)

  1. Trigger (chart bug, fixed separately): charts/udsecho wrote config.aether.io/upstreams: "uds-echo.aether-test" — dot form. UpstreamsFromPod namespace-qualifies any slash-less value, yielding the nonsense key aether-test/uds-echo.aether-test. The declared-upstream protection silently never existed.
  2. Core defect A — warm traffic does not renew observed membership. With no (valid) declaration, both services rode ODCDS-observed dep-set membership (TTL 1h). ObserveDependency refreshes the timestamp only on ODCDS re-requests; traffic flowing through the delivered cluster never renews it. An undeclared steady-rate consumer is therefore guaranteed a mid-traffic drop every TTL cycle. Agent log at burst start (04:04:32.77Z): "service left dependency set; dropping cluster/vhost (cold path takes over)" for both services, then "expired observed upstreams from node dependency set","count":2.
  3. Roll correlation is coincidental: PruneObservedDependencies piggybacks on refresher activity, so an already-due expiry fires seconds after whatever unrelated roll comes next (tonight: svc-1 at 04:04:31Z, 4s before the burst). The roll is the occasion, not the cause.
  4. Core defect B — ODCDS recovery is wildly variable under snapshot churn. The 02:36Z drop recovered in ~4s (2 failed requests). The 04:04Z drop — during active roll-driven snapshot churn (pushes every ~300ms) — produced continuous 2s NC failures for 5.5 minutes before the agent logged the on-demand re-add ("observed undeclared upstream (ODCDS miss); adding", both services, 04:10:03Z), after which the very next requests succeeded. Something between Envoy's on-demand machinery and the agent's ODCDS path stalls or negative-caches while snapshots are churning; "cold path takes over" is not a bounded-latency promise today.

Why this is not UDS-specific

Nothing in the chain touches pipe delivery. Any undeclared (or mis-declared) upstream with steady traffic hits the same drop-every-TTL + variable-recovery behavior. The UDS client was simply the only workload in that state — high-rate consumers (k6, prober) mask recovery inside their retry/rate profile, and their targets are correctly declared.

Suggested directions

  • A: renew observed-dep membership on data-plane use (e.g. fold active-cluster traffic or EDS/cluster reference-counting into the prune decision), or never prune a cluster with live upstream connections — expiry should mean idle, not undeclared-but-busy.
  • B: bound ODCDS re-add latency under snapshot churn — reproduce with a churning snapshot + on-demand request storm; instrument where the 5.5 minutes went (Envoy negative caching? coalesced-request loss? agent-side).
  • Hardening: UpstreamsFromPod (or the pod-mutating/validation path) should flag a declared upstream that matches no known service — the dot-form typo was silent; an in-vivo WARN would have surfaced it on day one.
  • Consider whether the observed TTL (1h) vs prune cadence interaction deserves jitter so expiries don't cluster behind refresher-triggering events.

Immediate mitigations (separate PRs)

🤖 Filed mid-soak from live evidence; full trail in the 2026-08-09 soak record.

Activity

  1. bpalermo commented on Aug 9, 2026

    @bpalermo
    OwnerAuthor

    Discriminator complete (06:25Z read) — recovery time is governed by whether a roll is actively rebuilding the snapshot at drop time:

    drop roll in flight at drop? recovery
    00:49 yes (proxy roll) ~40s
    02:36 no (edge roll settled) ~4s
    04:04:32.77Z yes (svc-1 roll 1.5s prior) 5m30s
    06:07:00.45Z no (quiet window) 1.2s / 3.3s

    Fast (1–4s) in quiet windows; slow and wildly variable (40s–5m30s) under active snapshot churn. Defect B is therefore specifically an ODCDS-re-add-starved-by-concurrent-snapshot-rebuilds problem, not a general slow path.

    Two new facts for the record:

    1. Every agent restart re-arms the 1h observed TTL — the 06:07Z expiry ran from the TRIPLE agent restart's re-adds (05:06:08Z), not from the prior 04:10:03Z re-add. Agent rolls therefore postpone the next drop, which further scatters burst timing relative to workload behavior.
    2. Prune sweep lag measured at ~51–52s past TTL — consistent with a ~60s cadence; expiry precision is TTL + up-to-a-sweep.

    (From the 2026-08-09 soak's 06:25Z checkpoint; full trail in the soak record.)

  2. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    Closing — this is exactly the mechanism fixed and validated under #682:

    Validated on talos-main (rev195/rev196, 2026-09-05): two deliberate demand-set shrinks → 0 stalls / 0 prober errors on the no-local-replica nodes (was +133/+134); agent-only restarts → 0; full agent+proxy replacement → 0 (was 127/147). Remaining open item is the harness-side one: the 09-05 soak variant (#687) now has a 90-minute no-roll window so this class is no longer methodologically invisible; the first run of that variant will show the restored entries expiring on their original schedule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions