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

feat(agent): reauthentication timeout #3863

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

heiytor
Copy link
Contributor

@heiytor heiytor commented Jun 6, 2024

Currently, the agent pings ShellHub's request endpoint every 10 minutes. This can cause a flood of requests when many agents try to reconnect simultaneously.

To address this, we're introducing the MAX_RETRY_CONNECTION_TIMEOUT environment variable. This variable sets the maximum value for a random timeout interval. The agent will now wait for the interval plus a random value (up to the maximum specified) before reauthenticating.

The default value is 60 seconds.

@heiytor heiytor self-assigned this Jun 6, 2024
@heiytor heiytor force-pushed the feat/reconnect-timeout branch 3 times, most recently from 7df3b4d to f48d9ab Compare June 6, 2024 20:32
@heiytor heiytor changed the title feat: agent reconnection timeout feat(agent): reconnection timeout Jun 6, 2024
@heiytor heiytor marked this pull request as ready for review June 6, 2024 20:34
@heiytor heiytor requested a review from a team as a code owner June 6, 2024 20:34
@heiytor heiytor force-pushed the feat/reconnect-timeout branch 7 times, most recently from 4ffcf3e to b28c6db Compare June 7, 2024 13:34
@heiytor heiytor requested a review from henrybarreto June 7, 2024 14:22
Currently, the agent pings ShellHub's request endpoint every 10 minutes.
This can cause a flood of requests when many agents try to reconnect
simultaneously.

To address this, we're introducing the `MAX_RETRY_CONNECTION_TIMEOUT`
environment variable. This variable sets the maximum value for a random
timeout interval. The agent will now wait for the interval plus a random
value (up to the maximum specified) before reauthenticating.

The default value is 60 seconds.
@heiytor heiytor force-pushed the feat/reconnect-timeout branch from b28c6db to a850573 Compare June 11, 2024 14:56
@heiytor heiytor changed the title feat(agent): reconnection timeout feat(agent): reauthentication timeout Jun 11, 2024
@gustavosbarreto gustavosbarreto merged commit 8e8f419 into master Jun 12, 2024
24 checks passed
@gustavosbarreto gustavosbarreto deleted the feat/reconnect-timeout branch June 12, 2024 12:33
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