-
Notifications
You must be signed in to change notification settings - Fork 21
feat: RedisOptions.familyFallback #46
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: David Bauch <[email protected]>
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.
Can you please document this new option?
Good work!
Of course! Wanted to get your feedback first. I was thinking about the limitations of the alternating functionality. This could lead to excessive error logs. I've re-worked it quite a bit to be more configurable. I'm going to push the changes soon. |
- Add familyFallback option to handle connection failures by trying alternate IP versions - Support two fallback modes: - `alternate: false` (default): Try alternate family once, then stick to original - `alternate: true`: Continuously alternate between IP versions - Maintain backward compatibility with existing `family` option - Add comprehensive test coverage for all fallback scenarios - Track connection attempts with `_triedFamilyFour` and `_triedFamilySix` flags - Preserve original family in `_initialFamily` for reference This improves connection reliability by automatically handling IP version mismatches. Signed-off-by: David Bauch <[email protected]>
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.
feat: implement family fallback for Redis connections
- Add familyFallback option to handle connection failures by trying alternate IP versions
- Support two fallback modes:
alternate: false
(default): Try alternate family once, then stick to originalalternate: true
: Continuously alternate between IP versions
- Maintain backward compatibility with existing
family
option - Add comprehensive test coverage for all fallback scenarios
- Track connection attempts with
_triedFamilyFour
and_triedFamilySix
flags - Preserve original family in
_initialFamily
for reference - added JS Docs and updated docs
This improves connection reliability by automatically handling IP version mismatches.
Signed-off-by: David Bauch <[email protected]>
@mcollina I fixed the test based on the output from the GitHub actions. Please run them again. |
@mcollina any chance you could re-run the checks? Much appreciated! |
@bauchdj code looks good. Can you explain why there are many changes to doc? |
@mcollina When you asked me to update the documentation, I assumed you wanted me to add JS Docs and rerun the docs generation. How would you like me to update the documentation? |
Signed-off-by: David Bauch <[email protected]>
@mcollina I reverted the changes to |
@mcollina any update? |
Issue: #38
Added simple fallback option. On reconnect it will alternate between family 4 and 6.
The unit tests include: