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

[v15] Document DiscoveryService poll interval and use time.Timer #41767

Merged
merged 3 commits into from
May 21, 2024

Conversation

marcoandredinis
Copy link
Contributor

@marcoandredinis marcoandredinis commented May 20, 2024

Backport #41761 to branch/v15
Backport #41768 to branch/v15

Copy link

🤖 Vercel preview here: https://docs-2tpm5i0y1-goteleport.vercel.app/docs/ver/preview

* Discovery poll: wait PollInterval between fetches

Instead of using a time.Ticker which would fire at specific intervals,
we are now using a time.Timer which will wait PollInterval duration
between API fetches.

Previously, with a low PollInterval or with a slow fetchAndSubmit, we
could be hamering the external API by immediatly calling a new
fetchAndSubmit right after ending the current one.

This changes ensures we wait at least the specificied interval before
starting a new iteration (unless a DiscoveryConfig is changed, in that
case the polling starts immediatly).

* move stop and drain closer to reset
@marcoandredinis marcoandredinis changed the title [v15] Document DiscoveryService poll interval configuration variable [v15] Document DiscoveryService poll interval and use time.Timer May 21, 2024
Copy link

🤖 Vercel preview here: https://docs-psk0mmtm5-goteleport.vercel.app/docs/ver/preview

@marcoandredinis marcoandredinis added this pull request to the merge queue May 21, 2024
Merged via the queue into branch/v15 with commit 5ac60ec May 21, 2024
37 of 38 checks passed
@marcoandredinis marcoandredinis deleted the bot/backport-41761-branch/v15 branch May 21, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport discovery documentation no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants