← Back to System Design Fundamentals

Back-of-envelope: Bandwidth

System Design FundamentalsMidsystem-design

The Question

How do you estimate bandwidth in a back-of-envelope calculation?

What a Strong Answer Covers

  • Formula
  • bytes-to-bits.

Senior-Level Answer

Bandwidth estimation connects QPS to data transferred per second. It is always directional — inbound (upload) and outbound (download) are sized separately because they drive different infrastructure limits.

**Formula**: Bandwidth = QPS × Average payload size

**Step 1: Reuse QPS estimate** From a previous estimation: 4,500 read QPS and 150 write QPS for a Twitter-like system.

**Step 2: Estimate payload size per request type** - Tweet write: 140 chars UTF-8 ≈ 300 bytes text + metadata = ~1 KB - Timeline read: 20 tweets per page, each ~1 KB = ~20 KB response; with media thumbnails, ~500 KB

**Step 3: Calculate** - Inbound (write): 150 QPS × 1 KB = 150 KB/s ≈ 1.2 Mbps — negligible - Outbound (read, text only): 4,500 QPS × 20 KB = 90 MB/s = 720 Mbps - Outbound (read, with thumbnails): 4,500 QPS × 500 KB = 2.2 GB/s = 17.6 Gbps

**Step 4: Interpret the number** - < 100 Mbps: single server network interface is fine - 100 Mbps – 10 Gbps: multiple servers, 10GbE NICs, CDN for static content mandatory - > 10 Gbps: CDN offloading is essential; origin serves only cache misses

**CDN impact**: if 90% of image requests are served from CDN edge nodes, origin bandwidth drops 10×. This is why CDN is a first-class architectural component, not an optimization.

**Key unit conversions**: - 1 Gbps = 125 MB/s - 1 MB/s = 8 Mbps - 10 Gbps NIC is a common server spec — exceeding it requires multiple NICs or CDN offloading

State assumptions about average vs peak: peak bandwidth is typically 2–3× average, matching the QPS peak multiplier.

What Separates a 2/3 from a 3/3

2/3 — Passing but Incomplete

Correctly applies QPS × payload size formula, separates inbound from outbound, and uses reasonable payload estimates.

3/3 — Strong Answer

Interprets the result in terms of infrastructure choices, explains CDN offloading impact quantitatively, and applies peak multiplier.

Common Mistakes

  • Calculating bandwidth without separating read from write directions
  • Forgetting to account for CDN — overestimating origin bandwidth
  • Mixing up MB/s and Mbps in the final answer
  • Not connecting bandwidth numbers to NIC capacity or CDN necessity

Follow-Up Questions

  • How does a CDN reduce origin bandwidth and what percentage offload is realistic? — CDNs serve 85–95% of cacheable static content at edge — origin sees only cache misses and dynamic content.
  • What bandwidth does a 1080p video stream require? — ~5 Mbps for H.264 1080p; at 10K concurrent viewers that's 50 Gbps — CDN edge delivery is mandatory.
  • How does your bandwidth estimate change if you add video uploads? — Video uploads dominate inbound — 1 minute of HD video at 5 Mbps × uploads/day drives a very different inbound capacity calculation.
  • How do you size the bandwidth between your web tier and database tier? — Estimate DB query result sizes × QPS to the DB — usually internal 10GbE is sufficient; cache hit rate determines actual DB QPS.

Related Questions

  • Redis Caching Patterns
  • Vertical vs Horizontal Scaling
  • API Versioning
  • SLOs vs SLAs
  • Availability — Five 9s

Can You Explain This Cold?

Reading the answer is step one. Explaining it unprompted — under interview pressure — is what actually matters. Get AI-graded feedback on your answer with follow-up probes on your weak points.

Get Graded — Free Assessment
GrindQuestionsAITechnical interview assessment
TermsPrivacyAbout