2. Back-of-Envelope Estimation
The picture to keep in your head
Every question below is answered twice: first at the wedding, so you can picture it, then in the system, so you know exactly how to do it. Each answer ends with a memory code to lock it in.
The picture to keep in your head
Your cousin is getting married and you're in charge of the food. The first thing you ask isn't "biryani or pulao?". It's "how many guests?" Fifty guests and you cook at home. Five thousand and you need caterers, a big kitchen, delivery vans and a plan for the moment everyone walks into the dining hall at 1 pm.
You don't need the exact number. "About 500" is enough to decide how big a kitchen, how much rice, how many cooks. Getting it wrong by 10 or 20 guests doesn't matter. Getting it wrong by 10 times does.
Back-of-envelope estimation is the same skill for systems: quick, rough numbers that tell you how big to build.
Our running example: a photo-sharing app (call it PicShare). People open it, scroll through photos, and sometimes upload one. All numbers about PicShare are assumptions you'd agree with the interviewer, not real figures for any company.
| At the wedding | In the system |
|---|---|
| Number of guests | Daily active users (DAU) |
| Plates each guest eats | Requests each user makes |
| Everyone arriving at 1 pm | Peak traffic |
| Rice and stock in the store room | Storage |
| Vans bringing food in and taking it out | Bandwidth (network) |
| Popular dishes kept ready at the front counter | Cache memory |
| Cooks in the kitchen | Servers |
Figure: the wedding plan, mapped step by step to the system plan. Everything starts from one number: how many people are coming.