Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

TigerBeetle 9 min read Opinion easyNovice

Rediscovering Transaction Processing From History and First Principles

General-purpose OLTP databases hit a hard throughput ceiling on debit/credit workloads because row locks are held across multiple network round-trips, and hot rows such as a few internal accounts serialize nearly every transaction. Jim Gray's 1985 DebitCredit benchmark anticipated this, defining transaction processing in terms of double-entry bookkeeping. TigerBeetle makes debit/credit a first-class primitive: 128-byte transfers are batched up to 8000 per 1 MiB request, amortizing round-trips and eliminating row locks. It also emphasizes safety through Protocol-Aware Recovery, static memory allocation, 6000+ assertions and deterministic simulation testing. The post doubles as the announcement of a $24M Series A.

Related posts

  • High-Throughput OLTP in Three Simple Steps

    TigerBeetle mediumAdept

    Migrating a TPC-B-style bank workload (accounts, tellers, branches, history) from a general-purpose SQL model to TigerBeetle yields roughly 100x throughput when three techniques are applied: modeling each transaction as linked debit/credit transfers with an aggregate account, relying on batching instead of client concurrency, and using monotonic time-based IDs. TigerBeetle clients allow one outstanding request and automatically batch operations (up to 8,189 per request) while waiting, so many goroutines sharing one thread-safe client reach about 454k transactions (909k transfers) per second, whereas adding more clients does not help. Random UUID transfer IDs force index lookups for idempotency checks, while ULID-like TBIDs make the check a cheap monotonicity comparison. A relational database with stored procedures reached about 7k TPS in the same comparison, a gap attributed to avoiding row-level locks, batched execution and parallel server I/O.

  • RAMP-TAO: Layering atomic transactions on Facebook’s online graph store

    Meta Engineering hardMaster

    RAMP-TAO is a protocol that layers read-atomic transactional guarantees on top of TAO, Facebook's eventually consistent social graph store, so developers get an intuitive read transaction API without handling fractured-read anomalies. Adapted from Read Atomic Multi-Partition (RAMP) protocols in a "bolt-on" style, it guards only recent, transactionally updated data and relies on eventual consistency for everything else, so non-transactional workloads pay no cost. Production feasibility results show 0.42% memory overhead, over 99.9% of reads completing in one round-trip to the local cache, and tail latency on par with existing TAO reads. The layered design is cache-friendly, hotspot tolerant and proposed as applicable to other read-optimized stores.

  • Birth and death of a row in Turso's MVCC

    Turso hardMaster

    Turso's MVCC, modeled on Hekaton, tracks each row as a chain of versions in a lock-free SkipMap, with begin/end fields holding a TxId while a transaction is active and a commit timestamp once it commits. The walkthrough follows one row from the INSERT bytecode executed by the VDBE, through the commit protocol (timestamp acquisition, first-committer-wins conflict checks, dependency waits, logical-log write and fsync), crash recovery by replaying the logical log, and checkpointing into the SQLite WAL and B-tree. Checkpoints default to a blocking Truncate mode triggered at about 4 MB, with an experimental Passive mode that lets writers proceed. Reads merge the in-memory store and the B-tree with a two-pointer iteration. Deletes set the end field under the version-chain lock, so concurrent writers to the same row get a WriteWriteConflict.

  • We replaced Redis with MySQL for inventory reservations—and it scaled

    Shopify Engineering mediumAdept

    Shopify moved checkout inventory reservations from Redis to MySQL by modeling one row per sellable unit and using SELECT ... FOR UPDATE SKIP LOCKED, so concurrent checkouts grab different rows without contention while reservations and the inventory ledger share ACID transactions. Key fixes included a bounded pool of 1,000 rows per item/location with locked inline replenishment, a composite primary key that halved row locks, READ COMMITTED to avoid gap/supremum locks, consistent lock ordering to prevent deadlocks, and UNION ALL batching. The real throughput ceiling turned out to be database connection exhaustion from other checkout code, found by tagging SQL with caller comments and measuring hold time in ProxySQL; cleanup cut 50% of reads and 33% of transactions, and raising InnoDB thread concurrency removed the limit. Cutover used dual-write shadow mode with a kill switch and gradual pod-by-pod rollout.

  • A Trillion Transactions

    TigerBeetle easyNovice

    Scale in OLTP is framed as survivability: a system cannot grow beyond the size it can recover, and when rebuild time (MTTR) exceeds time between failures it enters a death spiral. The post traces seven stages of OLTP architecture: log, snapshots, LSM tree, replicated state machine with Viewstamped Replication, sharding, and storage/compute separation, showing what each one breaks. Sharding destroys cache locality under contention (Amdahl's Law), and object storage is too slow for hot transactions. The proposed alternative is "diagonal scaling": keep a bounded hot working set (say 16 TiB) in a non-sharded replicated state machine on NVMe, and tier the lower LSM levels to object storage, which bounds recovery time while storage scales to petabytes. The text stops before reporting the results of TigerBeetle's trillion-transaction test.

The quest for software engineering knowledge.

Look:
Layout: