Skip to content

fix: reduce re-registration interval to 5s to prevent replica staleness flapping#24597

Merged
sreya merged 3 commits intomainfrom
fix/wsproxy-reregistration-interval
Apr 24, 2026
Merged

fix: reduce re-registration interval to 5s to prevent replica staleness flapping#24597
sreya merged 3 commits intomainfrom
fix/wsproxy-reregistration-interval

Conversation

@sreya
Copy link
Copy Markdown
Collaborator

@sreya sreya commented Apr 22, 2026

Workspace proxies re-register with the primary coderd every 15 seconds, which updates their replica row's updated_at timestamp in the database. The primary's replicaManager considers any replica not updated within 3 × 5s = 15s as stale and excludes it from queries.

So we basically get one shot at registering before being marked stale and breaking DERP meshing to this replica. Was causing some very confusing failures when scaletesting.

@sreya sreya requested a review from spikecurtis April 22, 2026 02:51
Comment thread enterprise/wsproxy/wsproxysdk/wsproxysdk.go Outdated
@sreya sreya merged commit 6ac25c9 into main Apr 24, 2026
26 checks passed
@sreya sreya deleted the fix/wsproxy-reregistration-interval branch April 24, 2026 20:56
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants