Real User Monitoring (RUM) for CDN: Measuring Actual Experience

· James Thornton · 11 min read

Synthetic monitoring tells you how your CDN performs under ideal conditions. Real User Monitoring tells you how it performs for the people who actually use your site—on their devices, on their networks, from their locations. The gap between synthetic and real-world performance is often 2–5x, because synthetic tests cannot replicate the diversity of mobile networks, browser versions, and device capabilities that real users bring. For a comprehensive overview, see our guide on CDN Performance Metrics: What to Measure — FlyFish NWA.

This guide covers how to implement RUM for CDN performance measurement, which browser APIs provide the data, how CDN providers' built-in RUM tools compare with third-party options, and how to turn RUM data into CDN optimization decisions—including automated CDN switching in multi-CDN architectures.

How Does RUM Differ from Synthetic Monitoring for CDN?

Both monitoring approaches serve distinct purposes. Understanding their complementary strengths prevents the common mistake of relying on only one.

CDN Performance Dashboard — Core Web Vitals with CDN optimizationCDN Performance Dashboard — Core Web Vitals with CDN optimization CDN Performance Dashboard — Core Web Vitals Core Web Vitals with CDN LCP 1.8s Target: < 2.5s Good FID 45ms Target: < 100ms Good CLS 0.05 Target: < 0.1 Good TTFB 120ms Target: < 800ms Good
Figure 1: CDN Performance Dashboard — Core Web Vitals with CDN optimization
DimensionSynthetic MonitoringReal User Monitoring
Data sourceAutomated agents at fixed locationsReal users' browsers
Coverage20–50 test locationsEvery user, every location
ConsistencyControlled conditions, repeatableVariable (real-world noise)
Failure detectionFast (runs every 1–5 minutes)Slow (depends on user traffic)
Performance baselinesGood for trend detectionBest for actual user experience
CDN-specific insightCache behavior, header validationDelivery speed to real clients
CostPer-test pricing (can be expensive)Free to moderate (beacon-based)

For CDN optimization, RUM wins. Synthetic monitoring tells you the CDN is working; RUM tells you whether the CDN is working well enough for your users. A synthetic test from Virginia showing 30 ms TTFB does not help you understand that users in Indonesia are experiencing 800 ms TTFB because they are being routed to a distant PoP. RUM captures that. Use synthetic monitoring for uptime alerting and testing; use RUM for performance optimization.

Which Browser APIs Power CDN Performance Measurement?

Modern browsers expose detailed timing data through the Performance API. Three APIs are particularly relevant for CDN performance analysis.

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

Navigation Timing API. Provides page-level timing for the document request, which is the primary CDN-delivered resource. Key timestamps for CDN analysis:

Resource Timing API. Provides the same timing breakdown for every sub-resource loaded on the page: images, scripts, stylesheets, fonts, and API calls. This is where CDN performance analysis gets granular. You can measure TTFB for each CDN-delivered asset, identify resources with consistently slow delivery, and compare performance between CDN-served and origin-served resources.

Core Web Vitals. Google's Core Web Vitals are directly affected by CDN performance: Largest Contentful Paint (LCP) depends on how quickly the CDN delivers the largest visible element (usually an image), Interaction to Next Paint (INP) can be affected by slow CDN-delivered JavaScript, and Cumulative Layout Shift (CLS) is impacted when CDN-delivered images load without dimension attributes. See CDN and Core Web Vitals for the full relationship.

How Do CDN Provider RUM Tools Compare?

Several CDN providers offer built-in RUM capabilities. Using the provider's own RUM tool simplifies correlation between CDN metrics and user experience.

Cloudflare Web Analytics. Free, privacy-focused RUM that collects Core Web Vitals and page load timing without using cookies or tracking users. Data includes: TTFB distribution by country, LCP by device type, and referrer analysis. Limitations: no per-resource timing, limited custom event support, and data retained for 6 months.

Akamai mPulse. Enterprise-grade RUM platform with deep CDN integration. Correlates page performance with business metrics (conversion rate, bounce rate, revenue). Provides waterfall analysis of real user page loads, beacon-level debugging, and custom dimension support. The most capable provider RUM tool, but priced for enterprise budgets.

Third-party RUM alternatives. SpeedCurve provides best-in-class visualization of RUM data with a CDN focus. Datadog RUM offers integrated RUM with infrastructure and APM correlation. Google Analytics 4 tracks Core Web Vitals natively. Each provides CDN-relevant insights but requires separate integration.

ToolCostCore Web VitalsPer-Resource TimingCDN Correlation
Cloudflare Web AnalyticsFreeYesNoAutomatic (Cloudflare)
Akamai mPulseEnterprise pricingYesYesDeep (Akamai)
SpeedCurveFrom $55/monthYesYesManual
Datadog RUMFrom $15/1K sessionsYesYesVia log correlation

