Course contentsShow
← System Design
Lesson 1545 of 1,91938. Real-World System: PastebinFree lesson

Traffic and Storage Estimation

Calculating daily paste creation, read-to-write ratio, storage needs, and bandwidth requirements.

Traffic and Storage Estimation

You'll learn how to calculate daily paste creation volume, read-to-write ratios, storage capacity needs, and bandwidth requirements for Pastebin.

Understanding the Scale

Before designing Pastebin's architecture, you must quantify the system's load. Traffic and storage estimation transforms vague requirements like "millions of users" into concrete numbers that drive technical decisions.

Start with daily paste creation. Assume 1 million new pastes daily. If each paste averages 10 KB, that's 10 GB of new data per day, or 3.65 TB annually. Plan for 5 years? You need ~18 TB capacity—plus overhead for metadata, indexes, and replication.

Read-to-Write Ratio

Pastebin is read-heavy. Users share URLs that get viewed multiple times. A typical ratio might be 10:1 or even 100:1 reads-to-writes. If you create 1 million pastes daily but receive 50 million read requests, your infrastructure must handle 50M/86,400 ≈ 580 reads/second versus 12 writes/second. This asymmetry heavily influences caching strategy and database scaling.

Bandwidth Calculation

For inbound bandwidth (writes): 1M pastes × 10 KB = 10 GB/day ÷ 86,400 seconds ≈ 120 KB/s.

For outbound bandwidth (reads): 50M reads × 10 KB = 500 GB/day ÷ 86,400 seconds ≈ 5.8 MB/s.

These estimates help size network capacity, CDN requirements, and server specifications.

Metadata Overhead

Don't forget paste IDs (8 bytes), timestamps (8 bytes), user IDs (8 bytes), and expiration data. Metadata might add 20-30% to raw storage needs.

Key Takeaway: Traffic and storage estimation converts abstract requirements into concrete numbers—daily writes, read/write ratios, storage growth, and bandwidth—that directly inform partitioning, caching, and capacity planning decisions.