Home › Web Performance › CDN Waterfall Analysis
Web Performance

CDN Waterfall Analysis: Reading and Optimizing Network Waterfalls

By Alex Petrov, DevOps & Infrastructure Engineer September 11, 2026 9 min read

Network waterfalls are the single most honest view of how your CDN actually performs. Not synthetic scores, not averaged RUM metrics, but the sequential, color-coded reality of DNS, TCP, TLS, TTFB, and content download for every resource on the page. If you can read a waterfall fluently, you can distinguish an edge cache hit from a shield miss, a slow origin from a congested PoP, and a client-side bottleneck from a true network delay.

This guide shows you how to analyze CDN waterfalls like an infrastructure engineer: what each timing phase means, which patterns signal misconfiguration, and how to turn a waterfall into an actionable optimization plan.

TL;DR: A healthy CDN waterfall shows <50ms DNS, <80ms TLS on reused connections, and TTFB under 120ms for cache HITs. Long green (TTFB) bars on static assets almost always mean cache MISS, stale revalidation, or origin latency — not bandwidth issues.

1. Anatomy of a Network Waterfall

Every bar in Chrome DevTools, WebPageTest, or SpeedCurve represents one resource. The bar is segmented by phase. Understanding those segments is prerequisite to any CDN performance debugging workflow.

CDN Waterfall Timing Diagram Horizontal waterfall showing DNS, TCP, TLS, TTFB and download phases for three resources with cache HIT vs MISS comparison. WATERFALL PHASES — CACHE HIT vs MISS Time → 0ms —————————————————————————————————————————————— 800ms DNS TCP TLS TTFB (Wait) Download /index.html MISS • 412ms /app.9a2c.css HIT • 68ms /hero-1200.webp HIT • 94ms 0ms 200ms 400ms 600ms
Figure 1: A cache MISS shows long TTFB (green) due to origin fetch; HITs on reused connections collapse DNS/TLS and keep TTFB minimal.

In DevTools, the colors map directly to the Resource Timing API:

Pro tip: Enable the Server-Timing and X-Cache response headers in your waterfall tool to overlay cache status directly on the bar. Without it, you are guessing.

2. How to Read a CDN Waterfall Correctly

Start at the top, not the bottom. The document request (HTML) dictates everything downstream.

Performance Comparison: Edge vs Origin Processing
Metric Edge Processing Origin Processing Improvement
Latency (p50)8–15 ms120–300 ms15–20x faster
Cache Hit Ratio85–95%N/AReduces origin load
TLS Handshake1–5 ms (nearby PoP)50–150 ms10–30x faster
Bandwidth Cost$0.01–0.04/GB$0.05–0.12/GB3–5x cheaper
Availability99.99% (multi-PoP)99.9% (single DC)10x fewer outages

Step 1: Validate the HTML delivery

If / or /index.html has a TTFB of 400ms+ and shows x-cache: MISS, your origin is on the critical path for every page load. No amount of image optimization will fix that. Check whether HTML should be cached at the edge with short-TTL caching strategies or served stale-while-revalidate. For dynamic HTML, consider tiered caching and Argo-style smart routing.

Step 2: Check connection reuse

All static assets should reuse the same TCP/TLS connection to the CDN hostname. If you see repeated DNS + TLS bars for every asset, you have a connection coalescing failure: multiple hostnames without SAN coverage, HTTP/1.1 without keep-alive, or a sharded domain that predates HTTP/2. Consolidate to one CDN hostname and enable HTTP/2 or HTTP/3.

Step 3: Separate TTFB from Download

A long blue Download bar means large payload or slow throughput. A long green TTFB bar means server-side wait. Engineers often misdiagnose a 600ms TTFB on a 12KB JSON file as a bandwidth problem. It is not. It is a cache miss, origin query, or edge compute delay. Filter by TTFB in WebPageTest to isolate it.

Step 4: Read priority and sequencing

