Effect CDN Origin Shield
One origin fetch per object no matter how many edges miss at once. A CDN with 12 POPs that all miss on the same fresh object sends 12 simultaneous origin fetches; multiply by every object that just expired and the origin serves the whole internet again in spikes. A shield tier collapses the fan-in: edges fill from one shield cache, and concurrent misses for the same key coalesce onto a single in-flight fetch via a per-key Deferred claimed in one Ref.modify. The winner resolves the Deferred inside Effect.ensuring so even a failed fetch releases the waiters. The demo: 6 simultaneous edge misses become 1 origin fetch. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add https://ui.aryank.space/r/effect-cdn-origin-shield.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.
Six edge POPs all miss on the same fresh object and send six simultaneous fetches to the origin. Multiply by every object that just expired and the origin serves the internet again.