How CDN Edge Caching Works
When a CDN caches a video, it stores copies of the video segments at edge servers distributed globally. When your browser requests a video segment, the CDN routes that request to the nearest edge node — often within 50–100 miles of your location. The first request for a segment goes to the origin server (cache miss), but all subsequent requests for the same content are served from the cached edge copy at significantly lower latency. For popular content, nearly all requests are cache hits.
CDN Selection for Video
Not all CDNs are equal for video. Cloudflare's CDN has excellent global coverage and its R2 object storage has zero egress fees for bandwidth exiting to the internet — making it extremely cost-effective for video delivery. AWS CloudFront integrates directly with S3 and offers advanced features like signed URLs for access control and Lambda@Edge for request manipulation. Bunny.net specializes in video delivery with competitive pricing and built-in video optimization features.
CDN vs Direct Hosting Performance
The difference is measurable. A video file hosted on a single server in Frankfurt will have a 200ms+ time-to-first-byte for a viewer in Singapore. The same file served from a Cloudflare edge node in Singapore will have a time-to-first-byte under 20ms. For adaptive HLS streaming where the player is constantly requesting new 4-second segments, this difference compounds — each segment request adds latency, making CDN delivery essential for smooth adaptive playback.