Skip to content

quic_lb: steer a reuseport group by the server id's last byte - #47

Merged
endel merged 1 commit into
mainfrom
steer-server-id-suffix
Oct 30, 2026
Merged

endel merged 1 commit into
mainfrom
steer-server-id-suffix

Conversation

@endel

@endel endel commented Oct 30, 2026

Copy link
Copy Markdown
Owner

reuseportProgram refused any server id over a byte, so a process that names itself to a balancer ahead of its worker id ({process, worker}) lost kernel steering, and steerReuseportGroup left its workers passing each other's packets on in userspace.

The socket index is now the server id's last byte, and what comes before it is left to the balancer. One-byte ids compile to the same program.

Tested with zig build test, a new reuseportProgram test for two-byte ids, and on Linux from a netcode client: a client handed between workers reaches its worker with nothing forwarded, with a two-byte id.

🤖 Generated with Claude Code

A server id over a byte was refused as unsteerable, so a process naming
itself to a balancer ahead of its worker lost kernel steering, and its
workers passed each other's packets on in userspace.

Assisted-by: Claude Opus 5.5
@endel
endel merged commit 07023f8 into main Oct 30, 2026
3 checks passed
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