Feature

CDN Provider Detection + STALE/BYPASS Cache Status in Debug Overlay

TL;DR Snapshot

Stream Probe can now automatically identify which CDN is serving your video stream by reading HTTP response headers, and displays the provider name in the debug overlay. Two new cache states, STALE (orange) and BYPASS (purple), are also tracked to give deeper visibility into caching behavior during playback debugging.

Share this update

Stream Probe introduces automatic CDN provider identification and two new cache status states in this update. The debug overlay now reads HTTP response headers to detect which CDN is serving your video and surfaces that information directly on screen.

TL;DR

The debug overlay can now tell you whether Cloudflare, CloudFront, Fastly, or Akamai is delivering your stream. Two new cache states, STALE and BYPASS, are also tracked and shown with distinct color codes so you can diagnose caching behavior without leaving the app.

What's New

  • CDN provider detection: A new CdnProvider enum parses HTTP response headers to identify Cloudflare, CloudFront, Fastly, and Akamai automatically
  • Expanded CacheStatus enum: Added STALE and BYPASS to the existing cache state tracking
  • Overlay UI updates: Detected CDN provider now appears as a prefix in the debug overlay display
  • New color codes: STALE renders in orange, BYPASS renders in purple for quick visual differentiation
  • Unit tests: Comprehensive test coverage added for the new header parsing logic across all four CDN providers

How to Use

No configuration needed. If your stream passes through a supported CDN, the provider name will appear automatically in the Stream Probe debug overlay alongside the existing cache status indicator.

To read the new cache states programmatically:

switch cacheStatus {
case .stale:
    // Response was served from cache but is past its TTL
case .bypass:
    // CDN skipped the cache entirely
default:
    break
}

FAQ

Which CDN providers are supported?

Cloudflare, Amazon CloudFront, Fastly, and Akamai are detected automatically via their HTTP response headers. Other CDNs will not show a provider label but cache status tracking still works.

What does STALE mean in the overlay?

STALE means the CDN served a cached response that is past its configured TTL, usually because the origin was unreachable or revalidation was deferred. It shows in orange to flag that the content may not be current.

What does BYPASS mean in the overlay?

BYPASS means the CDN skipped its cache entirely and fetched directly from the origin for that request. It shows in purple because it can indicate a misconfiguration or an intentional cache-control override worth investigating.

Do I need to update any configuration to get CDN detection?

No. The parser reads standard HTTP response headers that CDNs already send. Just update to this version and the overlay will start showing provider information automatically.