node-redlock
node-redlock copied to clipboard
High Availability Failure
Redlock is instantiated with three independent Redis instances. They run on different containers on different ports. When i shutdown one of the instances and try to acquire a lock it simply throws out EAI_AGAIN
errors until i restart the instance and then the lock is successfully acquired or sometimes not.
If it is supposed to failover why does this behaviour exist? Instantiation below
LockService.lock = new Redlock(
[LockService.redis, LockService.redis2, LockService.redis3],
{
driftFactor: LockService.driftFactor, //all default values from repo
retryCount: LockService.retryCount,
retryDelay: LockService.retryDelay,
retryJitter: LockService.retryJitter,
automaticExtensionThreshold:
LockService.automaticExtensionThreshold,
}
);
After Shutting down one instance:

After restarting instance:
