AlgoMaster Logo

Capacity Estimation for System Design Interviews

High Priority11 min readUpdated October 23, 2026
Listen to this chapter
Unlock Audio

Premium Video

This video is available to premium subscribers only

Unlock Full Access

In this chapter, we'll learn how to do back-of-the-envelope or capacity estimations in system design interviews. We'll cover the key numbers worth remembering, and see how to use these estimates to make better design decisions.

1. When to Estimate

In a system design interview, estimation isn't about testing your math skills. It's about helping you make better design decisions.

For example, estimates can help you determine:

  • Whether your data can fit on a single machine
  • Whether your database can handle the expected traffic
  • Whether you need a CDN to serve content efficiently

But this doesn't mean you need to estimate everything.

In a ticket booking system, for example, total storage is unlikely to be a major concern, so calculating it in detail may not add much value.

On the other hand, for a video platform like YouTube, storage and bandwidth estimates can have a significant impact on your architecture. They help you decide how to store large video files, distribute content, and handle traffic at scale.

So before doing any calculation, ask yourself:

"What design decision will this estimate help me make?"

If you don't have a clear answer, you can probably skip it and come back to it later if needed.

2. Numbers You Should Know

2.1 Powers of Ten

Most calculations in system design interviews involve large numbers, so it's useful to be comfortable working with powers of ten.

NumberPower of tenData size
Thousand10^31 KB = 1,000 bytes
Million10^61 MB = 1 million bytes
Billion10^91 GB = 1 billion bytes
Trillion10^121 TB = 1 trillion bytes
Quadrillion10^151 PB = 1,000 TB

You might also come across terms like kibibyte and mebibyte. These are binary units based on powers of 2 rather than powers of 10.

Binary unitSize
1 kibibyte (KiB)1,024 bytes
1 mebibyte (MiB)1,024 KiB
1 gibibyte (GiB)1,024 MiB

These units are commonly used when measuring computer memory and storage. However, for rough estimates in interviews, we can use powers of ten to keep the calculations simple.

For example, suppose we have 1 billion records, each taking 1 kilobyte:

Instead of multiplying large numbers directly, we can multiply the leading numbers, add their exponents, and convert the result back into a familiar unit. This makes calculations faster and reduces the chances of making mistakes.

2.2 Time Conversions

Next, let's look at how to convert daily traffic into requests per second, since that's how we usually discuss system capacity.

There are 86,400 seconds in a day, but for quick estimates, we can round that to 100,000, or 10^5. This makes the calculations much easier.

A few conversions are worth remembering:

Requests per dayUsing 86,400 sUsing 100,000 s
1 million~12 per second10 per second
100 million~1,200 per second1,000 per second
1 billion~12,000 per second10,000 per second

Both approaches are fine for rough estimates, as long as you're consistent.

You can also round a year to 400 days when estimating annual storage, which simplifies the math and gives you a little extra margin.

2.3 Latency Numbers

Latency numbers help you understand where time is spent when processing a request. You don't need to memorize exact values. What's more important is knowing the approximate latency of different operations and how they compare.

OperationApproximate latency
Read from main memory~100 ns
Random read from SSD~100 μs (about 1,000x slower than memory)
Network round trip within the same data center~0.5 ms
Random seek on a hard diskSeveral ms
Network round trip between the US and Europe~100-150 ms

Each step down this ladder is roughly 5 to 1,000 times slower than the one before it:

So what do these numbers tell us when designing a system?

  • Memory is much faster than disk. This is one reason caches like Redis can serve data so quickly, often with sub-millisecond response times, while database queries that require disk access may take longer.
  • Network latency becomes much more significant across regions. If users in Asia have to contact servers in the US for every request, each round trip can easily add over 100 milliseconds. This is why systems often use CDNs or deploy servers closer to their users.

2.4 Data Sizes

To estimate storage requirements, we first need to know roughly how much space each record takes. Let's start with the sizes of some common data types.

Data typeSize
ASCII character (UTF-8)1 byte
Non-ASCII character (UTF-8)2-4 bytes
32-bit integer4 bytes
64-bit integer or timestamp8 bytes
UUID16 bytes in binary, 36 bytes as a string

