Repository navigation
fix(mesh): raise the check-in period to 5m on large clusters - #2
Open
IvanHunters wants to merge 1 commit into
Open
IvanHunters wants to merge 1 commit into
IvanHunters wants to merge 1 commit into
Conversation
A node's WireGuard IP is assigned by its rank in the currently Ready set, and a node counts as Ready only while its last-seen annotation is within twice the check-in period (60s with the 30s default). On large clusters the per-node last-seen writes generate enough watch churn that liveness cannot propagate within that window, so every agent's Ready set collapses and most nodes collide on the first address of the subnet, breaking the mesh. Raise the check-in period to 5m (a 10m Ready window) so the Ready set stays close to the full node set. This is a mitigation, not a root-cause fix: the underlying problem is that IP allocation is coupled to the volatile Ready set. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
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.
What
Raise the kilo check-in period from 30s to 5m.
Why
A node's WireGuard IP is assigned by its rank in the currently Ready set, and a node is Ready only while its
last-seenannotation is within2 * checkInPeriod(60s with the 30s default). On large clusters the per-nodelast-seenwrites generate enough watch churn that liveness cannot propagate within that window. Every agent's Ready set collapses, allocation runs over that small set, and most nodes end up colliding on the first address of the subnet, which breaks the mesh for the affected nodes.Raising the period to 5m (a 10m Ready window) keeps the Ready set close to the full node set, so the collision does not occur. This is a mitigation, not a root-cause fix: the underlying problem is that IP allocation is coupled to the volatile Ready set. Full analysis is in squat#549; an upstream PR that makes this configurable instead of hardcoded is squat#550.
Testing
go build ./...(linux/amd64)