safe-redis-leader
JSON →A safe leader election implementation for Node.js using Redis, designed to eliminate race conditions present in the original 'redis-leader' package (v0.0.6, latest). It uses async/await, removes CommonJS callback patterns, and provides a factory function 'createSafeRedisLeader' instead of requiring 'new'. The library is a rewrite that fixes known bugs in prior implementations, includes a test suite with Docker Compose, and focuses on correctness without external dependencies beyond ioredis. It offers events like 'elected' and methods 'elect' and 'stop', suitable for distributed systems needing reliable single-leader guarantees.
Traffic · last 30 days stale · no recent hits
total hits 17
actors 2 distinct systems
last hit 21d ago human
top countries 🇨🇦 Canada · 🇺🇸 United States · 🇸🇬 Singapore · VN · HN
Resources
packagesafe-redis-leader ↗
API endpoints
full doc /v1/registry/safe-redis-leader