-
Notifications
You must be signed in to change notification settings - Fork 229
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: latency-based failover #119
Conversation
Some changes need to do. The added latency should be in group level. |
One more thing: |
"Group level 'add_latency'" and "no filter problem" have been fixed. Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧪 Since the PR has been fully tested, please consider merging it.
Background
I want to treat my US node as main use, and if it is down, failover to HK node. In this way, US nodes with high latency can be used preferentially.
Idea
Normalize all failover situations to latency-based solution.
This solution has following advantages:
Thus, we need to introduce the annotation grammar(
[add_latency: 50ms]
).Checklist
Full changelog
annotation
syntax fordeclaration
([key: value, ...]
).add_latency
annotation forfilter
and apply it to corresponding dialers (if multiple filter hits, only the first works).Issue reference
Fix #118