Streaming Services on Cloud: The CDN and Encoding Decisions
Video streaming in the cloud looks easy until the bill arrives. Here is where the costs hide and how to keep them sane.

Video streaming is one of those workloads where the cloud marketing sounds straightforward ("just drop your files in and we handle delivery") and the reality involves encoding ladders, DRM, CDN contracts, origin shielding, and bills that shock people. After running through several streaming projects at scale, here is what actually matters.
Encoding Is More Important Than Delivery
The mistake most streaming projects make is optimizing the CDN contract before optimizing the encoding ladder. The CDN delivers whatever you give it. If what you give it is a bloated, inefficiently encoded master, you are paying the bandwidth premium forever.
The modern encoding stack
H.264 is still the compatibility workhorse. If you need one codec that plays everywhere, it is H.264. But for any non-trivial streaming service, you should be encoding in:
- H.264 for compatibility with old devices and browsers.
- H.265 (HEVC) for roughly 40 percent better compression on supported devices. Note that HEVC has licensing complexity; decide how that affects you.
- AV1 for cutting-edge efficiency (around 30 percent better than HEVC) on modern Chrome, Firefox, and newer devices. Encoding is slow, but the bandwidth savings pay for it at scale.
Serving a multi-codec stack means your players have to pick the best one their device supports. HLS and DASH both handle this; the complexity is in the packaging pipeline.
Per-title encoding
The Netflix innovation that changed everything: instead of encoding every title at the same bitrate ladder, profile each title and give it a custom ladder. A cartoon needs far less bitrate than a fast-action sports clip to look identical. Per-title encoding can cut average delivery bandwidth by 20 to 30 percent without hurting perceived quality.
Cloud encoding services (AWS MediaConvert, Mux, Bitmovin) have per-title encoding built in. Use it.
CDN Is Where the Money Goes
For any serious streaming service, CDN is usually the single largest line item in the infrastructure budget. Egress from the major clouds is priced aggressively — in the bad way. AWS, Azure, and GCP egress will run you $0.05 to $0.09 per GB after the first TB. Across a streaming workload at scale, that is catastrophic.
Multi-CDN is standard practice
Any serious streaming service runs on multiple CDNs (Akamai, Fastly, Cloudflare, Verizon, Lumen) with a traffic steering layer deciding which one to use for each request based on performance and cost. Cedexis (now Citrix ITM), NS1, and DNSPerf make this tractable. The discounts you negotiate by playing CDNs against each other are meaningful.
Cloudflare Stream is interesting
For smaller operations, Cloudflare Stream offers flat-rate pricing per minute of video delivered, which is predictable in a way that per-GB pricing is not. For a service delivering under a petabyte a month, it can be dramatically cheaper than building your own pipeline.
Origin shielding matters
A naive setup has the CDN pull directly from your origin for cache misses. At scale, that hammers your origin and drives up egress from your cloud. Origin shielding — a single regional cache layer in front of your origin — reduces origin load by 10x or more. Every serious CDN offers this. Turn it on.
Live vs. VOD Have Different Shapes
Live streaming and video-on-demand are often lumped together in vendor marketing. They are not the same workload.
VOD
Video on demand is the simpler problem. You encode once, you store in object storage, you deliver from CDN. Optimize encoding, optimize cache hit ratio, negotiate CDN rates. The architecture is stable and well-understood.
Live
Live is harder in every dimension. Encoding has to happen in real time. Latency matters — the difference between 30 seconds of lag and 3 seconds of lag is a product-defining decision. Low-latency HLS (LL-HLS) and DASH low-latency profiles can get you to sub-5-second glass-to-glass but at the cost of more complex packaging and pickier players.
WebRTC is the path to sub-second latency but it scales differently and costs more per viewer. Reserve it for interactive use cases (auctions, betting, live chat with the creator).
DRM Is Never Optional for Premium Content
If your content is licensed — movies, TV shows, live sports — you need DRM, and the studios will audit you. The three DRM systems to support are Widevine (Android, Chrome, most smart TVs), FairPlay (Apple devices), and PlayReady (Microsoft, Xbox, some smart TVs). There is no way to cover the ecosystem with fewer.
Managed DRM services (AWS MediaPackage with SPEKE, Mux, BuyDRM, EZDRM, Azure Media Services) handle the license acquisition and key rotation so you do not have to operate the key servers yourself. For any serious streaming operation, use one of them.
Storage Tiering for a Video Library
A growing VOD library has a long tail. The 5 percent of titles that get watched this week account for 80 percent of the traffic. The other 95 percent might not be touched for months. Storage tiering is obvious here:
- Hot tier (S3 Standard, Blob Hot) for active titles and the last 90 days of uploads.
- Cool tier (S3 IA, Blob Cool) for the back catalog that still gets occasional views.
- Archive tier (Glacier Instant Retrieval, Archive) for titles you have to keep but almost never serve.
Automated lifecycle policies keep this tidy. The savings on a multi-petabyte library are substantial.
Analytics That Mean Something
Every streaming operation needs analytics, but the defaults in most services will happily bill you for collecting metrics you will never use. The metrics that actually matter are:
- Rebuffering ratio per session. This is the single strongest predictor of viewer abandonment.
- Start-up time to first frame. Anything over 2 seconds hurts engagement.
- Exit-before-video-start rate. If this is high, your player or CDN has a problem.
- Per-title quality of experience broken down by region and device.
Tools like Mux Data, Conviva, and Datazoom exist for this. They are not cheap, but they pay for themselves if streaming is your business. Roll your own analytics only if you have no other option.
Three Takeaways
- Encode before you deliver. A better encoding ladder cuts CDN costs forever. A per-title encode is worth the effort.
- Multi-CDN is not premature optimization for streaming at scale. It is table stakes for keeping delivery costs sane and availability high.
- Measure rebuffering, not bandwidth. The metric that predicts churn is the one you should optimize.
Talk with us about your infrastructure
Schedule a consultation with a solutions architect.
Schedule a Consultation