Modern browsers prioritize resources. Your waterfall should show CSS and fonts early, images later, and low-priority scripts deferred. If a 1.2MB hero image blocks CSS, you have a priority inversion — often caused by early preloads or render-blocking scripts injected via tag managers. Use fetchpriority="high" only for the LCP image.

3. CDN-Specific Signals Hidden in the Waterfall

A generic waterfall tells you when. CDN headers tell you why.

Signal Where to Find It Healthy Value What It Means
Cache Status X-Cache, CF-Cache-Status, Age HIT Age > 0 Served from edge RAM. TTFB should be <100ms globally.
Shield / Tiered Cache X-Cache: MISS, HIT (two-tier) Edge MISS, Shield HIT Edge fetched from shield, not origin. TTFB 80-180ms.
Origin Latency Server-Timing: origin;dur=... <150ms Time origin took to generate response. High = DB/query issue.
TLS Version Server-Timing or DevTools Security panel TLS 1.3, 0-RTT or 1-RTT TLS 1.2 adds ~60ms. Enable TLS 1.3 at edge.
HTTP Version Protocol column (h2, h3) h2 or h3 h1.1 prevents multiplexing; causes connection queueing.
Revalidation 304 Not Modified + REVALIDATED Small 304, ~30ms Conditional request. Use stale-while-revalidate to hide it.

To expose these, configure your CDN to emit Server-Timing. Example for Cloudflare Workers or Fastly VCL:

// Add at edge — exposes cache and origin timing to waterfall tools
add_header Server-Timing "cdn-cache;desc=HIT, edge;dur=12, origin;dur=0" always;
# For MISS: origin;dur=214, shield;dur=42

Also verify Cache-Control and CDN-Cache-Control are distinct. A common mistake is sending Cache-Control: private, no-store for authenticated HTML, which also prevents edge caching unless you override with CDN-Cache-Control: max-age=60, stale-while-revalidate=600. See our guide on cache invalidation for safe patterns.

4. Common Waterfall Anti-Patterns and Fixes

Pattern 1: The Origin Staircase

Every static asset shows a 300-700ms TTFB with MISS, each stair-stepped because the browser hits the 6-connection limit. Root cause is usually a cache key that includes a cookie, query string, or Vary: * header. Fix: normalize cache keys, strip unnecessary cookies at the edge, and set Vary: Accept-Encoding only. One bad Vary can drop hit ratio from 96% to 40%.

Pattern 2: TLS Handshake Storm

You see purple TLS bars on 15+ resources. This happens with domain sharding (img1.cdn.com, img2.cdn.com) or when using multiple CDN hostnames without a wildcard cert. With HTTP/2 and HTTP/3, sharding hurts. Consolidate assets to a single hostname and enable 0-RTT where safe. For third parties, use preconnect, not dns-prefetch alone.

<!-- In <head> — warm connection before discovery -->
<link rel="preconnect" href="https://cdn.flyfishnwa.com" crossorigin>
<link rel="preload" as="image" href="/hero-1200.webp" fetchpriority="high" imagesrcset="/hero-600.webp 600w, /hero-1200.webp 1200w">

Pattern 3: The Long Green Bar on Images

A 900ms TTFB on a 200KB WebP that should be cached. Check Age and Cache-Control. If Age: 0 and HIT, the object was just inserted — maybe a recent purge. If MISS repeatedly, your image optimizer is generating unique URLs per request or signing URLs with short expiry. Stabilize URLs and cache transformed images at the edge with CDN image optimization settings.

Pattern 4: Blocking Third Parties

A single analytics or A/B script with 800ms TTFB blocks rendering because it is loaded synchronously in the head. The waterfall shows a gap — no other resources start until it completes. Move it to async or defer, or load via edge worker and serve from your CDN hostname to benefit from connection reuse.

Pattern 5: HTML Slow, Assets Fast

HTML TTFB is 650ms (MISS), but all subsequent assets are HIT and fast. This is an origin or shield latency problem, not an edge problem. Enable stale-while-revalidate and stale-if-error for HTML, or use an edge cache lock (request coalescing) to prevent thundering herd on popular pages.

