LSS: Lock State Service
A small HTTP service for managing distributed locks. Useful for keeping pipelines, cron jobs, or system scripts from stepping on each other.
What It Does
LSS lets you create, check, and toggle locks over a simple REST API. No SDKs, no setup - just curl it.
Common Use Cases
- GitHub Actions Block QA deployments while E2E tests are running.
- Cron Jobs Skip a run if another process is active.
- Ad-hoc System Locks Pause scripts or maintenance tasks until certain conditions are met.
API
Create a Lock
POST https://lock-states.deno.dev/locks
Params:
l=true|1|T- start lockede=ttl_in_seconds- optional TTLk=custom_auth_key- optional custom key
Response:
Example (locked for 60s):
Check Lock State
GET https://lock-states.deno.dev/locks/:lockId
Status codes:
204- unlocked423- locked404- not found
Example:
Lock / Unlock
Lock:
Unlock:
Optional e=ttl_in_seconds for temporary locks.
Real Example
Pipeline Wait Step
QA Locking
QA team locks the test environment during runs, blocking redeployments until tests finish. Once the lock clears, deployments resume.
LSS - a minimal lock service for when you just need stuff to wait.