// TOPIC

#consistency

18 articles

◆◆◆AdvancedAmazonShopify
01

Design a Shopping Cart & Checkout System

Keep a cart consistent across devices, then check out without overselling or double-charging. The available-cart vs consistent-checkout split, inventory holds, and the order saga.

#interview#e-commerce#consistency
20 min
◆◆◆AdvancedGoogleAuth0
02

Design an Authorization System (Google Zanzibar / RBAC / ReBAC)

Answer "can user U do action A on resource R?" globally, in milliseconds, consistently. RBAC vs ABAC vs ReBAC, Zanzibar relation tuples, and the new-enemy problem.

#interview#security#distributed-systems
23 min
◆◆◆AdvancedAmazonBooking
03

Design Ticketmaster (seat booking / reservations)

Sell limited inventory to a stampede of buyers without double-booking a seat. Reservation holds, a conditional-update concurrency guard, and the read-vs-write consistency split.

#interview#concurrency#inventory
21 min
◆◆◆AdvancedGoogleUber
04

Design a Globally-Distributed SQL Database (Spanner / CockroachDB)

SQL transactions that are ACID across continents. How Spanner shards into Paxos groups, runs 2PC on top, and uses TrueTime to give you external consistency — the CP counterpart to Dynamo.

#interview#distributed-systems#databases
13 min
◆◆◆AdvancedPayPalBlock
05

Design a Digital Wallet (PayPal / Venmo / Paytm)

Hold balances, transfer money between users instantly, and never lose a cent. Double-entry ledgers, idempotent transfers, and strong consistency.

#interview#payments#consistency
21 min
◆◆◆AdvancedStripeAmazon
06

Design a Payment System (Stripe-style)

Move money correctly. Double-entry ledgers, idempotency keys, the authorize/capture/settle lifecycle, reconciliation, and why money never gets eventual consistency.

#interview#payments#consistency
20 min
◆◆IntermediateMetaYouTube
07

Design a Distributed Counter (view / like counts)

Count likes and views at millions of increments per second without a single hot row melting. Sharded counters, write batching, and approximate vs exact counts.

#interview#scale#consistency
19 min
◆◆IntermediateGoogleMicrosoft
08

Design a Calendar System (Google Calendar)

Store events, share calendars, find free slots, and fire reminders — across time zones and recurring rules. The RRULE expansion and free/busy problem.

#interview#scheduling#consistency
23 min
◆◆◆AdvancedAirbnbBooking
09

Design a Hotel / Airbnb Booking System

Search available listings and book date ranges without double-booking. Availability as a range problem, reservation holds, and the search vs transaction split.

#interview#inventory#consistency
21 min
◆◆◆AdvancedAmazonNetflix
10

Quorums, Read-Repair & Anti-Entropy (Dynamo-style)

How leaderless databases like Dynamo and Cassandra stay available and converge. Quorum R+W>N, read-repair, hinted handoff, Merkle anti-entropy, and conflict resolution.

#distributed-systems#consistency#replication
18 min
◆◆◆AdvancedBloombergCitadel
11

Design a Stock Exchange (matching engine)

Match buy and sell orders deterministically with microsecond latency and perfect fairness. The single-threaded matching engine, the order book, and event sourcing for recovery.

#interview#low-latency#consistency
22 min
◆◆◆AdvancedAmazonMicrosoft
12

Event Sourcing & CQRS

Store every change as an immutable event and rebuild state by replay. Event sourcing, CQRS read models, snapshots, and the trade-offs nobody warns you about.

#distributed-systems#architecture#data-modeling
17 min
◆◆IntermediateConfluentNetflix
13

Change Data Capture (CDC) & the Outbox Pattern

Turn your database write log into a reliable event stream. Log-based CDC, the dual-write problem, and the transactional outbox.

#distributed-systems#data-pipelines#messaging
15 min
◆◆◆AdvancedAmazonUber
14

The Saga Pattern & Distributed Transactions

How do you keep data consistent across services with no shared database? Sagas, compensating transactions, orchestration vs choreography, and why 2PC fails at scale.

#distributed-systems#transactions#microservices
17 min
◆◆IntermediatePostgresCassandra
15

Database Replication

Single-leader, multi-leader, and leaderless replication. Sync vs async, replication lag, conflict resolution, and how each model trades availability for consistency.

#databases#distributed-systems#replication
14 min
◆◆◆AdvancedAmazonMeta
16

Design a Distributed Key-Value Store (Dynamo)

Build your own DynamoDB / Cassandra. Sharding, replication, quorum reads/writes, vector clocks, conflict resolution.

#interview#distributed-systems#storage
19 min
◆◆IntermediateGoogleAmazon
17

CAP Theorem Deep Dive

The CAP theorem, debunked myths, PACELC, and the actual trade-offs every distributed database makes.

#distributed-systems#consistency#theory
10 min
◆◆Intermediate
18

CAP, Consistency, and Replication

CAP and PACELC, consistency models from linearizable to eventual, replication strategies, quorums, partitioning, consensus (Raft, Paxos), CRDTs, and 2PC.

#distributed-systems#consistency#replication
16 min