Preparing for system design interviews?  Try bugzed.com →

mongo-dlock

JSON →
library 2.0.4 ·javascript
verified Jun 7, 2026

Distributed lock implementation based on MongoDB for Node.js, version 2.0.4. It supports one-shot lock attempts and automatic retry via polling, lock refresh (including auto-refresh), and data payloads attached to locks. Uses MongoDB TTL indexes to clean up stray locks. The 2.0.0 major release removed pubsub-based event propagation via a capped collection and EventEmitter, simplifying the internals to rely solely on polling. Compared to alternatives like Redis-based locks, mongo-dlock leverages existing MongoDB infrastructure without additional services. It defaults to a 15-second lock expiration and a 5-second polling interval.

total hits 8
actors 2 distinct systems
last hit 16d ago AhrefsBot
GPTBot
3
Humans
4

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇮🇩 Indonesia