← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Latency vs Bandwidth

Networking Intermediate
debt(d7/e5/b5/t7)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The tools listed (WebPageTest, Lighthouse) are specialist audit tools that require manual invocation and interpretation — they flag symptoms like slow page loads but won't automatically diagnose 'you confused latency with bandwidth as your bottleneck.' The detection hint explicitly notes 'automated: no,' meaning identifying the wrong optimisation target requires careful profiling and developer judgement, not an automated signal.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix points to solutions like adopting HTTP/2, adding a CDN, and restructuring serial API calls to be concurrent — these are not one-line patches. Switching from serial to parallel requests, adding keep-alive, and integrating a CDN each touch multiple layers of the codebase (HTTP client configuration, infrastructure config, request orchestration logic), amounting to a significant refactor across one or more components.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). The choice to optimise bandwidth instead of latency (or vice versa) shapes multiple workstreams: image optimisation efforts, API call patterns, CDN decisions, and HTTP client configuration. The applies_to covers both web and CLI contexts, meaning the wrong mental model can influence decisions across a broad surface area. It's not architectural (b7/b9), but it persistently misdirects optimisation work across many features.

t7 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'serious trap — contradicts how a similar concept works elsewhere' (t7). The misconception field captures the exact trap: developers assume more bandwidth = faster site, which directly contradicts how latency-bound workloads behave. A 100Mbps connection with 200ms RTT is slower for small responses than a 10Mbps connection at 10ms. This is a well-documented gotcha but it strongly contradicts the intuitive model (bigger pipe = faster) making it a serious cognitive trap for competent developers.

About DEBT scoring →

Also Known As

latency bandwidth RTT round trip time throughput

TL;DR

Latency is delay per request (physics + processing); bandwidth is throughput — high bandwidth does not fix high latency for small interactive responses.

Explanation

Latency: time for a packet to travel from source to destination — physical distance, hops, processing time. Cannot be improved beyond the speed of light. Bandwidth: maximum data transfer rate — upgradeable with better hardware. For small responses (API calls, HTML pages), latency dominates performance. A 10Mbps connection at 10ms RTT delivers a 10KB response faster than 100Mbps at 200ms RTT. HTTP/2 multiplexing and CDN reduce the impact of latency.

Common Misconception

More bandwidth always means a faster website — for small responses latency dominates; a 100Mbps connection with 200ms latency downloads a 10KB response in 200ms while a 10Mbps at 10ms delivers it in 10ms.

Why It Matters

Optimising image sizes (bandwidth) on an API making 20 serial requests (latency bottleneck) delivers minimal improvement — identifying the correct constraint guides correct optimisation.

Common Mistakes

  • Serial HTTP requests where parallel would reduce total time
  • No HTTP keep-alive — each new connection adds one RTT
  • No CDN — distant users have high latency regardless of origin bandwidth
  • Optimising file sizes when connection count is the real bottleneck

Code Examples

✗ Vulnerable
// 10 serial API calls — each adds full RTT:
async function loadDashboard() {
    const user    = await fetch('/api/user');     // 100ms RTT
    const orders  = await fetch('/api/orders');   // 100ms RTT
    const reviews = await fetch('/api/reviews');  // 100ms RTT
    // Total: 300ms in latency alone
}
✓ Fixed
// Parallel requests — latency is max(individual):
async function loadDashboard() {
    const [user, orders, reviews] = await Promise.all([
        fetch('/api/user'),
        fetch('/api/orders'),
        fetch('/api/reviews'),
    ]);
    // Total: ~100ms (parallel) vs 300ms (serial)
}

Added 16 Mar 2026
Edited 22 Mar 2026
Views 76
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 0 pings W 8 pings T 12 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 2 pings T 2 pings F 2 pings S 2 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 1 ping S 0 pings M 0 pings T 0 pings W 0 pings T 1 ping F 1 ping S 1 ping S 0 pings M 1 ping T 0 pings W
No pings yet today
SEMrush 1
Ahrefs 22 Amazonbot 7 Scrapy 7 Perplexity 4 Google 4 Unknown AI 2 Claude 2 ChatGPT 2 PetalBot 2 Majestic 1 Bing 1 Meta AI 1 SEMrush 1
crawler 53 crawler_json 3
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Medium
⚡ Quick Fix
Latency is round-trip time (affected by distance); bandwidth is throughput (affected by connection speed) — PHP apps suffer latency not bandwidth; reduce round trips with CDN, HTTP/2, and connection reuse
📦 Applies To
any web cli
🔗 Prerequisites
🔍 Detection Hints
Many small HTTP requests that could be batched; no HTTP/2 multiplexing; PHP making serial external API calls that could be concurrent
Auto-detectable: ✗ No webpagetest lighthouse
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: Medium Context: File

References


✓ schema.org compliant