How Do You Set Up RUM Data Collection at the CDN Edge?

The most efficient RUM architecture collects performance beacons at the CDN edge rather than routing them to a distant analytics server. This reduces beacon delivery latency and keeps the collection endpoint fast.

Request Timing — Latency breakdown across the CDN stackRequest Timing — Latency breakdown across the CDN stack CDN Request Flow — From Browser to Edge CDN Request Lifecycle Step 1 DNS Lookup Step 2 TCP Connect Step 3 TLS Handshake Step 4 Edge Server Step 5 Cache Check Step 6 Response Cache HIT → 5ms response Cache MISS → Fetch origin 0ms ~50ms (cache hit) ~200ms (cache miss)
Figure 2: Request Timing — Latency breakdown across the CDN stack

Edge beacon endpoint. Deploy a lightweight beacon collection edge function that receives performance data from the browser's sendBeacon API. The edge function validates the payload, enriches it with CDN-side data (PoP location, cache status from the original page request), and forwards to your analytics pipeline.

Data enrichment at edge. The CDN edge can add context that the browser cannot observe: which PoP served the page request, the cache status (HIT/MISS) for the document and key resources, the origin response time (for cache misses), and the TLS protocol version negotiated. Combining browser-side timing with CDN-side metrics provides a complete picture of the delivery chain.

Sampling strategy. For high-traffic sites, collect RUM beacons from a percentage of page loads (10–25%) to manage data volume. Use consistent sampling based on a session or user identifier so you get complete sessions rather than random page views. Even at 10% sampling, a site with 1 million daily page views generates 100,000 data points—more than sufficient for statistical analysis.

How Do You Analyze RUM Data for CDN Optimization?

Raw RUM data is noise. The following analysis patterns extract actionable CDN optimization opportunities.

Pattern 1: Geographic TTFB analysis. Segment TTFB by user country. If specific regions show TTFB above 200 ms while others are below 50 ms, investigate: is the CDN routing users in that region to a nearby PoP? Is the cache hit ratio lower in that region (less popular content not cached at regional PoPs)? Would an additional origin in that region improve performance? This analysis directly feeds CDN architecture decisions.

Pattern 2: Cache effectiveness by content type. Compare RUM-measured TTFB for different resource types. If images consistently show 300+ ms TTFB while CSS/JS show 30 ms, the image cache configuration may be suboptimal (short TTLs, missing image optimization, or uncacheable response headers from the image origin).

Pattern 3: Mobile vs desktop performance gap. Segment RUM data by device type. If mobile LCP is 2x worse than desktop, investigate: are mobile users receiving full-resolution images (no responsive sizing)? Is the CDN serving uncompressed content to mobile devices? Are mobile users in regions with fewer edge PoPs? Apply mobile CDN optimization based on these findings.

Pattern 4: Performance regression detection. Track RUM metrics over time and alert when p75 or p95 TTFB increases by more than 20% compared to the previous week. Performance regressions often correlate with CDN configuration changes, origin deployments, or traffic pattern shifts. Cross-reference regression timestamps with your CDN change log and CDN log data.

How Does RUM-Driven CDN Switching Work?

In multi-CDN architectures, RUM data provides the most accurate signal for deciding which CDN should serve each user segment. This is more effective than synthetic-only switching because it reflects actual user experience.

The feedback loop. Each RUM beacon includes: which CDN served the page (identified by response header or CDN-specific cookie), the performance experienced (TTFB, LCP, download speed), and the user's context (geography, device, network type). A decision engine aggregates this data and adjusts traffic routing weights.

Decision engine. The engine maintains a performance score per CDN per region (e.g., "Cloudflare performs 15% better than CloudFront for users in Germany"). When the score diverges beyond a threshold, the engine adjusts DNS weights or load balancer rules to shift traffic toward the better-performing CDN. Changes are gradual (5–10% shifts per interval) to avoid oscillation.

Safeguards. RUM-driven switching must include: minimum sample size requirements (do not switch based on 10 data points), hysteresis (require sustained performance difference before switching, not momentary blips), rate limiting on switches (no more than one routing change per hour), and manual override capability for incidents. For the multi-CDN architecture context, see CDN Cost Optimization which covers multi-CDN arbitrage.

RUM is not just a monitoring tool—it is the feedback mechanism that closes the loop between CDN configuration and user experience. Combined with systematic testing and troubleshooting, RUM creates a data-driven CDN operations practice that continuously improves delivery performance.

External References

References & Standards: W3C Web Performance · Cloudflare documentation