Consistency

2 posts in this section

Design a Payment System

Here is the throughput requirement for a payment backend serving an Amazon-sized store:

1,000,000 transactions/day ÷ 100,000 seconds = 10 TPS

Ten transactions per second. Less than the hotel reservation system, which was already the smallest number in this series.

And payments are harder than either. Because the failure mode is not a slow page or a stale metric — it’s charging someone twice, or taking their money and not paying the seller. There is a real person, a real bank statement, and in many jurisdictions a regulator.

Continue reading »

Design Google Drive

You have a 4 GB video file in your Drive folder. You change its title — a few dozen bytes near the start.

How many bytes should cross the network?

The naive answer is 4 GB. The right answer is a few hundred kilobytes, and getting from one to the other is what this chapter is about. Everything else — the API servers, the metadata database, the notification service — is machinery you have already seen. The distinctive problems here are three:

Continue reading »