Vercel

Preventing the stampede: Request collapsing in the Vercel CDN

Sep 25, 2025
Preventing the stampede: Request collapsing in the Vercel CDN
SummaryAI, from the source post

Introduced request collapsing to the Vercel CDN to prevent cache stampedes for Incremental Static Regeneration (ISR) routes. This mechanism ensures that when multiple requests for the same uncached ISR path arrive concurrently, only one request per region invokes a function to regenerate the page. The other requests wait and receive the cached response once it's available. This is achieved using a two-level distributed locking system (node and regional) and the double-checked locking pattern. Vercel automatically infers cacheability and applies request collapsing based on framework-defined infrastructure metadata, requiring no manual configuration.

More from the Real-time Data Serving at Scale trail