---
title: Vercel Global Config
description: A Global Config is a global data store that enables experimentation with feature flags, A/B testing, critical redirects, and more.
url: "https://vercel.com/docs/global-config"
last_updated: 2026-08-17
related:
  - /docs/global-config/using-global-config
  - /docs/global-config/migration-guide
  - /docs/routing-middleware
  - /docs/functions
  - /docs/functions/runtimes
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Vercel Global Config

## Change feature flags and redirects without redeploying

Store feature flags, A/B tests, critical redirects, and blocked IPs in a Global Config. Reads typically complete in less than a millisecond on Vercel, and updates propagate globally without a redeployment.

#### Read a value

```ts filename="api/flag.ts"
import { get } from '@vercel/global-config';

export async function GET() {
  const enabled = await get('betaUiEnabled');
  return Response.json({ enabled });
}
```

#### Read all values

```ts filename="api/config.ts"
import { getAll } from '@vercel/global-config';

export async function GET() {
  const config = await getAll();
  return Response.json(config);
}
```

#### Check a key

```ts filename="api/region.ts"
import { has } from '@vercel/global-config';

export async function GET() {
  const hasRegion = await has('region');
  return Response.json({ hasRegion });
}
```

> Global Config is available on all plans

A Global Config lets you read data in the region closest to the user without querying an external database or hitting upstream servers. It fits [data that you read often and update rarely](#use-cases).

The examples above use the [connection string](/docs/global-config/using-global-config#using-a-connection-string) in your project's `GLOBAL_CONFIG` environment variable to find the Global Config to read.

> **💡 Note:** Global Config was previously called **Edge Config**. The store itself is
> unchanged, and existing projects require no action. See [Migrating from Edge
> Config to Global Config](/docs/global-config/migration-guide) for details.

Global Config is optimized for frequent reads, which typically complete in less than a millisecond on Vercel. Read latency depends on your application's [usage patterns](#read-latency).

You can use a Global Config in [Middleware](/docs/routing-middleware) and [Vercel Functions](/docs/functions).

> **💡 Note:** Vercel's Global Config read optimizations are **only available on the Edge and
> Node.js runtimes**. Optimizations can be enabled for other runtimes, [such as
> Ruby, Go, and Python](/docs/functions/runtimes) upon request. See [our Global
> Config limits docs](/docs/global-config/global-config-limits) to learn more.

## Read latency

Vercel actively replicates Global Config alongside your function's code, so even cold starts can read the latest replicated configuration without a network request. Reading configuration that's already available locally is instant.

Global Config uses active cache invalidation. Vercel injects the configuration version into a request header, so your function can immediately determine whether its local data is current for that request.

When the header identifies a newer version, Global Config serves the local value and fetches the update in the background. If the local version is too far behind, the read becomes blocking.

This gives you the ideal balance of local read speed and global update propagation.

Your application's observed read latency depends on its usage patterns:

- How many functions read the config.
- How reads are distributed over time.
- How reads are distributed geographically.
- How often the config changes.

### Production example: vercel.com/docs

The [Vercel documentation site](/docs) uses Global Config in production. It reads Global Config for every request, globally, with the following observed read latencies:

| Metric | Observed latency |
| --- | --- |
| Fastest reads | 0.01 ms |
| Median (p50) | 0.34 ms |
| p75 | 0.57 ms |
| p99 | 1.50 ms |

P50 is the median: half of reads complete at or below that latency. P75 and p99 are the 75th and 99th percentiles: 75% and 99% of reads in a measurement complete at or below those latencies, respectively. About 0.1% of reads in this workload involved cold starts.

These measurements reflect this application's traffic and configuration update patterns, rather than a latency guarantee for every workload. Measure your own reads with representative traffic, including cold starts and configuration updates, to understand your application's latency.

## Use cases

Global Configs are great for data that is accessed frequently and updated infrequently. Here are some examples of storage data suitable for Global Config:

- **Critical redirects**: When you need to redirect a URL urgently,
  Global Configs offer a fast solution that doesn't require you to redeploy your
  website. With Middleware, you can read from your Global Config to redirect users
  visiting incorrect URLs. For an example, see the [Maintenance Page
  template](https://vercel.com/templates/next.js/maintenance-page).

* **Malicious IP and User Agent blocking**: Store a set of
  malicious IPs in your Global Config, then block them upon detection without
  invoking upstream servers

## Getting started

You can create and manage your Global Config from either [Vercel REST API](/docs/global-config/vercel-api) or [Dashboard](/docs/global-config/global-config-dashboard). You can scope your Global Configs to your Hobby team or [team](/docs/accounts#creating-a-team), and connect them to as many projects as you want.

To get started, see [our quickstart](/docs/global-config/get-started).

## Using Global Config in your workflow

If you'd like to know whether or not Global Config can be integrated into your workflow, it's worth knowing the following:

- You can have one or more Global Configs per Vercel account, depending on your plan as explained in [Limits](/docs/global-config/global-config-limits)
- You can use multiple Global Configs in one Vercel project
- Each Global Config can be accessed by multiple Vercel projects
- Global Configs can be scoped to different environments within projects using environment variables
- **Global Config access is secure by default**. A [read access token](/docs/global-config/using-global-config#creating-a-read-access-token) is required to read from them, and an [API token](/docs/rest-api#creating-an-access-token) is required to write to them

See [our Global Config limits docs to learn more](/docs/global-config/global-config-limits)

## Why use Global Config instead of alternatives?

There are alternative solutions to Global Config for handling A/B testing, feature flags, and IP blocking. The following table lays out how those solutions compare to Global Config:

| **Global Config vs alternatives** | **Read latency**                                                                                                           | **Write latency**                                                                                                           | **Redeployment required**                                                                                                       | **Added risk of downtime**                                                                                                                    |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **Global Config**                 | **Ultra-low** (Reads typically complete in less than a millisecond. Latency depends on function count, read frequency, geographic distribution, and configuration updates.) | **Varies** (Global Config is optimized for frequent, high-speed reads and infrequent, variable writes.) | **No** (Global Config updates propagate globally with no redeployment required.)                            | **No** (Global Config is hosted by Vercel, and has nearly identical uptime characteristics to your deployment)            |
| Remote JSON files               | Varies (Potentially hundreds of milliseconds slower than Global Config.)                               | Varies                                                                                                                      | No (Latency for propagation of changes varies based on host, but no redeployment would be required.)      | Yes (Relying on an external provider means your data has different uptime characteristics from your Vercel deployment.) |
| Embedded JSON files             | Lowest                                                                                                                     | Highest (Changes to this data can't propagate globally without merging and redeploying.)              | Yes (Embedded files are part of your build, so redeployments are required to incorporate changes.)        | No                                                                                                                                            |
| Environment Variables           | Lowest                                                                                                                     | Highest (Changes to this data can't propagate globally without redeploying.)                          | Yes (Environment Variables are part of your build, so redeployments are required to incorporate changes.) | No                                                                                                                                            |

## Limits

To learn about Global Config limits and pricing, see [our Global Config limits docs](/docs/global-config/global-config-limits).

## More resources

- [Quickstart](/docs/global-config/get-started)
- [Read with the SDK](/docs/global-config/global-config-sdk)
- [Use the Dashboard](/docs/global-config/global-config-dashboard)
- [Manage with the API](/docs/global-config/vercel-api)
- [Global Config Limits](/docs/global-config/global-config-limits)

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
