System designLevel 3
Consistency and money
Easynot started
Mediumnot started
Hardnot started
Replication & consistencyCopying data to multiple machines for reliability introduces the risk of reading stale data.3 minDelivery semantics & idempotencyHandling network retries without charging a customer twice.3 minMaking a write safe to retryA timed-out payment tells you nothing at all, unless the request carried a name the server can remember it by.7 minConsensus & coordinationGetting independent machines to agree on a single truth, even when some are dead or lying.3 minPayments & ledgersMoving money reliably without ever losing a cent or double-charging.3 minObject & blob storageStoring massive files cheaply using math to survive hardware failures.3 minDistributed transactionsCoordinating a workflow across multiple independent microservices.3 minChange data capture (CDC)Turning a static database into a real-time stream of events.3 minGlobal content delivery (CDNs)How Instagram loads massive photos instantly for users all over the world.3 minCoupon service (distributed locks)Preventing a user from spending the same $100 coupon twice at the exact same time.3 minLibrary checkout (distributed locks)How to guarantee that only one server can process a job at a time.3 minE-commerce inventory (overselling)How a naive database update can sell the same concert ticket to two different people.3 minDistributed counterHow YouTube counts millions of views per second without locking the database.3 minDistributed filesystemHow cloud providers store files larger than any single hard drive.3 minBlob storage deduplicationSaving petabytes of storage by never saving the same file twice.3 minDatabase locking (row vs table)Why thousands of concurrent writes can bring your database to a crawling halt.3 minGeo-partitioned databaseKeeping data physically close to the user who owns it to defeat the speed of light.3 minQR ticketingA ticket is a signed promise on the holder's phone, the gate's job is to verify the signature and spend it exactly once.3 minReplicating OLTP into OLAPLet the transactional database do what it's good at, and quietly ship its changes to a warehouse built for heavy reporting.4 minSecondary index maintenanceEvery write to the table is really two writes, the row, and the index entry that points at it.3 minStrong consistency with quorumsIf enough replicas must agree to write, and enough must agree to read, the two groups are forced to overlap, so a read can never miss the latest write.3 minVersioned document storageNever overwrite, every save is a new immutable version, so you can always look back, compare, and roll forward to an old state.3 min