Using these numbers, we can estimate the size of a typical record. For example, a social media post containing an ID, an author ID, a timestamp, and up to 280 characters of text would take a few hundred bytes. We can round that to 1 kilobyte to account for additional metadata and storage overhead.

Media files, however, are much larger and often account for most of the storage.

MediaApproximate size
Compressed photoA few hundred KB to several MB
1 minute of 1080p video at 5 Mbps~40 MB

And since video platforms typically store multiple resolutions of each video, the actual storage requirement can be significantly higher.

2.5 Component Capacity

Next, let's look at the approximate capacity of common components. Keep in mind that actual performance depends on hardware, workload, and data size, so these numbers are just rough guidelines.

ComponentApproximate capacity
Application server (simple requests)A few thousand to tens of thousands of requests/sec
Relational database (PostgreSQL, MySQL)Several thousand to tens of thousands of simple queries/sec
Redis (single instance)~100,000 simple operations/sec
Kafka brokerHundreds of MB/sec
Server RAMHundreds of GB to a few TB
Server diskTens of TB
Network interface10-25 Gbps

A few notes on these numbers:

  • If each request involves complex processing or calls to multiple services, an application server will handle fewer requests.
  • For databases, writes are generally more expensive than reads, especially when the database needs to update multiple indexes.
  • Kafka throughput depends on the hardware, message sizes, and replication settings.

These numbers help you decide when a single machine is enough and when you need to scale horizontally.

For example, if your system handles 500 database writes per second, a single primary database will likely be sufficient. But if you're expecting 500,000 writes per second, you'll probably need to distribute the workload across multiple machines using sharding, a write-optimized database, or a combination of both.

3. Worked Example: A Social Media Platform

Now that we have some reference numbers, let's put them into practice. We'll use a social media platform like Twitter as an example and estimate request rates, storage, bandwidth, cache memory, and the number of servers.

3.1 Requests per Second

A good starting point is the number of daily active users. Let's assume we have 200 million.

Next, we need to estimate how often users perform different actions. Suppose each user creates an average of 2 posts and views their feed 50 times per day.

But these are just average numbers. In practice, traffic isn't evenly distributed throughout the day. It tends to peak during busy hours and around major events.

A common assumption is that peak traffic is 2 to 3 times the average. So in our example, we might expect:

  • Around 10,000 posts per second at peak
  • Around 250,000 to 300,000 feed requests per second at peak

Finally, notice that our feed request rate is about 25 times the post creation rate. This tells us that the system is heavily read-oriented, so we should consider optimizations like precomputing feeds and caching frequently accessed data.

3.2 Storage

Storage estimation follows a similar approach. We take the number of new records created each day, multiply it by the size of each record, and then by how long we need to store them.

Using our social media example:

We also need to consider replication. Production databases typically maintain multiple copies of data to protect against failures. With 3 copies, our 800 terabytes of post data becomes roughly 2.4 petabytes of physical storage.

But that's just the text data. Let's also account for images. Suppose 10 percent of posts contain an image, with an average size of 500 kilobytes.

Now, what do these estimates tell us about the design?

  • Hundreds of terabytes of post data will likely require partitioning across multiple database nodes.
  • Tens of petabytes of images are better stored in object storage, with the database keeping only references to those files.

3.3 Bandwidth

Next, let's estimate bandwidth, which tells us how much data enters and leaves the system every second. Since images are much larger than text, we'll focus on image traffic for this calculation.

For incoming traffic, we can divide the total daily upload volume by the number of seconds in a day:

Outgoing traffic is usually much higher because the same image can be viewed many times. Suppose each feed request loads 10 images, and our system handles 100,000 feed requests per second. Even with compressed images of just 50 kilobytes each:

That's far more than a single server's network interface can typically handle.

This is where a CDN becomes useful. Instead of serving every image directly from our servers, we can cache images at edge locations closer to users. This distributes the bandwidth across the CDN's network and significantly reduces the traffic reaching our origin servers.

3.4 Cache Memory

Next, let's estimate how much memory we need for caching frequently accessed data in an in-memory store like Redis.

