Skip to content

supervisor: a hot restart across a worker-count change still resets about half of the live QUIC connections — drain and start fresh instead when --concurrency differs #1136

Closed

Description

@bpalermo

Follow-up from #1126 (PR #1133 removes the crash; this is what remains). From reading the pinned Envoy (not yet measured):

  • 4→2: the child applies its socket options to the sockets it inherits, including the QUIC connection-ID steering program built for ITS worker count (mod 2), and that program applies to the whole reuse-port group. From then on the kernel steers the still-draining parent's traffic mod 2, so about half of the parent's live QUIC connections land on a parent worker that does not own them and are reset (the Mismatched worker index. expected 3, actual 1 lines). Connections the child accepts from forwarded handshakes survive thanks to the index % workers remap in fix(proxy): a hot-restart child with fewer workers than its parent no longer crashes on a forwarded UDP datagram (#1126) #1133.
  • 2→4: the index is never out of range, but the child's NEW sockets for workers 2–3 are not paused (only inherited ones are), so under mod 4 about half of the parent's live connections are steered to them and reset.
  • TCP: in 4→2 the parent closes its listen sockets for workers 2–3 when its listeners stop; connections queued on them are reset once.

So changing proxy.concurrency costs a one-time reset of roughly half the live HTTP/3 connections per node (clients reconnect) — acceptable for a planned change, but not hitless. Fix on our side: when the next epoch's --concurrency differs from the live parent's, the supervisor should not hot-restart; it should drain the parent (the pod-termination drain path) and start the new Envoy fresh, or at least log loudly and count it. Needs: the supervisor learning the parent's worker count (/server_info command_line_options.concurrency), a unit test, and a kind leg that changes the count under load and measures resets. The upstream side (ASSERT-only deliver() in the #47743 forwarding code; the group-wide steering re-attach) is noted in #1133's body for the maintainer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

  1. bpalermo commented on Oct 2, 2026

    @bpalermo
    OwnerAuthor

    Measured on talos, 2026-10-02 18:58–19:03Z: the rollout that changed 4 → 2 workers (main 222af5d, chart 2.2.3, proxy image with the #1133 patch, supervisor with #1134).

    node Mismatched worker index (parent) Sending Stateless Reset successor crash / fresh start foreign-admin drain
    w02 10 5 0 / 0 0
    w04 9 2 0 / 0 0
    w05 9 4 0 / 0 0
    w03 6 1 0 / 0 0
    w01 0 0 0 / 0 0

    So the transition is no longer destructive (Tuesday: 11 successor crashes and two nodes dark for 12 min) but it is not free: 34 mis-steered datagram batches and 12 stateless resets fleet-wide, matching the prediction above. Prober during the deploy: 0 liveness failures, 22 mesh_dns failures (the deploy also rolls agents and mesh-dns, so not all are this). The three 2 → 2 proxy rolls of the e2e that followed: 0 probe failures, k6 0 failures.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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