CDN Monitoring and Observability: Metrics That Matter
Why CDN Observability Matters
A CDN sits between your users and your infrastructure. When it misbehaves — stale content, elevated latency, cache misses — users experience the impact before your origin servers notice anything wrong. Effective CDN monitoring requires tracking edge-specific metrics that traditional APM tools miss.
| Metric | Edge Processing | Origin Processing | Improvement |
|---|---|---|---|
| Latency (p50) | 8–15 ms | 120–300 ms | 15–20x faster |
| Cache Hit Ratio | 85–95% | N/A | Reduces origin load |
| TLS Handshake | 1–5 ms (nearby PoP) | 50–150 ms | 10–30x faster |
| Bandwidth Cost | $0.01–0.04/GB | $0.05–0.12/GB | 3–5x cheaper |
| Availability | 99.99% (multi-PoP) | 99.9% (single DC) | 10x fewer outages |
Key CDN Metrics
Performance Metrics
| Metric | What It Measures | Target |
|---|---|---|
| TTFB (edge) | Time from request to first byte at edge | < 50ms (cache hit) |
| TTFB (origin) | Time for CDN to fetch from origin | < 500ms |
| Response time (P50/P95/P99) | Full response delivery time | P99 < 200ms |
| Throughput | Bytes/second delivered | Baseline + capacity |
Cache Metrics
- Cache hit ratio — Target: 85-95%. Below 80% indicates misconfiguration.
- Cache hit ratio by content type — Images should be 95%+, HTML 70-90%, APIs 30-80%
- Origin offload — Percentage of requests NOT reaching origin. Should be 85%+.
- Bandwidth offload — Percentage of bandwidth served from cache. Often higher than request offload (large files cache well).
Error Metrics
- 5xx error rate — Should be < 0.1%. Spikes indicate origin issues.
- 4xx error rate — Track separately from 5xx. High 404 rates may indicate stale links or misconfigured redirects.
- Origin error rate — Errors between CDN and origin, distinct from edge errors.
Alerting Strategy
# Critical (PagerDuty/immediate)
cache_hit_ratio < 50% for 5 minutes
error_rate_5xx > 1% for 3 minutes
origin_latency_p99 > 2000ms for 5 minutes
# Warning (Slack/email)
cache_hit_ratio < 80% for 15 minutes
error_rate_5xx > 0.5% for 5 minutes
bandwidth_spike > 3x baselineCDN Provider Analytics
- Cloudflare — Built-in analytics dashboard, GraphQL Analytics API, Workers Analytics Engine
- CloudFront — CloudWatch metrics, real-time logs to Kinesis, standard logs to S3
- Fastly — Real-time log streaming (< 1s delay), historical stats API
- Akamai — DataStream (real-time), Reporting API, Traffic Management dashboard
Third-Party Monitoring
CDN provider analytics show what happened at the edge. Third-party monitoring shows what users actually experienced:
- Synthetic monitoring — Catchpoint, Datadog Synthetics, Pingdom: simulate requests from global locations
- Real User Monitoring (RUM) — Measure actual user performance across all CDN PoPs
- Log aggregation — ELK Stack, Splunk, Datadog Logs: centralize CDN logs with application logs
Dashboard Design
A CDN operations dashboard should show at a glance: global map of edge latency by region, cache hit ratio trend (last 24 hours), origin health and error rates, bandwidth utilization vs. capacity, top URLs by request volume and cache misses.