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

Several cluster fixes based on open ioredis PRs #4

Closed
wants to merge 6 commits into from

Conversation

ozonep
Copy link

@ozonep ozonep commented Oct 14, 2024

Change

Implements fixes from these PRs:

Problem / Why

First fix:

When changing the instance type of a MemoryDB cluster, an in-place upgrade happens where new nodes are deployed with the same hostnames as the old ones. The old ones start returning MOVED to all queries, and after a while they are removed. The way ioredis reacts to this is it ends up in a loop of retrying commands and receiving MOVED. This loop is only broken once the old nodes are removed and the individual connections time out.

Second fix:

currently, cluster's "subscriber" check is done on "condition/preCondition" object level. But "condition.subscriber" property may be a boolean, not an object. So if "subscriber" as an object exists only on "prevCondition", we will never get there. This fix makes sure we pick the first available subscriber object (if any). This might be useful for us as AFAIK "bull" uses subscriptions when dealing with queues.

Third fix:

Currently ioredis doesn't utilize retryStrategy for connection event, so if connection to AWS is throttled due to high amount of calls (e.g. from Bull), ioredis doesn't retry to connect like with other failed events. This PR fixed it.

@ozonep ozonep changed the title Add nodeId to refresh connection once it changes Several cluster fixes based on open ioredis PRs Oct 14, 2024
@ozonep ozonep closed this Oct 15, 2024
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.

1 participant