1. Daily active users
DAU — daily active users — is the starting point most other numbers are derived from.
dau: 100M-usersTyporithm · medium
Step 1 of 8 · intro card
Fundamentals
Capacity estimation derives QPS from daily active users and actions per day, storage from item size times volume times retention, plus bandwidth and memory. Rounding to powers of ten keeps the math fast, and these numbers drive both the design and the interview discussion.
Back-of-envelope estimation turns a vague problem into concrete numbers. Start from daily active users (DAU). QPS is DAU times actions per user per day divided by 86,400 (seconds in a day); peak QPS is usually a few times the average.
Storage is item count times average item size times the retention period — for example, items per day times bytes per item times days kept. Bandwidth is QPS times the payload size per request, and memory sizing targets the hot set you want cached.
Round aggressively to powers of ten so the arithmetic stays fast: treat 86,400 as ~10^5, a day as ~100k seconds. The goal is the right order of magnitude, since these numbers drive the design choices and the interview conversation.
QPS = DAU x actions/day / 86,400.
Storage = items x size x retention.
Round to powers of ten for fast math.
estimate:
dau: 100M-users
qps: dau-times-actions-over-86400
storage: items-times-size-times-years
bandwidth: qps-times-payload
memory: cache-hot-setConnect each part of the code to the concept before you type.
DAU — daily active users — is the starting point most other numbers are derived from.
dau: 100M-usersQPS comes from DAU times actions per user per day, divided by 86,400 seconds in a day.
qps: dau-times-actions-over-86400Storage is item count times item size times the retention period in years.
storage: items-times-size-times-yearsBandwidth is QPS times the payload size per request.
bandwidth: qps-times-payloadMemory sizing targets the hot set — the frequently accessed data you want to keep cached.
memory: cache-hot-setRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.