Skip to content
Table of Contents
Choose a framework to optimize documentation to:

Serverless Functions enable you to run code on-demand and at scale without setting up your own compute infrastructure. When people visit one of your API routes that uses a Serverless Function, the Function is invoked in a region on Vercel's Edge Network. If your Function depends on a database, and is invoked in a region far from that database, the response time will be slow.

In order to run your Serverless Functions as fast as possible, Vercel can deploy your code to dozens of locations (called regions) across the world.

Selecting a region for your Functions allows you to choose where your Serverless Functions are deployed. Deploying your Serverless Functions to a region close to your data sources (such as your database can greatly improve performance. Reading data from your data sources will have less latency when your Serverless Functions and data sources are physically close.

You can set a default Serverless Function region in your project's Dashboard settings on Vercel. Learn how in the section below.

For optimal performance, choose a data source which:

The default Function region is Washington, D.C., USA (iad1) for all new projects. Many of the most popular database and infrastructure providers deploy to this region by default, so this ensures your Functions will deliver fast responses out of the box in most cases.

Projects created before January 14, 2021 default to San Francisco, USA (sfo1). We recommend updating these projects to the new default of Washington, D.C., USA (iad1).

This default region will apply project-wide to Serverless Functions, and can be configured in your project's Dashboard settings on Vercel. Follow the instructions below to do so:

  • Choose the appropriate project from your Dashboard on Vercel
  • Navigate to the Settings tab near the top of the Dashboard page
  • A set of options will appear on the left side. Select Functions
  • Use the Function Region dropdown setting to select which Edge Region you want to use as your project's default

The Function Region setting in a Vercel project's dashboard

We highly recommend selecting the region closest to the data infrastructure your Functions depend on.

If you want to override your default region, you can do so in two ways:

Multiple Serverless Function regions are only allowed for Enterprise accounts. If your Project requires more than one Serverless Function region, please contact Sales.

We offer several data storage options, which you can colocate with your Serverless Function region, including Vercel Postgres, Edge Config, Vercel KV, and Vercel Blob. See our storage docs to learn which option is best for you.

Last updated on February 6, 2023