Lesson 2 of 19
2. Back-of-Envelope Estimation

2.1 Why estimate at all?

3 min read+10 XP

The toolkit

At the wedding: The guest count decides what kind of kitchen you need, not just how big. Fifty guests: a home stove. Five thousand: hired caterers, big vessels, a separate serving team. The number changes the shape of the plan, not only its size.

In the system: Estimates do the same job. They tell you which design you need:

  • 40 writes a second fits easily on one database. 40,000 may not, and you start thinking about sharding (Chapter 15).
  • 100 GB of hot data fits in one cache server's memory. 20 TB doesn't, so you need a cluster, or a CDN (Chapter 26).
  • Read-heavy traffic points you to caches and replicas. Write-heavy traffic points you to queues and partitioning.

In an interview, estimates also prove you're designing for this problem, not reciting a generic diagram. And you don't need precision: you need the right order of magnitude (the number of zeros).

Memory code: "Size decides shape." The numbers don't just tell you how big to build. They tell you what to build.