redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
19.81k stars 2.34k forks source link

Node failure timeout is hard-coded to 15s #2841

Open mojixcoder opened 8 months ago

mojixcoder commented 8 months ago

When a node fails, it takes 15s for go-redis to mark this node as a failed node. You can see it in this line.

Possible Solution

This timeout should be configurable.

Or

Checking cluster nodes in some intervals and discover failed nodes and mark these nodes as a failed node and don't send requests to these nodes.

mojixcoder commented 8 months ago

And there is another thing, in case of failures we call node.MarkAsFailing() multiple times which updates the timestamp of failure.

As we call this method the timestamp gets updated and we never reach this 15s threshold unless node.MarkAsFailing() is not called more than once.

mojixcoder commented 8 months ago

Any updates guys?