-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
derp: increase update frequency and harden on failures #2741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit changes the example config and default time for how often we refresh the DERP map. If not changed, this is typically Tailscales official map. Signed-off-by: Kristoffer Dalby <[email protected]>
hscontrol/derp/derp.go
Outdated
| } | ||
|
|
||
| return derpMap | ||
| rand.Shuffle(len(region.Nodes), func(i, j int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to make this deterministic per Tailnet?
This helps spread the load across nodes in a DERP region.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it will try to use the base_domain as a seed so it should be relatively stable per headscale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it, thanks!
This commits makes updating of the DERP map from file and url more robust by retrying with exponential backoff if it fails and upon failure, keep the old DERP map if we cannot successfully build a new one. Fixes juanfont#2694 Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
Avoid that all headscale clients picks the same first node in a region. Signed-off-by: Kristoffer Dalby <[email protected]>
b7234f9 to
0c8765c
Compare
This commit changes the example config and default time for
how often we refresh the DERP map. If not changed, this
is typically Tailscales official map.
Second commit makes updating of the DERP map from file and url
more robust by retrying with exponential backoff if it fails
and upon failure, keep the old DERP map if we cannot successfully
build a new one.