<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tech Paths</title>
    <description>The latest articles on DEV Community by Tech Paths (@techpaths_dev).</description>
    <link>https://dev.to/techpaths_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3936265%2F214961bb-9933-4f9c-9241-eaa5fce5a989.png</url>
      <title>DEV Community: Tech Paths</title>
      <link>https://dev.to/techpaths_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techpaths_dev"/>
    <language>en</language>
    <item>
      <title>Back-of-the-envelope estimation</title>
      <dc:creator>Tech Paths</dc:creator>
      <pubDate>Sun, 17 May 2026 13:05:08 +0000</pubDate>
      <link>https://dev.to/techpaths_dev/back-of-the-envelope-estimation-3928</link>
      <guid>https://dev.to/techpaths_dev/back-of-the-envelope-estimation-3928</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://techpaths.dev/blog/back-of-envelope-estimation" rel="noopener noreferrer"&gt;TechPaths.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Back-of-the-envelope estimation means making quick, approximate calculations to understand the scale of a system — without a calculator, without exact data, and without spending more than 2-3 minutes.&lt;/p&gt;

&lt;p&gt;In system design interviews, interviewers ask you to estimate because they want to see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do you know the key numbers?&lt;/li&gt;
&lt;li&gt;Can you reason about scale?&lt;/li&gt;
&lt;li&gt;Will your design actually handle the load?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Numbers You Must Memorize
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Powers of 2
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Power&lt;/th&gt;
&lt;th&gt;Approximate value&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2¹⁰&lt;/td&gt;
&lt;td&gt;1 thousand&lt;/td&gt;
&lt;td&gt;1 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2²⁰&lt;/td&gt;
&lt;td&gt;1 million&lt;/td&gt;
&lt;td&gt;1 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2³⁰&lt;/td&gt;
&lt;td&gt;1 billion&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2⁴⁰&lt;/td&gt;
&lt;td&gt;1 trillion&lt;/td&gt;
&lt;td&gt;1 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2⁵⁰&lt;/td&gt;
&lt;td&gt;1 quadrillion&lt;/td&gt;
&lt;td&gt;1 PB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Latency Numbers
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;L1 cache read&lt;/td&gt;
&lt;td&gt;1 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;L2 cache read&lt;/td&gt;
&lt;td&gt;4 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAM read&lt;/td&gt;
&lt;td&gt;100 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSD read&lt;/td&gt;
&lt;td&gt;100 µs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network round trip (same DC)&lt;/td&gt;
&lt;td&gt;500 µs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HDD read&lt;/td&gt;
&lt;td&gt;10 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network round trip (cross-region)&lt;/td&gt;
&lt;td&gt;150 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Availability Numbers
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Nines&lt;/th&gt;
&lt;th&gt;Downtime/year&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;99%&lt;/td&gt;
&lt;td&gt;3.65 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.9%&lt;/td&gt;
&lt;td&gt;8.7 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.99%&lt;/td&gt;
&lt;td&gt;52 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.999%&lt;/td&gt;
&lt;td&gt;5 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Estimation Framework
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Always follow this order:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;State assumptions&lt;/strong&gt; — DAU and usage patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimate traffic&lt;/strong&gt; — RPS (reads and writes)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimate storage&lt;/strong&gt; — items × size × retention&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimate bandwidth&lt;/strong&gt; — RPS × payload size&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimate servers&lt;/strong&gt; — RPS ÷ capacity per server&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;State result and sanity check&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Step 1 — Traffic Estimation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RPS = DAU × requests_per_user_per_day / 86400
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example — Twitter-like system:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;300 million DAU&lt;/li&gt;
&lt;li&gt;Each user reads 100 tweets/day, writes 1 tweet/day
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read RPS  = 300M × 100 / 86400 ≈ 350,000 RPS
Write RPS = 300M × 1   / 86400 ≈ 3,500 RPS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; 80/20 rule — 80% reads, 20% writes for most social apps.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2 — Storage Estimation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Storage = items_per_day × item_size × retention_days
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example — Twitter tweets:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3,500 writes/second = ~300M tweets/day&lt;/li&gt;
&lt;li&gt;Each tweet: 280 chars = ~300 bytes + metadata = ~1 KB&lt;/li&gt;
&lt;li&gt;Keep 5 years = 1825 days
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Storage = 300M × 1KB × 1825 = 547 TB ≈ 0.5 PB over 5 years
Daily:   = 300M × 1KB        = 300 GB/day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3 — Bandwidth Estimation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bandwidth = RPS × average_payload_size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example — Twitter read bandwidth:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read bandwidth = 350,000 RPS × 1KB = 350 GB/s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's why Twitter uses CDNs aggressively — serving 350 GB/s from origin servers would be impossible.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4 — Server Estimation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Servers needed = Total RPS / RPS per server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A typical web server handles ~1,000-10,000 RPS depending on workload.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For 350,000 read RPS at 10,000 RPS/server:
Servers = 350,000 / 10,000 = 35 servers (minimum)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add 2-3x for redundancy and peak traffic → ~100 servers.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common Estimation Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  URL Shortener (like bit.ly)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Assumptions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100M DAU&lt;/li&gt;
&lt;li&gt;1 URL created per user per day&lt;/li&gt;
&lt;li&gt;100 reads per URL per day
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write RPS = 100M / 86400 ≈ 1,200 RPS
Read RPS  = 1,200 × 100  = 120,000 RPS

