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

Added decay as an option #35

Closed
wants to merge 1 commit into from
Closed

Conversation

rat2k4
Copy link

@rat2k4 rat2k4 commented Sep 1, 2022

Added conditional connect4 compiler preprocessor option as it seems to be linux specific.
Added -y for defining the decay period. It's a great feature to avoid using fast flapping links.

Added conditional connect4  compiler preprocessor option as it seems to be linux specific.
Added -y for defining the decay period. It's a great feature to avoid using fast flapping links.
@dennypage
Copy link
Owner

If you feel this still valuable, can you explain the use cases for configurable decay please?

accept4() is not linux specific. MacOS is the only commonly used *nix OS that does not support it.

@dennypage dennypage closed this Jan 17, 2023
@rat2k4
Copy link
Author

rat2k4 commented Jan 17, 2023

Having multiple uplink providers and having one of them continuously flapping generates a lot of problems in PFSense fw/routing. Recently we have had many "short link interruptions" in one of our links that last up to 2 minutes. 2 minutes up, 2 minutes down. With a fixed decay, dpinger will signal PFSense that the link is OK in a very short time, generating link/routing flapping. Having a configurable decay could allow you to avoid this weird ISP behavior and maintain the most stable link up and in use.

@dennypage
Copy link
Owner

dennypage commented Jan 17, 2023

Interesting. So the intent is to lengthen the amount of time before loss is declared resolved? Were you not able to accomplish this by adjusteding the alert interval? This will generally have the same effect.

FWIW, given that all other configuration is time based, if I were to expose something like this it would likely be as a minimum amount of time before an alarm can clear rather than number of decay intervals. Default time would be 10x the alert interval. Similar to loss interval.

[Edit: perhaps not... I might expose it as a minimum number of alarm periods before an alarm can be clears, which would still be understandable in the context of the other parameters.]

@rat2k4
Copy link
Author

rat2k4 commented Jan 17, 2023

Hi, Changing the alert interval would also mean more time to detect the link down state... Reading your code, it seemed to me easier to change de decay interval, which wouldn't slow down the link failure detection (as far as I understood). I've been using this version for sometime with my pfsense installation and it seems to do the job.

@dennypage
Copy link
Owner

Yes, it would affect both the initial declaration and the recovery, but there is a 10x difference between the two. In other words, changing the alarm interval from 1s to 2s would delay the initial detection by 1 second, but the recovery is adjusted by 10 seconds.

I assume that you have also modified pfSense to accommodate the option? Just locally, or have you submitted a PR?

@rat2k4
Copy link
Author

rat2k4 commented Jan 17, 2023

Just on my home machine. In my tests I hardcoded the default to be around 2-3 minutes and changed the binary in my installation. No clue how to program in PHP/Web stuff... I just submitted this change to your repository. As you state, there could be a much better way to accomplish this, but surely it has been very useful for me.

@dennypage
Copy link
Owner

Thank you for this. After consideration I agree that the ability to control the amount of time the alarm is held would be valuable. I have created issue #37 for this.

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.

None yet

2 participants