Clutch is a scalable distributed keyed lock management platform
1.3K
⚠️ Alpha (v0.2.0). Everything — APIs, WebSocket protocol, schema, settings, SDKs, and behavior — is subject to change. Not yet recommended for production.
Clutch is a distributed lock management platform. Client applications connect over WebSockets with a tenant application key and acquire read, write, or delete locks on named keys. Clutch decides — safely and consistently across every node in the fleet — whether a caller may proceed. You bring the database: Clutch runs on PostgreSQL, MySQL, SQL Server, or SQLite, and the database you choose is the single source of truth for every lock decision, so two nodes can never hand out conflicting locks.
jchristn77/clutch-server:v0.2.0 — the server node (REST + WebSocket on 8080, Prometheus metrics on 9464).jchristn77/clutch-ui:v0.2.0 — the React operator dashboard.Stateless server nodes sit behind an nginx load balancer and share one database — PostgreSQL, MySQL, or SQL Server for a multi-node cluster, or SQLite for a single node. Each acquire/release is a single database transaction serialized per key; blocked waiters on any node are woken by bounded polling, so one coordination path runs identically on every provider. A lock is owned by the WebSocket connection that holds it and is released when the connection closes; a TTL lease renewed by heartbeat backstops half-open connections.
The reference stack (PostgreSQL, two nodes, nginx, dashboard, Prometheus, Grafana) is defined in the repository's docker/compose.yaml:
git clone https://github.com/jchristn/Clutch
cd Clutch/docker
docker compose up -d
compose.yaml pulls the published jchristn77/clutch-server:v0.2.0 and jchristn77/clutch-ui:v0.2.0 tags directly — no local build step.
Then open the dashboard at http://localhost:3000 and connect to http://localhost:8080 with the seeded default access key (clutch-default-access-key). The access key is the sole credential — there is no secret key.
To point Clutch at your own database — provider choice, connection details, table naming, and whether Clutch manages the schema — see the Bring Your Own Database guide. Full documentation, the REST and WebSocket API references, and SDKs for C#, JavaScript, and Python are in the GitHub repository.
MIT.
Content type
Image
Digest
sha256:e5be30446…
Size
25.7 MB
Last updated
3 days ago
docker pull jchristn77/clutch-ui