7. Edge Network & CDN
7.1 How the edge network works
Vercel's CDN has PoPs (Points of Presence) around the world. When a user makes a request:
- Request hits the nearest PoP
- PoP checks its cache
- Cache hit: Returns response in milliseconds (sub-10ms)
- Cache miss: Routes to the nearest Vercel Function region, executes, returns and caches response
7.2 Cache hierarchy
User → Edge PoP Cache → Regional Function Cache → Origin Function
(ms) (10-50ms) (100ms+)
7.3 Cache-Control headers
Vercel respects standard Cache-Control headers and maps them to CDN cache behaviour:
// Cache for 1 hour, allow stale for 1 day while revalidating
export async function GET() {
return Response.json(data, {
headers: {
'Cache-Control': 's-maxage=3600, stale-while-revalidate=86400'
}
});
}
7.4 Skew protection
When a new deployment rolls out, some users may still have old JavaScript from the previous deployment while the server is already running new code — causing version skew errors.
Vercel's Skew Protection (Enterprise + Pro) routes requests to the deployment version that served the original HTML to that user, ensuring consistency. This is a strong enterprise selling point.