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

Integrate passive disconnect handling and automatic reconnect functionality #2278

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

ikolomi
Copy link
Collaborator

@ikolomi ikolomi commented Sep 11, 2024

Maintaining a continuous connection to the server(s) is crucial, especially in PubSub contexts, where undetected disconnects can render the listener inoperable.
Additionally, immediately attempting to reestablish a closed connection reduces latency for the next command.

This functionality is implemented differently for standalone and cluster modes:

  • In standalone mode, it utilizes the reconnect functionality, triggered immediately upon detecting a disconnect, without waiting for the next command.
  • In cluster mode, it relies on the changes introduced in amazon-contributing/redis-rs@2c7faec.

The validation processes are lightweight in terms of performance and run every 3 seconds.

Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

Changelog is missing

// as improper configuration could negatively impact performance or pub/sub resiliency.
// A 3-second interval provides a reasonable balance between connection validation
// and performance overhead.
pub const CONNECTION_CHECKS_INTERVAL: Duration = Duration::from_secs(3);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you have benchmarking results to confirm that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Changes from submodule should be listed and described in the PR

…nality.

Maintaining a continuous connection to the server(s) is crucial, especially in PubSub contexts, where undetected disconnects can render the listener inoperable. Additionally, immediately attempting to reestablish a closed connection reduces latency for the next command.
This functionality is implemented differently for standalone and cluster modes:
- In standalone mode, it utilizes the reconnect functionality, triggered immediately upon detecting a disconnect, without waiting for the next command.
- In cluster mode, it relies on the changes introduced in amazon-contributing/redis-rs@2c7faec.
The validation processes are lightweight in terms of performance and run every 3 seconds.

Signed-off-by: ikolomi <ikolomin@amazon.com>
@ikolomi ikolomi merged commit 11da7d9 into main Sep 12, 2024
40 of 41 checks passed
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.

3 participants