feat: reuseport activator - #196
Draft
ctrox wants to merge 17 commits into
Draft
Conversation
This adds a completely new activator that makes use of bpf_sk_select_reuseport to steer wake/probe traffic instead of a userspace proxy+port rewrites. With this, zeropod is completely out of the data path for normal app traffic.
when concurrent connections hit the wake listener, we only want to register the app listeners once.
ctrox
commented
Aug 9, 2026
| // Because we syscall.Setfsuid inside ns.Do, this should be safe as | ||
| // it takes care to lock the os thread. | ||
| eUIDBefore := os.Geteuid() | ||
| if err := syscall.Setfsuid(ln.app.uid); err != nil { |
Owner
Author
There was a problem hiding this comment.
when restoring from a migrated checkpoint, the uid will always be 0 and the restore will fail if the checkpoint has a different one stored. We could also put it in the listener metadata in the migration or come up with some kind of recovery mechanism where we can detect a mismatch.
ctrox
force-pushed
the
reuseport-activator
branch
from
August 9, 2026 14:21
2620c4e to
ede5e03
Compare
This unifies the two activator APIs into an interface, making it possible to simply switch between them in the shim depending on the config.
ctrox
force-pushed
the
reuseport-activator
branch
from
August 9, 2026 14:41
ede5e03 to
03deca5
Compare
ctrox
force-pushed
the
reuseport-activator
branch
3 times, most recently
from
August 12, 2026 05:37
9c6bcab to
8542bf1
Compare
This makes it more durable and also allows to migrate from the old to the new activator while keeping the same checkpoint image. This also adds bind4/bind6 programs to ensure all listeners have SO_REUSEPORT set.
ctrox
force-pushed
the
reuseport-activator
branch
from
August 12, 2026 05:38
8542bf1 to
c37f2fa
Compare
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.
This adds a completely new activator that makes use of bpf_sk_select_reuseport to steer wake/probe traffic instead of a userspace proxy+port rewrites. With this, zeropod is completely out of the data path for normal app traffic.