Skip to content

fix(mesh): raise the check-in period to 5m on large clusters - #2

Open
IvanHunters wants to merge 1 commit into
nuvolos-cloud:mainfrom
IvanHunters:feat/raise-check-in-period
Open

IvanHunters wants to merge 1 commit into
nuvolos-cloud:mainfrom
IvanHunters:feat/raise-check-in-period

Conversation

@IvanHunters

Copy link
Copy Markdown

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-seen annotation is within 2 * checkInPeriod (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. 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)

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>
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