Using estimates to pick a design
35 min · Intermediate
An estimate earns its place when it decides something: one database or replicas, cache or no cache, shard or not. Each decision comes from comparing one number with one rough limit.
Topics in this lesson
- From numbers to decisions: replicas, cache, sharding
- Rules of thumb: one MySQL server, and the 80/20 hot set
- Worked example: sizing a cache from the hot set
- Presenting estimates aloud in under 3 minutes
- Common estimation mistakes
Key points
- Reads decide caching and replicas; writes and data size decide sharding, which comes last.
- Know rough limits (one MySQL primary, one app server) and say them as assumptions.
- Cache size = items × bytes × hot share (≈ 20%) × overhead; only misses reach the database.
- Present in order: assumptions, traffic, storage, decisions, what would change them; round and write units.
Interview questions this lesson answers
- How do you go from an estimate to a design decision?
- How big should the cache be?
- When would you shard a database?
- Walk me through an estimate in under three minutes.
- What mistakes do people make in estimation rounds?
- An interviewer says your 80% hit ratio is too optimistic. How do you respond?
- Why should you round numbers when you present an estimate?
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.