The Vercel Edge Network sits in-between the internet and your Vercel deployments. This type of network topology is sometimes called a Content Delivery Network or CDN.
The Vercel Edge Network has many responsibilities, but most importantly, it is responsible for routing requests to the correct Serverless Function or Static File output of your Builds. The Vercel Edge Network is a CDN with the ability to execute functions at the edge.
In order to route requests as fast as possible, the Edge Network is running in dozens of locations across the world. In all of these locations (called Regions), you can create Deployments that create Builds outputting Serverless Functions and/or Static Files. The full list of regions can be found here.
In turn, the Edge Network will automatically forward incoming requests to the closest location in which your Serverless Function is running (Static Files are always distributed across the whole network, thus not location-specific).
In the event that the Serverless Function of your deployment is not created in the requested region, the request is forwarded to the closest region that contains your deployed Serverless Function.
The Vercel Edge Network has multiple layers of caches to ensure that your Vercel deployments are fast around the world. At a high level, the layers of the cache are as follows:
- L1 - a small per-process cache
- L2 - shared cache for processes on a single node
- L3 - a regional cache that is shared with all nodes in a region
- Origin - A Serverless Function invoked or Static File fetched on cache miss
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:
- Terminating SSL
- Compressing your responses
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:
Please note that although the Edge Network supports the WSS protocol, Serverless Functions do not. This means you can proxy WSS traffic to a different provider but Serverless Functions cannot serve WSS.