In most systems, data access isn't evenly distributed. A relatively small portion of the data often receives most of the traffic. In our social media example, viral posts might get far more views than regular posts. As a rough starting point, we could assume that caching the most frequently accessed 20 percent of the data would cover a large share of reads.

Now, let's estimate the memory needed to cache precomputed feeds. Suppose we cache a feed for every daily active user, containing the IDs of their 500 most recent posts.

That's too much for a typical single Redis instance, so we'd need to distribute the cache across multiple nodes. If each node has about 100 gigabytes of usable memory, we'd need roughly 10 to 15 primary nodes, along with replicas for availability.

But caching every user's feed may not be necessary. To reduce memory usage, we could cache feeds only for recently active users or store just 200 post IDs instead of 500.

3.5 Servers

Finally, let's estimate how many application servers we need to handle the expected traffic.

The calculation is straightforward. We divide the peak requests per second by the number of requests a single server can handle.

However, we don't want to run every server at full capacity. We need some extra capacity to handle unexpected traffic spikes and server failures. Adding 30 to 50 percent headroom brings our estimate to around 80 to 90 servers.

We'd also use a load balancer to distribute incoming requests across these servers.

In cloud-based systems, we can use auto-scaling to automatically add more servers when traffic increases and remove them when traffic drops. This helps us handle peak demand without paying for unnecessary capacity during quieter periods.

3.6 What the Numbers Tell Us

Here's a summary of the estimates and the design decisions they point to:

EstimateDesign decision
Feed reads are ~25x post writesPrecompute feeds and cache frequently accessed data
~800 TB of post data over 5 yearsPartition posts across multiple database nodes
~40 PB of images over 5 yearsStore images in object storage, keep only references in the database
~50 GB/sec of outgoing image trafficServe images through a CDN
~1-1.5 TB of cached feedsDistribute the cache across 10-15 Redis nodes
~300,000 feed requests/sec at peak80-90 app servers behind a load balancer, with auto-scaling

4. Presenting Your Estimates

How you present your estimates is almost as important as the calculations themselves.

Make your assumptions clear

For example, you might say:

"I'll assume 200 million daily active users, with each user creating 2 posts per day, and each post taking about 1 kilobyte of storage."

This gives the interviewer a chance to correct your assumptions before you start calculating.

Don't spend too much time on estimation

In most system design interviews, a few minutes should be enough. Focus on the numbers that actually influence your architecture, and skip calculations that won't change your design.

You don't want to waste valuable interview time doing unnecessary math, especially when you're working without a calculator.

5. Common Mistakes

Let's look at a few common mistakes to avoid when estimating system capacity.

1. Confusing bits and bytes

Network bandwidth is usually measured in bits per second, while storage is measured in bytes. Mixing them up can throw off your calculations by a factor of 8.

2. Designing only for average traffic

In practice, traffic varies throughout the day, and the system needs enough capacity to handle peak load without becoming overloaded.

3. Forgetting replication and storage overhead

If you're storing 3 copies of your data, you'll need 3 times the raw storage. Indexes, metadata, and other overhead can increase that further.

4. Being unnecessarily precise

Saying your system handles 4,629.6 requests per second doesn't add much value when the assumptions themselves are approximate. Rounding to one or two significant digits is usually enough.

5. Estimating things that won't influence your design

If a calculation doesn't help you make an architectural decision, it's probably better to skip it and focus on the more important parts of the interview.

6. Recap

Here are the key numbers we've covered:

ReferenceValue
Seconds in a day~100,000
1 billion events per day~10,000 events per second
Memory read~100 ns
Random SSD read~100 μs
Network round trip between continents100-150 ms
Text recordA few hundred bytes to 1 KB
Compressed photoA few hundred KB to several MB
1 minute of HD videoTens of MB
Redis (single instance)~100,000 simple operations/sec
Relational database nodeThousands to tens of thousands of simple queries/sec
Peak traffic2-3x average

With these numbers, you can quickly estimate request rates, storage requirements, bandwidth, cache memory, and server capacity. Just remember to account for peak traffic, replication, and other overhead where necessary.

Most importantly, don't estimate numbers just for the sake of it. Focus on the estimates that help you make better design decisions, and explain how those numbers influence your architecture.

Quiz

Estimation Cheat Sheet Quiz

7 quizzes