>initializing system...
Back to Notes

Zero-Downtime Next.js Deployments with Vercel

Next.jsCI/CD

The most common deployment issue with Next.js App Router on Vercel is stale cached data appearing on high-traffic pages after a push to production. Vercel's edge cache aggressively caches static and ISR pages, so simply deploying new code doesn't guarantee users see fresh content. The solution is a post-build revalidation webhook. After each successful deployment, a custom webhook triggers Next.js's revalidatePath() function targeting the specific routes that changed — not a blanket cache purge. This is critical because a full purge causes a thundering herd of origin requests on a busy site. For a client project handling 20,000+ monthly visits, implementing selective revalidation reduced post-deploy stale content incidents from roughly 3 per week to zero, while keeping TTFB under 200ms. The webhook checks a manifest of changed files and only revalidates affected route segments. Source: production deployment pipeline for enterprise client, 2026.