Skip to content

Implement redis connection broken mode#829

Merged
BridgeAR merged 11 commits into
redis:masterfrom
fintura:broken-mode
Sep 16, 2015
Merged

Implement redis connection broken mode#829
BridgeAR merged 11 commits into
redis:masterfrom
fintura:broken-mode

Conversation

@BridgeAR

Copy link
Copy Markdown
Contributor

This is also going to change some small things like adding a maximum timeout.

@BridgeAR

Copy link
Copy Markdown
Contributor Author

This branch is going to fix a lot of issues for quite some people.

@BridgeAR

Copy link
Copy Markdown
Contributor Author

Fixes #569, #587, #566, #586 and #280.
This includes the fixes as suggested in #671, #615 and #533. Thx a lot to @qdb, @tobek and @chrishamant
Closes #675, #463, #362, #438 and #724

There will be more tickets that we closed without fixing them that get fixed by this PR.

@BridgeAR BridgeAR added the 2.0 label Sep 12, 2015
Comment thread index.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a preparation for the multi fixes.

@BridgeAR

Copy link
Copy Markdown
Contributor Author

This is going to do the following:

  1. [FIX?] Change the default connection timeout to be one day instead of never.
  2. [FIX] There won't be any connection retries after the connection timeout anymore. This was the case earlier because the timeout for the next retry is increasing each retry by a multiplier. If the next retry would be above the connection timeout it is now going to be exactly at the maximum retry connection timeout instead. So the timeout is followed as expected from now on.
  3. [??] The default minimum connection retry time is reduced a tiny bit (200 ms instead of 255).
  4. [FIX] The queues won't be flushed anymore if node_redis is trying to reconnect. It will only be flushed if the connection is broken or if the user closes the connection. So offline_queue and max_attempts / connection_timeout is now properly working together.
  5. [FEATURE] If no connection could be established and max_attempts / connection_timeout has been exceeded node_redis is going into the "connection is broken" mode and emit an error.

@BridgeAR

Copy link
Copy Markdown
Contributor Author

This should be ready to merge

Ruben Bridgewater and others added 11 commits September 16, 2015 05:22
Earlier the first value was never used, as it was first multiplied by 1.7
…een exceeded

Accept setting max_attempts to zero.
The reconnection event is now emitted when trying to reconnect instead of earlier.
The connection timeout is now going to trigger once after exceeding the maximum timeout instead of stopping earlier.
…works, the others are going to be fine too)
Use a new delay after reconnecting
BridgeAR added a commit that referenced this pull request Sep 16, 2015
Implement redis connection broken mode and more shiny things

Fixes #569
Fixes #587
Fixes #566 
Fixes #586 
Fixes #280 

This includes the fixes as suggested in #671, #615 and #533. Thx a lot to @qdb, @tobek and @chrishamant 

Closes #675, #463, #362, #438 and #724
@BridgeAR BridgeAR merged commit 57b5c7f into redis:master Sep 16, 2015
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