HomeInfrastructure & Architecture › CDN integration

CDN integration

Purpose: Put a CDN in front of the dispatcher correctly: TTLs, invalidation strategy, and header hygiene.

Who this page is for

AudienceWhy it matters to you
Platform engineersConfig owners
All engineersUnderstanding the full cache chain

The cache chain

Browser cache ── CDN edge ── Dispatcher docroot ── Publish render
   (short)        (TTL)         (event-invalidated)     (truth)

Two different consistency models meet here: the dispatcher invalidates on publish events; the CDN typically expires by TTL. Design both deliberately or authors will ask why content "half-updated".

Standard strategy

ContentDispatcherCDN TTLBrowser
HTML pagesEvent-invalidatedShort (1–5 min)no-store/short
Versioned clientlibsCachedLong (months) — hash-bustedLong
DAM assetsEvent-invalidatedMedium (hours)Medium
.model.json consumed by appsEvent-invalidatedShortShort

Short HTML TTL at the CDN gives you edge offload while capping staleness after publish. Teams needing instant consistency add CDN purge on publish (a replication-triggered purge call) — an integration you own, with all its failure modes; only build it when short TTLs genuinely aren't enough.

Header hygiene

Debugging order

Response headers tell you who served it (CDN cache status headers, Age). Reproduce against: CDN URL → dispatcher directly → publish directly. The first layer where the response is correct tells you which cache is stale.

Quick navigation