Currently in testing: the GitHub code will be opened once complete.
A lightweight, fast, open-source distributed lock service that orders multiple servers and processes with a single key
Ticketing is a distributed lock server built to handle your highest-traffic moments as fast as possible. It exists to stop the accidents that happen when a limited quantity oversells, the same seat gets assigned to two people, or a single coupon gets redeemed twice at once.
Unlike most distributed locks, which are implemented as scripts, Ticketing is written in Rust to get both memory efficiency and speed. It reads the fixed-width binary protocol by offset with no parsing, and doesn't allocate on the heap even while handling a request. In single-node benchmarks it handles over 1 million ops/sec while using under 10MB of memory. Its queue guarantees ordering, and with the Raft cluster turned on, service keeps running with zero downtime even as nodes go down one at a time — say, during cloud instance reboots or a rolling maintenance pass.
Binary Frame Protocol
Designed from the ground up with fixed-width binary fields, read straight off byte offsets with no parsing pass and minimal overhead.
🔑
Fencing Tokens
Every acquire issues a monotonically increasing token, keeping you safe even in the moments the lock server isn’t perfectly consistent.
🔄
Non-Stop Cluster
A Raft-consensus cluster. With 3 nodes, service keeps running through node failures and restarts, and mutual exclusion never breaks even during a partition.
🌐
Native Clients for Major Languages
Official clients for Java/Kotlin, JavaScript/TypeScript, Python, Go, Rust, and more — each with an idiomatic API (async or blocking) that feels native to the language.
🚀
Server Deployment Guide
Docker · Podman · Kubernetes · binary — generate single/cluster run commands right now
Performance
A speed comparison against Redisson (Redis), the most widely used distributed lock system.
Ticketing clientsRedis (Redisson RLock)
JavaScript
210.2 ms · 190,295 ops/s
210.2 ms
Rust
225.9 ms · 177,069 ops/s
225.9 ms
Go
228.4 ms · 175,131 ops/s
228.4 ms
C#
286.9 ms · 139,421 ops/s
286.9 ms
Kotlin
443.5 ms · 90,192 ops/s
443.5 ms
Java
457.8 ms · 87,374 ops/s
457.8 ms
C/C++
659.7 ms · 60,634 ops/s
659.7 ms
Python
739.4 ms · 54,098 ops/s
739.4 ms
Ruby
1,682.4 ms · 23,776 ops/s
1,682.4 ms
Redisbaseline
4,909.1 ms · 8,148 ops/s
4,909.1 ms
Bar length is the wall-clock time (ms) for the whole run — shorter is faster.
32 contended keys × 1,250 ops · concurrency 64 · mac mini m4 2024 basic (10 core), single local server, acknowledged release, 1s min-work budget
Platform Support