← CatZep/Engineering Guides/System Design
Locks, idempotency, payments, auctions, and inventory.
Learn the reason behind each component
5 independent guides. Each includes local concept explanations, a correctness contract, a worked failure trace, and a runnable Python learning model.
Read in this order: requirements → concepts → data flow → concurrency and failure behavior → sizing → worked example. Explain what can fail before choosing a technology.
5 guides
Allocate ads under specified pricing, deadlines, and spend/exposure accounting.
First-price, second-price, and GSP · Budget reservations and pacing · Token bucket · Deduplication · Backpressure and load shedding · Wall and monotonic clocksCoordinate work without letting expired, paused holders corrupt protected resources.
Leases · Fencing tokens · Quorum · Raft terms and commit rules · Optimistic concurrency and compare-and-set · Wall and monotonic clocksMake repeated API attempts produce one logical effect despite concurrent retries and uncertain remote outcomes.
Idempotency keys · Optimistic concurrency and compare-and-set · Transactional outbox · Sagas and compensation · Leases · Offsets and checkpointsRepresent money as auditable postings and enforce balances, currency, and retries transactionally.
Double-entry ledger · Optimistic concurrency and compare-and-set · Idempotency keys · Sagas and compensation · Transactional outbox · CAP and consistency modelsHold scarce seats during checkout and reject stale payment or expiry callbacks.
Optimistic concurrency and compare-and-set · Leases · Idempotency keys · Sagas and compensation · Fencing tokens · Backpressure and load sheddingNo guide matches. Try a broader concept such as replication or retries.
Download the Python concept models · Python 3.10+, no packages required.
Student clarity and correctness review · 19 October 2026