Direct origin vs CDN for images
A CDN keeps copies of popular files near users, so most reads never reach the origin. At 1,000 reads/s of 100 KB, the direct origin sends 6 GB in one minute. With a CDN, origin bytes stay under 0.6 GB and the bill falls from 16,590 USD/mo to 2,638 USD/mo.
Direct origin · the origin sends 6.0 GB a minute
CDN in front · the origin sends 0.6 GB a minute
Case 1
1,000 image reads each second return 100 KB each. Origin response bytes must stay below 0.6 GB in the 60 s run.
| Measure | Goal | Users read the origin | A CDN in front of the origin |
|---|---|---|---|
| Origin egress | under 0.6 GB | 6 GB Fail | 0.01 GB Pass |
| p99 latency | under 250 ms | 84 ms Pass | 74 ms Pass |
| Monthly cost | 16,590 USD/mo | 2,638 USD/mo | |
| Error rate | 0% | 0% |
Case 2
The same site at 20 reads/s. Both pass with p99 124 ms. The direct origin costs 333 USD/mo and the CDN design 94 USD/mo.
| Measure | Goal | Users read the origin | A CDN in front of the origin |
|---|---|---|---|
| Origin egress | under 0.6 GB | 0.12 GB Pass | 0.01 GB Pass |
| p99 latency | under 250 ms | 124 ms Pass | 124 ms Pass |
| Monthly cost | 333 USD/mo | 94 USD/mo | |
| Error rate | 0% | 0% |