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

Allow configuring NodeHealthRefreshInterval #256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magec
Copy link

@magec magec commented Feb 16, 2024

I am working on a project where several nodes come and go pretty fast, was testing consul-esm reaping functionality an saw that the de-registering is only triggered after two health status updates, the first one that sets it to critical, and then it waits for a second one to trigger the de-registering. To speed this up I needed NodeHealthRefreshInterval to be configurable.

This change makes it configurable while maintaining the default value it had before it also adds some documentation explaining this 'use case'.

Without this, if you configure consul-esm with:

node_reconnect_timeout = "5m"

The 'non responding' node will be kept registered until 1 hour passes. Changing node_health_refresh_interval value and setting it to, let's say:

node_health_refresh_interval = "10s"

will deregister the node after (at most) 5m 10s. I have personally tested this behavior.

@magec magec requested a review from a team as a code owner February 16, 2024 07:58
@absolutelightning
Copy link

Change looks good. Please add how have you tested it?

@magec
Copy link
Author

magec commented Feb 19, 2024

I added a test for this parameter, the same way it is done for the rest of the exported config ones (this link) . What else do you need?

Copy link

@absolutelightning absolutelightning left a comment

Choose a reason for hiding this comment

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

LGTM

@absolutelightning
Copy link

I added a test for this parameter, the same way it is done for the rest of the exported config ones (this link) . What else do you need?

I was asking about manual tests. If you have done any? Please add in description.

@magec
Copy link
Author

magec commented Feb 20, 2024

Added some comments!

@magec
Copy link
Author

magec commented Sep 13, 2024

Any chance this could be merged? asking for a friend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants