Quick revision
The short answer
I would model egress cost as bytes served times price per GB and apply the 30 percent codec saving only to the views on devices that can decode it, weighted by how concentrated watch time is. That usually argues for encoding popular titles in the new codec and keeping the old one for the long tail and older devices. Own delivery pays only at very large volume, so most platforms combine their own caches for popular content with commercial CDNs, keep multi-CDN steering with quality metrics, and decide on a three to five year total cost of ownership with staged A/B rollouts.
What to remember
In this answer, we built an egress model of bytes served times price per GB and applied the codec saving only to capable devices, which turned a headline 30 percent into a smaller, honest number. Because watch time is concentrated, we encode popular titles in the new codec and keep the old one for the long tail. Own delivery through embedded caches and peering pays only at large volume, so a hybrid with commercial CDNs is the usual answer. We kept multi-CDN steering and quality metrics so savings do not hurt viewing, and we presented the choice as a three to five year total cost with staged A/B adoption.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would model egress cost as bytes served times price per GB and apply the 30 percent codec saving only to the views on devices that can decode it, weighted by how concentrated watch time is. That usually argues for encoding popular titles in the new codec and keeping the old one for the long tail and older devices. Own delivery pays only at very large volume, so most platforms combine their own caches for popular content with commercial CDNs, keep multi-CDN steering with quality metrics, and decide on a three to five year total cost of ownership with staged A/B rollouts.
Background to this question
Leadership questions about cost are really questions about judgement: can we turn a vague promise like 30 percent savings into a number we can defend, and can we avoid a big irreversible bet when a staged one would do? Video platforms are a good setting for this because egress, the bytes sent to viewers, is easily the largest bill, and both the codec choice and the delivery network choice change it. In this answer, we will build a simple cost model, apply the codec saving honestly, decide which titles get the new codec, weigh building our own delivery network, protect viewing quality, and present the decision.
1Start With a Model of the Egress Bill
The CDN bill is bytes served times the price per GB, and bytes served is views times watch time times average bitrate. Suppose we serve 20 PB a month and our blended commercial CDN price is $0.004 per GB. That is 20 million GB x $0.004 = $80,000 a month. Real prices vary widely by region and contract, so we use our own invoices; the point is that every saving can be expressed in the same unit.
A senior leader's first step is to make this model shared and explicit, broken down by device family, region and title popularity, because each of the decisions in this question acts on a different part of it.
2What the New Codec Really Saves
A newer codec such as AV1, compared with H.264, can deliver the same quality at roughly 30 percent fewer bits. But the saving applies only to views on devices that can decode it, ideally in hardware, since software decoding drains phone batteries. If 55 percent of our watch time is on capable devices, the real saving is 0.30 x 0.55, about 16 percent of the bill, not 30.
Encoding has a price too. If the new codec costs about five times the compute per encode, then encoding every title is expensive, and most titles are rarely watched. Watch time on video platforms is highly concentrated: often a small fraction of titles carries most of the hours. That concentration is what makes a selective approach work.
| Title group | Share of titles | Share of watch hours | New codec? |
|---|---|---|---|
| Top titles | 2 percent | 70 percent | yes: savings dwarf encode cost |
| Middle | 18 percent | 22 percent | yes once views pass a threshold |
| Long tail | 80 percent | 8 percent | no: encode cost exceeds savings |
3Encode Selectively
The rule is simple: re-encode a title in the new codec when its expected watch hours, times the bytes saved per hour on capable devices, times the price per GB, exceed the extra encoding cost. For a top title watched a million hours a month, that pays back in days. For a video watched twice, it never does.
In practice we encode new uploads in the established codec, watch early view counts, and queue titles for the new codec once they cross a threshold, with catalogue hits done first. The older codec stays for the long tail and for older TVs and phones, and the manifest offers both so each device picks what it can play. This captures most of the saving for a fraction of the compute.
4Build Our Own Delivery Network or Stay on Commercial CDNs?
Owning delivery means placing our own cache servers inside internet providers' networks, called embedded caches, and connecting to providers directly at exchange points, called peering, so that traffic does not pay for transit or CDN margins. The largest streaming services do this, and at their volume it is much cheaper per GB.
But it is a business of its own. It needs hardware designed and refreshed every few years, agreements with hundreds of providers, capacity planning for the evening peak, logistics for shipping and replacing servers, and an operations team on call. Those costs are mostly fixed, so own delivery pays only at large volume, and only for content that is popular enough to stay in a cache. The common answer is a hybrid: our own caches serve the popular catalogue in the regions where we have most traffic, and commercial CDNs handle overflow, new regions, live events and the long tail.
| Option | Cost per GB | Fixed cost and effort | Fits |
|---|---|---|---|
| Commercial CDNs only | highest | low: contracts and steering | small or growing platforms |
| Hybrid: own caches plus CDNs | lower on cached hits | medium to high | large platforms with concentrated hits |
| Own network only | lowest at scale | very high, global team | a handful of the largest services |
5Protecting Viewing Quality While Cutting Cost
Cost savings are easy to fake by quietly lowering quality. So every decision is paired with quality metrics: video start time, rebuffering ratio, average delivered bitrate and playback failures, measured by the players per provider, per region and per codec.
We keep multi-CDN steering in place whatever we decide, so traffic can move away from a provider, or from our own caches, that performs badly in a region. If the cheaper path raises rebuffering by even a fraction of a percent, viewers watch less, and the lost watch time can cost more than the egress saved.
6Presenting the Decision
I would present options as a total cost of ownership over three to five years, not a monthly price: egress, encoding compute, storage of extra renditions, hardware and staff for own delivery, and migration effort, alongside the quality metrics and the risks of each, such as device support gaps or dependence on one provider.
Then I would propose a staged adoption. Stage one encodes the top titles in the new codec and runs an A/B test on capable devices, measuring bytes per hour and rebuffering. Stage two extends to the middle of the catalogue if the numbers hold. In parallel, a pilot of embedded caches in our two largest markets tests the hybrid model before any wide commitment. Each stage has a decision point with a clear metric, so we can stop or continue on evidence rather than on the vendor's or our own optimism.
- Model egress by device, region, titleshared baseline
- Encode top titles in the new codecA/B on capable devices
- Bytes saved and no quality loss?YesExtend to more titlesNoStop or tune the ladder
- Pilot own caches in two marketsmeasure cost per GB and quality
- Hybrid pays over 3 to 5 years?YesExpand caches region by regionNoStay on CDNs and renegotiate
5 steps in order. Play them, or step through them one at a time.
7Follow-up questions
What if a competitor already serves everything in the new codec?
Their audience and device mix may differ, and the decision still turns on our numbers. If most of our watch time is on older TVs, the real saving is smaller for us. Competitive pressure is a reason to run the pilot quickly, not to skip it.
Can we use the cost model to negotiate with CDN providers?
Yes. A credible plan for own caches or a second provider, backed by per-provider quality data, is the strongest negotiating position. Many platforms recover a meaningful part of the saving through better contract rates before building anything.
How does storage cost change with two codecs?
Each extra rendition set adds storage, but for a selective approach it is only the popular titles, a small share of the catalogue, and storage per month is usually cheap compared with serving those same titles millions of times.
8Conclusion
In this answer, we built an egress model of bytes served times price per GB and applied the codec saving only to capable devices, which turned a headline 30 percent into a smaller, honest number. Because watch time is concentrated, we encode popular titles in the new codec and keep the old one for the long tail. Own delivery through embedded caches and peering pays only at large volume, so a hybrid with commercial CDNs is the usual answer. We kept multi-CDN steering and quality metrics so savings do not hurt viewing, and we presented the choice as a three to five year total cost with staged A/B adoption.
Open with
I would start by modelling egress as bytes served times price per GB, broken down by device, region and title. The 30 percent codec saving only applies to views on devices that can decode the codec, ideally in hardware, so if half our watch time is on capable devices it is closer to 15 percent of the bill.
Then, if they want more
Encoding costs several times more compute, so I would encode selectively: popular titles, where watch hours repay the extra compute quickly, get the new codec, and the long tail and older devices stay on the old one, with both in the manifest.
On delivery, building our own network means embedded caches inside ISPs and direct peering, which cuts transit cost but needs hardware, capacity planning and an operations team, so it only pays at large volume. Most platforms end up hybrid: own caches for popular content in big markets and commercial CDNs for overflow, live and the long tail.
Whatever we choose, I would keep multi-CDN steering and measure start time and rebuffering per provider and codec, so cost savings do not quietly hurt viewing. I would present it as a three to five year total cost of ownership with quality metrics and risks, and adopt in stages with A/B measurements and clear decision points.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "As the senior technical leader, how do you decide on adopting the newer codec, and on...": https://scrivio-interview-library.netlify.app/architecture/system-design-problems/75e4c75024/