Edge offload

An edge cache serves repeated reads near the client, so the origin sends an object once. 1,000 reads/s of 100 KB send 6 GB from a direct origin in 1 minute. With a CDN the origin sends only the misses, at least 90 percent less.

Play a level

See it on the board

The same traffic runs on two boards. The simulator measured both when this page was built.

Board to show
HTTP/2UsersObject stor…4 vCPU · 4 GB
HTTP/2UsersObject stor…4 vCPU · 4 GB
Every read goes to the origin: misses a goal
HTTP/2HTTP/2UsersObject stor…4 vCPU · 4 GBCDN4 vCPU · 2 GB
HTTP/2HTTP/2UsersObject stor…4 vCPU · 4 GBCDN4 vCPU · 2 GB
CDN serves repeated reads: meets the goals
See it on the board
Measure Goal Every read goes to the origin CDN serves repeated reads
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%
Level rules none broken Budget Fail Pass

Key numbers

Prices from the price table and part values from the catalog. The mini board has 1,000 image reads/s of 100 KB.
NumberValue
Origin egress price0.06 USD/GB
CDN egress price0.01 USD/GB
Edge cache read, median0.1 ms
Origin bytes behind an edge cacheTap or press Space to put a CDN in front

CDN in front · the origin sends 0.6 GB a minute

How it works

Large objects such as images and video use most of the bytes that a service sends. If every read goes to the origin, the origin sends every byte. Its link, its disk and its egress bill all follow the number of reads.

A CDN keeps copies of popular objects in many locations near the clients. A read that hits the CDN never reaches the origin. The origin sends an object when the CDN misses, and then the CDN serves it many times until its time to live ends.

In the mini board 1,000 reads/s of 100 KB send 6 GB in one minute from a direct origin. With a CDN and a 600 s time to live, the origin sends under 0.6 GB. The CDN also serves the reads from nearby, so p99 stays low.

The price is a second bill and a copy that can be old. CDN delivery has its own price per GB, lower than origin egress here. A long time to live saves more bytes but keeps old objects longer, so use versioned names for files that change.

In the levels you put a cache in front of the origin and measure the origin bytes.