typescript-distributed-lock - TypeScript Distributed Lock
Implement safe distributed locks in TypeScript using Redis, PostgreSQL advisory locks, lease renewal, and fencing tokens for multi-instance Node workers.
Tags
Updated: 2026-09-14Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Acquire Redis locks with TTL
- Release Redis locks via Lua
- Acquire PostgreSQL advisory locks
- Renew lock leases safely
- Verify resource fencing tokens
- Test multi instance lock concurrency
Inputs
- Redis client instance
- PostgreSQL database connection
- Lock key namespace and TTL
- Fencing token counter
Outputs
- Lock acquisition status boolean
- Datastore lock key state
- Lock metrics and hold alerts
Requirements
- Node.js runtime environment
- TypeScript environment
- Redis server or PostgreSQL instance
