ioredis-lock
JSON →ioredis-lock v4.0.0 provides distributed locking for Node.js using Redis and the ioredis client. It uses Lua scripts for atomic acquire (SET key uuid PX timeout NX) and release operations, avoiding race conditions inherent in SETNX or WATCH/MULTI strategies. Requires Redis >= 2.6.12 and peer dependency ioredis ~4.x.x. Key features: configurable timeout, retries, delay; supports promises via bluebird; includes custom error types for acquisition, release, and extension failures. Compared to alternatives like redis-redlock or node-redlock, ioredis-lock is lighter and tightly coupled with ioredis, but does not implement the full Redlock algorithm for multi-master setups.
Resources
packageioredis-lock ↗