URL size      = 100 bytes
Daily storage = 100M × 100B = 10 GB/day
Yearly        = 10 × 365    = 3.65 TB/year
Read-write ratio: 100:1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Instagram Photo Storage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Assumptions:
- 500M DAU
- 10% upload a photo daily = 50M photos/day
- Average photo size = 1 MB (after compression)

Daily storage  = 50M × 1MB  = 50 TB/day
Yearly storage = 50 × 365   = 18 PB/year
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Useful Approximations
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Thing&lt;/th&gt;
&lt;th&gt;Approximate size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ASCII character&lt;/td&gt;
&lt;td&gt;1 byte&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unicode character&lt;/td&gt;
&lt;td&gt;2-4 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integer&lt;/td&gt;
&lt;td&gt;4 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long/timestamp&lt;/td&gt;
&lt;td&gt;8 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UUID&lt;/td&gt;
&lt;td&gt;16 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tweet (280 chars)&lt;/td&gt;
&lt;td&gt;~300 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Average webpage&lt;/td&gt;
&lt;td&gt;~2 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Photo (compressed)&lt;/td&gt;
&lt;td&gt;~300 KB - 1 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 minute HD video&lt;/td&gt;
&lt;td&gt;~100 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 minute 4K video&lt;/td&gt;
&lt;td&gt;~400 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  How to Present in an Interview
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Let me make some assumptions first:
 - 100M DAU
 - Read-heavy: 10:1 read-write ratio
 - Average payload: 1KB

Traffic:
 - Writes: 100M / 86400 ≈ 1,200 RPS
 - Reads:  1,200 × 10   = 12,000 RPS

Storage:
 - 1,200 writes/s × 1KB × 86400s = ~100 GB/day
 - Over 5 years: ~180 TB

This tells me I need:
 - Read replicas for the 10:1 read ratio
 - ~2 servers for writes, ~12 for reads
 - CDN for static content"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Memorize: powers of 2, latency numbers, availability nines&lt;/li&gt;
&lt;li&gt;Framework: Traffic → Storage → Bandwidth → Servers&lt;/li&gt;
&lt;li&gt;Always state assumptions first — interviewers care about your reasoning, not exact numbers&lt;/li&gt;
&lt;li&gt;Round aggressively: 86,400 ≈ 100,000&lt;/li&gt;
&lt;li&gt;Sanity check: does the number feel right? PB for a major social network — yes. PB for a small blog — no.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Want more system design content? Check out &lt;a href="https://techpaths.dev" rel="noopener noreferrer"&gt;TechPaths.dev&lt;/a&gt; — structured learning paths for system design, DSA, AI/ML, and cloud.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>programming</category>
      <category>webdev</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