5. Optimization Playbook: From Waterfall to Fix

Use this sequence after capturing a waterfall in WebPageTest (3 runs, cable profile, with Preserve User Data off):

  1. Measure hit ratio: Export HAR, count HIT vs MISS. Aim for >92% for static, >75% for HTML with tiered cache. Low ratio = fix cache keys first.
  2. Collapse connection overhead: Ensure h2/h3, TLS 1.3, single hostname, and preconnect. Each eliminated handshake saves 60-120ms on 4G.
  3. Reduce TTFB variance: If MISS TTFB is >300ms, add shield PoP closer to origin, enable origin keep-alive, and tune origin concurrency. A 20ms shield RTT beats a 90ms cross-country origin fetch.
  4. Compress and prioritize: Verify Brotli (level 5-6) for text, AVIF/WebP for images, and correct priorities. A 40% smaller download bar often matters more than 20ms TTFB.
  5. Defer non-critical: Anything not needed for LCP should not compete for bandwidth in the first 2 seconds. Defer, lazy-load, or edge-inject.

Validate with code-level timing:

# Measure TTFB and cache status from edge
curl -w "dns:%{time_namelookup} tcp:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer} total:%{time_total}\n" \
  -H "Pragma: no-cache" -s -o /dev/null -D - https://cdn.flyfishnwa.com/app.9a2c.css | grep -i "x-cache\|age\|server-timing"

// In browser console — Resource Timing for LCP candidate
performance.getEntriesByType('resource').filter(r=>r.name.includes('hero')).map(r=>({
  name: r.name.split('/').pop(),
  ttfb: (r.responseStart - r.requestStart).toFixed(1),
  download: (r.responseEnd - r.responseStart).toFixed(1),
  proto: r.nextHopProtocol
}))

Pair waterfall analysis with broader security and routing checks. A misconfigured WAF rule can add 150ms of edge compute before cache lookup, visible as inflated TTFB even on HITs — review your CDN security guide to ensure bot checks run after cache, not before.

6. Building a Repeatable Debugging Workflow

Waterfalls are snapshots. For reliability, automate:

When you file a ticket with your CDN provider, include the HAR, the CF-Ray or X-Served-By PoP ID, and the specific resource waterfall. “Site is slow” is unactionable; “DFW PoP, MISS TTFB 680ms on /api/menu.json, origin dur 540ms” gets fixed in hours.

Mastering waterfall analysis turns the CDN from a black box into a transparent pipeline. Start with cache status, then connections, then priorities — in that order — and most performance issues resolve to a handful of header or key misconfigurations rather than infrastructure limits.

Frequently Asked Questions

What is the difference between TTFB and download time in a CDN waterfall?
TTFB (green waiting time) measures how long the edge or origin took to produce the first byte, including cache lookup and origin fetch. Download time (blue) measures transfer of the body. High TTFB means cache MISS or slow origin; long download means large file or slow throughput. Optimize them differently.
Why do my CDN assets show HIT but still have high TTFB?
A HIT with high TTFB often indicates edge compute overhead, WAF/bot inspection before cache, a distant PoP, or HTTP/1.1 queueing. Check Server-Timing for edge dur, verify h2/h3 and PoP location via X-Served-By, and ensure security rules are set to run after cache lookup.
How can I tell if my cache hit ratio is hurting waterfall performance?
Export the HAR and calculate HIT/(HIT+MISS) for static assets. If below 90-92%, look for stair-stepped MISS bars with long TTFB. Common causes are Vary: *, cookie-based cache keys, or query-string busting. Normalize keys and strip unnecessary cookies at the edge.
Which tools are best for CDN waterfall analysis?
WebPageTest is the gold standard for detailed waterfalls with connection views and Server-Timing overlays. Chrome DevTools is best for quick iterative checks. For monitoring, use SpeedCurve, Catchpoint, or custom RUM that captures Resource Timing plus cache status headers.

References & Standards: HTTP/2 specification · RFC 7234