Vercel's Edge Network enables you to store content and run compute in regions close to your customers or your data, reducing latency and improving end-user performance.
Our Edge Network is both a Content Delivery Network (CDN) and a globally distributed platform for running compute at the edge.
If you're deploying an app on Vercel, you're already using our Edge Network. These docs will teach how to optimize your apps and deployment configuration to get the best performance for your use-case.
Redirects and rewrites are both used to modify incoming requests on Vercel. Redirects tell the client to make a new request to a different URL, useful for enforcing HTTPS, redirecting users, and directing traffic.
Rewrites internally change the URL the server uses to fetch the requested resource, allowing for dynamic content and improved routing. Both tools are processed at the Edge Network, providing faster response times and improved performance.
Vercel's Edge Network stores content and runs compute in many regions around the world for optimal performance.
Vercel's Edge Network caches your content at the edge in order to serve data to your users as fast as possible.
Vercel's Edge Network supports streaming responses to enable you to return data from remote sources incrementally rather than all at once. Streaming is always supported in Edge Functions.
Vercel supports streaming in Serverless Functions when using:
- Next.js
- React Server Components
- Remix Streaming SSR
- SvelteKit
- Solid Start
However, not all frameworks support streaming. You should read your preferred framework's docs on streaming to implement best practices. For example, with Next.js, you must use Route Handlers for streaming support.
For more information, see our blog post on streaming for Serverless Node.js and Edge Runtimes with Vercel Functions.
Aside from routing your requests to the correct destination, the Edge Network also takes care of a few other important aspects of a working Deployment:
All of these actions are performed automatically with careful attention to performance (ensured by our choices of technology). In turn, we highly recommend not implementing SSL termination or compression in your own code, as it would be unnecessary.
The Edge Network supports the following protocols (negotiated with ALPN):
To test Edge Functions, Edge Middleware, and Serverless Functions on Vercel's Edge Network in local dev, use next dev
with Next.js, or the vercel dev
command from Vercel CLI for other frameworks
vercel dev
is not necessary with Next.js applications — Vercel's Edge Network logic is already built-in with the next dev
command.We recommend transitioning from other CDNs to Vercel's CDN to get the full benefits of the Edge Network. You can transition from CDNs like Akamai, Fastly, or Cloudflare by configuring your DNS records to our DNS infrastructure
Using another CDN with Vercel is not recommended for several reasons:
- Vercel's CDN is specifically designed to deploy new releases of your site without downtime by purging the cache globally and replacing the current deployment
- If you use an additional CDN, it can cause issues because Vercel has no control over the other provider, leading to the serving of stale content or returning 404 errors
- To avoid these problems while still using another CDN, we recommend you either configure a short cache time or disabling the cache entirely. Check the documentation for your preferred CDN to learn how to do either option
You can disable Vercel's Edge Network to use Cloudflare instead by setting Origin Cache-Control: Off
in Cloudflare, and setting the s-maxage
directive to 0
with the headers
property in a vercel.json
.
Was this helpful?