Opening your learning path
Progress is saved as you study.
Opening your learning path
Progress is saved as you study.
Opening your learning path
Progress is saved as you study.
Estimation & Modern Numbers is a core lesson in the Foundations family of the Thita system design course.
The 45-minute interview framework, estimation with modern numbers, and CAP theorem.
It is part of the Interview Soon path: the HLD material that appears in a standard interview loop rather than only in a specialist one.
A design interview rewards knowing which numbers change the architecture. If your estimate says “single Postgres is fine,” you can avoid unnecessary sharding, queues, caches, and operational risk. Estimation separates real constraints from imagined ones.
Estimation answers one question: does this number force a design decision right now? If the answer is no, stop estimating and move on. Treat estimation as a design filter.
Use estimates to decide:
Estimate when the number changes the next component you draw. If the estimate does not affect the design, cut it.
A good estimate has four parts:
1Assumption -> Math -> Conclusion -> Design choice
2
310M DAU, 20 actions/day
410M * 20 / 86,400 = ~2.3K QPS average
5Peak ~= 3x = ~7K QPS
6Conclusion: one strong DB/cache tier can handle this traffic classSpend 2-3 minutes. If estimation takes 10 minutes, you are losing architecture time.
QPS tells you whether a service or datastore can likely handle request volume.
Formula:
1Average QPS = DAU * actions_per_user_per_day / 86,400
2Peak QPS = average QPS * 2 to 3Use 2-3x for peak traffic in normal consumer apps. Use 10-100x for synchronized traffic such as ticket sales, flash sales, elections, payroll runs, or live sports.
Worked example: design a notifications feed for 10 million daily active users. Assume each user opens the app 20 times per day, and each open requests the feed once.
1DAU = 10,000,000
2Feed reads/user/day = 20
3
4Average QPS = 10,000,000 * 20 / 86,400
5 = ~2,315 QPS
6
7Peak QPS = ~2,315 * 3
8 = ~7,000 QPSConclusion: 7K peak read QPS does not by itself require sharding. A Redis instance can handle 100K-500K ops/sec. An Elasticsearch cluster can handle 10K-50K queries/sec depending on query shape. A properly sized Postgres setup may also handle this load if the feed query is cheap and indexed. If the feed is fanout-heavy or personalized, add caching or precomputation because the query is expensive.
Avoid saying “10 million users means distributed everything.” DAU is a user count. Load is user actions over time. Many consumer products have lower sustained QPS than candidates assume.
Use this decision rule:
| Result | What it usually means | Interview move |
|---|---|---|
| < 1K QPS | Small load for current services | Keep the design simple; focus on correctness |
| 1K-10K QPS | Normal production load | Use a stateless app tier and one primary datastore if queries are indexed |
| 10K-100K QPS | Load balancing and datastore choice matter | Add cache or read replicas only if datastore math requires them |
| 100K+ QPS | Capacity planning matters | Discuss partitioning, caching, async work, and hot-key handling |
10M users opening the app 20 times a day is about 2.3K QPS on average and 7K at peak, well under what Redis (100K-500K ops/sec) or an Elasticsearch cluster (10K-50K) handles.
Storage estimation tells you whether data volume pushes you toward partitioning, object storage, compression, lifecycle policies, or sharding. Separate metadata from large blobs because they belong in different systems.
Formula:
1Storage = writes_per_day * bytes_per_write * retention_daysWorked example: design an event logging system. Assume 50 million events per day, each event is 1 KB after serialization, retained for 365 days.
1Events/day = 50,000,000
2Bytes/event = 1 KB
3Retention = 365 days
4
5Daily storage = 50,000,000 KB
6 = ~50 GB/day
7
8Annual storage = 50 GB * 365
9 = ~18 TB/yearConclusion: 18 TB/year is large enough to affect storage choice. It does not by itself require database sharding. Postgres can handle tens of TB when access patterns are indexed, maintenance is disciplined, and queries are controlled. For append-heavy event logs, use Kafka for ingestion, object storage for long-term retention, and an analytical store for queries. Avoid OLTP sharding on day one.
Separate storage size from query pattern. A 20 TB append-only dataset queried by time range is easier to operate than a 500 GB dataset with unbounded joins and random writes. For time-based access, use time partitioning and retention policies before logical sharding.
A clean interview answer:
1At 50M events/day and 1KB each, we store ~50GB/day or ~18TB/year.
2That is too large for keeping all raw events in the OLTP database.
3I would store hot metadata in Postgres, stream events through Kafka,
4and land raw events in object storage with lifecycle retention.The answer connects the number to a design choice. It avoids putting blobs or raw logs into the primary database.
Bandwidth estimation tells you whether network transfer, CDN usage, or response size optimization matters. Use QPS multiplied by average response size. Media often dominates bandwidth even when request QPS looks moderate.
Formula:
1Bandwidth = QPS * average_response_sizeWorked example: design an image feed. Assume peak feed traffic is 5K QPS. Each API response contains metadata plus image URLs. The API response is 20 KB. The client also loads 10 images averaging 200 KB each.
Separate API bandwidth from media bandwidth:
1API: 5,000 QPS * 20 KB = 100 MB/s
2Media: 5,000 QPS * 10 * 200 KB = 10,000 MB/s = ~10 GB/sConclusion: API bandwidth is manageable inside a datacenter. Media bandwidth drives the design. Store images in object storage behind a CDN. The application should return URLs and metadata, and should avoid streaming image bytes through app servers.
Bandwidth also affects cost and latency. CDN edge latency is often 5-30ms for cached content. S3 first byte is commonly 50-100ms. For user-facing media, use CDN in front of object storage to reduce origin load, latency, and bandwidth cost.
| Payload type | Example | Serving path |
|---|---|---|
| Small JSON | Feed metadata, profile data | App service from database/cache |
| Large immutable blobs | Images, videos, attachments | Object storage + CDN |
| Large generated files | Exports, reports | Async generation + object storage link |
| Hot small objects | Sessions, counters, feature flags | Redis or in-memory cache |
An image feed at 5K peak QPS sends about 100 MB/s of API data but about 10 GB/s of image bytes, so images go through a CDN and object storage, not the app servers.
Do not shard a relational database because it reached 100 GB. That threshold is outdated. Sharding is one of the most expensive operational decisions in the design.
A current single Postgres primary can handle 10K-50K TPS and tens of TB before sharding is usually required, assuming sane indexes, vacuum discipline, connection pooling, and query control.
Sharding adds routing logic, breaks simple transactions, complicates joins, creates rebalancing problems, and turns incidents into distributed incidents. Premature sharding often signals that the candidate memorized “scale means partition” without understanding the cost.
At 100 GB, use these first moves:
Shard when one of these is true:
| Trigger | Why sharding may be justified | Better first step if untried |
|---|---|---|
| Write throughput exceeds one primary | One leader cannot accept enough writes | Batch writes, reduce indexes, use queue buffering |
| Dataset exceeds operational limits | Backups, vacuum, migrations, or indexes become unmanageable | Time partitioning, archiving, read replicas |
| Tenant isolation is required | Large tenants need a separate blast radius | Move only large tenants first |
| Hot partitions dominate load | A small key range overloads one node | Fix key distribution or add hot-key caching |
| Regulatory isolation requires it | Data must be physically separated | Shard by region or compliance boundary |
Do not shard below a few TB unless you have a specific write-throughput, tenant-isolation, regulatory, or operational reason. At 100 GB, keep Postgres single-primary and spend design time on schema, indexes, caching strategy, and failure modes.
Estimate only when the result changes the architecture. The interviewer wants to see which constraints affect the design.
Use this decision tree:
1Will the number change a component choice?
2 No -> skip it or give a one-line sanity check
3 Yes -> estimate in 2-3 minutes
4
5Does the estimate affect storage?
6 -> decide OLTP vs object storage vs analytical store
7
8Does it affect QPS?
9 -> decide DB capacity, cache, replicas, queueing
10
11Does it affect bandwidth?
12 -> decide CDN, compression, payload shapeGood estimation targets:
Bad estimation targets:
Estimate the dominant path, state the conclusion, and continue designing. If the interviewer wants more precision, they will ask.
Present estimates like an engineer making a design decision. Start with one explicit assumption, round aggressively, and keep units visible. Make the reasoning easy to audit.
A strong format:
1I’ll estimate peak read QPS to decide whether we need a cache.
2Assume 5M DAU and 10 reads/user/day.
35M * 10 / 86K is about 600 average QPS.
4Peak at 3x is about 1.8K QPS.
5Conclusion: I would add Redis only for latency or expensive queries, not for capacity alone.The conclusion matters most. Many candidates do the math and fail to convert it into a design choice. The interviewer should never have to ask, “So what does that mean?”
Use round numbers:
| Exact value | Interview value | Reason |
|---|---|---|
| 86,400 seconds/day | 86K or 100K | Easier mental math |
| 1,024 bytes/KB | 1,000 bytes/KB | Precision does not change design |
| 2.315K QPS | 2.3K QPS | Clear enough |
| 17.8 TB/year | 18 TB/year | Easier to read |
| 2.7x peak | 3x peak | Conservative and simple |
Be careful with peak assumptions. For normal consumer apps, 2-3x average is usually acceptable. For synchronized events like flash sales, elections, ticket drops, payroll runs, or live sports, use 10-100x and design for admission control, queues, rate limits, and graceful degradation.
Old system design numbers create bad interview designs. Material based on 16 GB servers, spinning disks everywhere, and tiny database limits can push candidates to over-distribute simple systems. Many interview systems should start centralized and become distributed only when a specific number forces that choice.
A general-purpose machine can have 512 GiB RAM and 128 vCPUs. Memory-optimized machines can reach multiple TB of RAM. Local disks can reach tens of TB of SSD or hundreds of TB of HDD. Datacenter networking is commonly 25-100 Gbps.
One machine does not solve every problem. Distributed complexity needs proof. If one primary database, object storage, CDN, and stateless services handle the estimated load, use that design.
Estimate only the dominant QPS, storage, and bandwidth numbers that affect component choices. Use current 2026 numbers, round aggressively, and finish each estimate with a design conclusion.
Do not shard at 100 GB. Start with a single Postgres primary, indexes, read replicas, partitioning, object storage, CDN, and caching where the numbers justify them.
Common estimation failures:
| Category | 2026 reference number | Interview use |
|---|---|---|
| General-purpose RAM | 512 GiB | A single node can hold large hot working sets |
| Memory-optimized RAM | 4 TB | Useful for large caches or in-memory workloads |
| High-memory RAM | 24 TB | Specialized; memory limits are much higher than old interview rules assume |
| General-purpose CPU | 128 vCPUs | One box can handle substantial service load |
| Local SSD | 60 TB | Large local fast storage is normal |
| Local HDD | 336 TB | Large cold local storage is possible |
| Datacenter network | 25-100 Gbps | Internal bandwidth is high; payload size still matters |
| Same-AZ latency | < 1ms | Keep tightly coupled services in the same AZ when possible |
| Cross-AZ latency | 1-2ms | Usually acceptable for replicated service calls; still has cost |
| US-EU latency | 70-90ms | Too slow for chatty request paths |
| US-India latency | 150-250ms | Requires regional serving for interactive products |
| Redis GET | < 1ms | Good for hot reads and latency-sensitive lookups |
| Postgres indexed query | 1-5ms | Indexed reads are fast enough for many systems |
| S3 first byte | 50-100ms | Use CDN for user-facing hot objects |
| CDN edge latency | 5-30ms | Use for static and media delivery |
| Redis throughput | 100K-500K ops/sec per instance | Do not add Redis for 2K QPS unless latency or query cost requires it |
| Postgres single primary | 10K-50K TPS | Single-primary relational databases go far further than many candidates think |
| Postgres data size | Tens of TB before sharding | 100 GB is not a sharding trigger |
| Kafka cluster | 1M+ msg/sec | Strong default for high-volume event ingestion |
| Kafka latency | Single-digit ms | Suitable for near-real-time pipelines |
| Elasticsearch cluster | 10K-50K queries/sec | Useful for search and read-heavy query workloads |
| Pattern | Formula | Use it to decide |
|---|---|---|
| QPS from DAU | DAU * actions/user/day / 86,400; peak = 2-3x average | Cache, replicas, service capacity, queueing |
| Storage | writes/day * bytes/write * retention days | OLTP vs object storage vs analytical store; partitioning and retention |
| Bandwidth | QPS * average response size | CDN, compression, payload shape, app-server feasibility |