Home › Reference › Components › CDN
CDN
Edge cache close to users. Cached reads are answered at the edge; misses and writes travel to the origin. By default a write purges the cached copy; with on_write set to ttl_only the edge keeps serving it until the TTL runs out.
Settings
- Edge tier
- Sizes each regional edge cache. A bigger tier holds more distinct items per region before the least recently used ones are evicted, so the hit rate rises for large catalogues.
- TTL (ms)
- How long a cached copy is served before it expires and must be re-fetched from the origin. Longer means more hits and a faster, cheaper origin, but users may see stale data for longer.
- On write
- What happens to the cached copy when a write passes through. Purge drops it at once (other regions after the purge delay). TTL only keeps serving it until it expires, which is faster but staler.
- Capacity (entries)
- Maximum number of items each regional edge holds; the least recently used one is evicted when full. Overrides the tier's size. Lower means more evictions and misses on large datasets.
- Edge latency
- Time to answer a request from the edge cache on a hit. Pick a shape: constant, lognormal, exponential or uniform. Raising it slows every hit but does not affect misses.
- Origin backbone factor
- How much of the extra distance to the origin is paid on a miss, from 0 to 1. Lower models a fast private backbone (misses cost less); 1 means the full public internet round trip.
- Origin overhead
- Extra time the edge adds to every cache miss before the origin sees it. Pick a shape: constant, lognormal, exponential or uniform. Raising it makes misses slower; hits are unaffected.
- Purge delay to other regions
- How long a write's purge takes to reach the other regions' edges. Until then they keep serving the old copy, so longer means more stale reads elsewhere. Shapes: constant, lognormal, exponential, uniform.
- Crashes
- Scheduled outages of the CDN. While it is down, requests through it fail, and its caches are emptied so it restarts cold with every request a miss.