Ericsson / ered

An Erlang client library for Valkey/Redis Cluster
MIT License
11 stars 6 forks source link

Make clients removed from slot map reject commands immediately #22

Closed zuiderkwast closed 1 year ago

zuiderkwast commented 1 year ago

New functions 'deactivate' and 'reactivate' are added to ered_client.

When a node is removed from the cluster, the client to that node is first deactivated, then stopped after some time. When the client is deactivated, it replies to commands immediately with {error, node_deactivated}.

If the node comes back to the cluster and the client to this node is not yet stopped, the client is reactivated and ered recovers faster than if it would have to start a new client to that node.