Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

More robust distributed lock mechanism #2

Open
will123195 opened this issue Jan 25, 2018 · 1 comment
Open

More robust distributed lock mechanism #2

will123195 opened this issue Jan 25, 2018 · 1 comment

Comments

@will123195
Copy link
Contributor

We're currently using Redis SETNX to prevent an op from being evented more than once.

Technically during a Redis fail-over, more than one process may receive the lock for an op.

A solution is detailed here:
https://redis.io/commands/setnx

@will123195
Copy link
Contributor Author

We're already using redis-lock for workers to acquire the "master" worker lock.

We should consider also using it to ensure an op is evented exactly once, although it may come with a performance penalty.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant