Infrastructure: global CDN
This course looks at what a content delivery network moves and which responses it may serve. Its central question is whether a response was produced for everyone or for one person. It covers how Propshaft digests make long asset caching safe. It shows how config.asset_host can break every page through the Content Security Policy. It also covers what must stay on the origin, caching HTML at the edge, the limits of Vary: Cookie and the safe order for configuration changes.
What you'll learn
- ✓Deciding which responses a shared edge cache may store
- ✓How digest-named assets avoid cache invalidation
- ✓How config.asset_host interacts with the Content Security Policy
- ✓What must stay on the origin, including files authorized per request
- ✓When HTML can be cached at the edge, and the limits of Vary: Cookie
- ✓Ordering configuration changes and verifying them in a browser
What a CDN actually moves
Three senior courses in this series have pointed here. "Database: multi-region strategy" measured the distance, "Kamal proxy: Thruster" measured the thread cost, and "System Design: load balancing layer 7" named the edge as the place to route to. This course follows through.
Read the full lesson free →Curriculum
7 lessonsWhat a CDN actually moves
Explains what a CDN moves, why HTML comes from the origin, and where this application already uses edges.
Why digests make this safe
Shows how Propshaft digest names avoid cache invalidation and make a one-year public cache lifetime safe.
The one line that breaks everything
Explains why setting config.asset_host breaks every page when script_src and style_src do not list the new host.
What must stay on the origin
Sorts responses into edge-safe and origin-only, covering personalized pages, per-request authorized files and Set-Cookie responses.
Caching HTML at the edge
Examines when HTML can be edge-cached, why Vary: Cookie fails, and how splitting anonymous and signed-in traffic helps.
The recommendation, with numbers
Gives the case for an asset CDN, the safe order for policy and host changes, and browser checks.
Putting it together
Sums up the course, frames a cache as a promise, and sets a challenge checking CSP directives.