{"repo":"alexpota/redlock-universal","free":true,"listed":false,"github":"https://github.com/alexpota/redlock-universal","clone":"git clone https://github.com/alexpota/redlock-universal.git","description":"Modern Redis and Valkey locking library with universal client support (node-redis, ioredis, Valkey GLIDE)","language":"TypeScript","stars":58,"topics":["concurrency","distributed-systems","locking","microservices","mutex","nodejs","redis","redlock","typescript","redis-lock"],"license":"MIT","category":"databases-storage","readme_excerpt":"redlock-universal Universal distributed locks for Redis and Valkey The only distributed lock library supporting all three Redis clients: node-redis &bull; ioredis &bull; Valkey GLIDE NestJS Integration: Check out nestjs-redlock-universal for decorator-based integration with dependency injection. Quick Start Why redlock-universal? Same performance as the fastest libraries, with universal client support they lack. Library Latency node-redis ioredis Valkey Monitoring --------- --------- :----------: :-------: :------: :----------: redis-semaphore 0.369ms ❌ ✅ ❌ ❌ redlock-universal 0.377ms ✅ ✅ ✅ ✅ node-redlock 0.398ms ❌ ✅ ❌ ❌ Benchmarked on local Redis 7 (macOS, Node.js 22). Results vary with system load, network, and Redis configuration. All libraries deliver competitive sub-millisecond performance. Installation Core API using() - Recommended Auto-extends lock and guarantees cleanup: acquire() / release() - Manual Control extend() - Extend Lock TTL Extending locks acquired via LockManager When using LockManager , you can extend locks by creating a lock instance from the handle: This also works across processes — LockHandle is fully serializable: createSimpleLock and createRedLock don't acquire anything — they create a lock object wired to the right adapter. The actual Redis operation only happens when you call .extend() . isLocked() - Check Lock Status Distributed Lock (Redlock Algorithm) For fault-tolerant locking across multiple Redis instances using the Redlock algorithm: Adap","default_branch":null,"files":null,"tree":[],"storefront":"/r/alexpota","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alexpota/redlock-universal/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}