ByteByteGo - Technical Interview Prep
ByteByteGo - Technical Interview Prep
https://bytebytego.com/courses/system-design-interview/back-of-the-envelope-estimation 1/7
11/13/24, 11:09 AM ByteByteGo | Technical Interview Prep
https://bytebytego.com/courses/system-design-interview/back-of-the-envelope-estimation 3/7
11/13/24, 11:09 AM ByteByteGo | Technical Interview Prep
02 Scale
Users
From Zero To Millions Of
03 Back-of-the-envelope
Estimation
Figure 1
04 AInterviews
Framework For System Design
By analyzing the numbers in Figure 1, we get the following conc
05 Design A Rate Limiter Memory is fast but the disk is slow.
Avoid disk seeks if possible.
06 Design Consistent Hashing
Simple compression algorithms are fast.
Compress data before sending it over the internet if possible
Data centers are usually in different regions, and it takes
07 Design A Key-value Store send data between them.
04 AInterviews
Framework For System Design Table 3
Example: Estimate Twitter QPS a
05 Design A Rate Limiter
storage requirements
Please note the following numbers are for this exercise only as
06 Design Consistent Hashing not real numbers from Twitter.
Assumptions:
07 Design A Key-value Store 300 million monthly active users.
50% of users use Twitter daily.
08 Design A Unique ID Generator
In Distributed Systems Users post 2 tweets per day on average.
10% of tweets contain media.
09 Design A URL Shortener Data is stored for 5 years.
Estimations:
10 Design A Web Crawler Query per second (QPS) estimate:
Daily active users (DAU) = 300 million * 50% = 150 million
https://bytebytego.com/courses/system-design-interview/back-of-the-envelope-estimation 5/7
11/13/24, 11:09 AM ByteByteGo | Technical Interview Prep
02 Scale
Users
From Zero To Millions Of Tips
Back-of-the-envelope estimation is all about the process. So
problem is more important than obtaining results. Interviewers
03 Back-of-the-envelope
Estimation your problem-solving skills. Here are a few tips to follow:
Rounding and Approximation. It is difficult to perform com
04 AInterviews
Framework For System Design math operations during the interview. For example, what is t
of “99987 / 9.1”? There is no need to spend valuable time
complicated math problems. Precision is not expected. Us
05 Design A Rate Limiter numbers and approximation to your advantage. The
question can be simplified as follows: “100,000 / 10”.
06 Design Consistent Hashing Write down your assumptions. It is a good idea to write do
assumptions to be referenced later.
Label your units. When you write down “5”, does it mean 5
07 Design A Key-value Store MB? You might confuse yourself with this. Write down t
because “5 MB” helps to remove ambiguity.
08 Design A Unique ID Generator
In Distributed Systems
Commonly asked back-of-the-envelope estimations: QP
QPS, storage, cache, number of servers, etc. You can pract
calculations when preparing for an interview. Practice
09 Design A URL Shortener perfect.
Congratulations on getting this far! Now give yourself a pat on t
10 Design A Web Crawler Good job!
https://bytebytego.com/courses/system-design-interview/back-of-the-envelope-estimation 6/7
Reference materials
11/13/24, 11:09 AM ByteByteGo | Technical Interview Prep
04 AInterviews
Framework For System Design
https://bytebytego.com/courses/system-design-interview/back-of-the-envelope-estimation 7/7