Skip to content

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
@asheshvidyut
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

@asheshvidyut asheshvidyut left a comment

Choose a reason for hiding this comment

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

LGTM

@asheshvidyut
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