All writeups
3 min read CachePages Functions

The Slowpoke

Every reader triggers a fresh render, so the slow path gets paid over and over.

The crack

A popular page that renders on every request makes every visitor wait for the same work, and makes the origin carry load it never needed to. Under a traffic spike, that repeated render is exactly when the origin falls over.

Why it persists

Caching sounds simple until you have to choose keys and TTLs and decide what is safe to store. Done carelessly it serves stale or personalized content to the wrong person, so teams avoid it and keep eating the render cost.

The fix on Cloudflare

A cache-aside pattern at the edge stores the rendered response after the first miss. The first reader pays the cost once, and everyone after is served from the edge in single-digit milliseconds. Cloudflare’s cache sits close to the user, so the win compounds globally.

Doing it right means clean cache keys, deliberate TTLs, and never caching authenticated responses without varying the key.

How I built the demo

The demo renders once on a miss, stores the payload with a timestamp and the colo that served it, then serves every later hit from cache. The timestamp staying identical across hits is the proof that you are getting the one stored copy, not a fresh render.

Live demo

See it work, including the failure path.

Open the demo →