Skip to content
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

Limit how often a busy tunnel can requery the lighthouse #940

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

nbrownus
Copy link
Collaborator

Active tunnels cause nebula to re-query the lighthouse every so often, roughly every 5k packets, to make sure we are using the best remote ip address possible for the remote host. On busy tunnels this limit can be hit very quickly and cause unnecessary load on the lighthouses.

This change adds a way to limit the minimum amount of time before the next query is allowed. timers.requery_wait_seconds is set to 60 seconds by default and relies on the original counter behavior prior to evaluation. This means an infrequently active tunnel could miss a re-query if the stars align just right.

This also moves the try promote and re-query every counter to config options for a matter of completeness. Initial performance tests look equivalent but I am not opposed to only adding the 1 new config option and leaving the 2 old items as constants.

@wadey wadey added this to the v1.8.0 milestone Aug 2, 2023
Copy link
Member

@wadey wadey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments, can you also document this change in the example config?

interface.go Outdated Show resolved Hide resolved
interface.go Outdated Show resolved Hide resolved
nbrownus and others added 2 commits August 8, 2023 13:10
Co-authored-by: Wade Simmons <[email protected]>
Co-authored-by: Wade Simmons <[email protected]>
@nbrownus nbrownus merged commit 223cc6e into master Aug 8, 2023
6 checks passed
@nbrownus nbrownus deleted the requery-limit branch August 8, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants