mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: reduce re-registration interval to 5s to prevent replica staleness flapping (#24597)
This commit is contained in:
@@ -313,8 +313,11 @@ func (l *RegisterWorkspaceProxyLoop) register(ctx context.Context) (RegisterWork
|
||||
// Start starts the proxy registration loop. The provided context is only used
|
||||
// for the initial registration. Use Close() to stop.
|
||||
func (l *RegisterWorkspaceProxyLoop) Start(ctx context.Context) (RegisterWorkspaceProxyResponse, error) {
|
||||
// Workspace proxy re-registrations should be on the same interval as the rest of the replicasync.
|
||||
// If they differ significantly it can cause problems with meshing.
|
||||
if l.opts.Interval == 0 {
|
||||
l.opts.Interval = 15 * time.Second
|
||||
// Default to the same interval as the rest of the replicasync.
|
||||
l.opts.Interval = 5 * time.Second
|
||||
}
|
||||
if l.opts.MaxFailureCount == 0 {
|
||||
l.opts.MaxFailureCount = 10
|
||||
|
||||
Reference in New Issue
Block a user