The System Design Newsletter

The System Design Newsletter

Share this post

The System Design Newsletter
The System Design Newsletter
Back of the Envelope
Copy link
Facebook
Email
Notes
More
User's avatar
Discover more from The System Design Newsletter
Download my system design playbook for free on newsletter signup
Over 154,000 subscribers
Already have an account? Sign in

Back of the Envelope

Feed: Capacity Planning System Design

Neo Kim's avatar
Neo Kim
May 07, 2023
11

Share this post

The System Design Newsletter
The System Design Newsletter
Back of the Envelope
Copy link
Facebook
Email
Notes
More
6
Share

Thanks for reading systemdesign.one newsletter. If you're not yet subscribed, let me help you with that:

The following is the back-of-the-envelope calculation for a URL shortener.

Traffic

The URL shortener is a read-heavy service. The Daily Active Users (DAU) for writes is 100 million. The Query Per Second (QPS) of reads is approximately 100 thousand.


Storage

The shortened URL persists by default for 5 years in the data store. Each character size is assumed to be 1 byte. A URL record is approximately 2.5 KB in size. Set the replication factor of the storage to a value of at least three for improved durability and disaster recovery.


Bandwidth

Ingress is the network traffic that enters the server (client requests).

Egress is the network traffic that exits the servers (server responses).


Memory

The URL redirection traffic (egress) is cached to improve the latency. Following the 80/20 rule, 80% of egress is served by 20% of URL data stored on the cache servers. The remaining 20% of the egress is served by the data store to improve the latency. A Time-to-live (TTL) of 1 day is reasonable.


Find out more by reading the full article on my website systemdesign.one!

Share

Sertaç's avatar
Ashish R's avatar
Marko's avatar
Vivek Kumar's avatar
Arjun's avatar
11 Likes
11

Share this post

The System Design Newsletter
The System Design Newsletter
Back of the Envelope
Copy link
Facebook
Email
Notes
More
6
Share

Discussion about this post

User's avatar
Vishal borana's avatar
Vishal borana
May 16, 2023

Why do we consider 300 days instead of 365 days while calculating storage?

Expand full comment
Like
Reply
Share
5 replies by Neo Kim and others
5 more comments...
8 Reasons Why WhatsApp Was Able to Support 50 Billion Messages a Day With Only 32 Engineers
#1: Learn More - Awesome WhatsApp Engineering (6 minutes)
Aug 27, 2023 â€¢ 
Neo Kim
742

Share this post

The System Design Newsletter
The System Design Newsletter
8 Reasons Why WhatsApp Was Able to Support 50 Billion Messages a Day With Only 32 Engineers
Copy link
Facebook
Email
Notes
More
24
How PayPal Was Able to Support a Billion Transactions per Day With Only 8 Virtual Machines
#30: Learn More - Awesome PayPal Engineering (4 minutes)
Dec 26, 2023 â€¢ 
Neo Kim
250

Share this post

The System Design Newsletter
The System Design Newsletter
How PayPal Was Able to Support a Billion Transactions per Day With Only 8 Virtual Machines
Copy link
Facebook
Email
Notes
More
14
How Stripe Prevents Double Payment Using Idempotent API
#45: A Simple Introduction to Idempotent API (4 minutes)
May 9, 2024 â€¢ 
Neo Kim
383

Share this post

The System Design Newsletter
The System Design Newsletter
How Stripe Prevents Double Payment Using Idempotent API
Copy link
Facebook
Email
Notes
More
30

Ready for more?

© 2025 Neo Kim
Publisher Privacy
Substack
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.