Vercel KVVercel KV is a durable Redis database that enables you to store and retrieve JSON data.
Vercel KV is available in Beta on Pro and Hobby plans
Vercel KV provides durable, serverless Redis storage. KV has been designed to be fast, scalable, and secure, and it's a great choice for storing and retrieving key-value and JSON data in your apps.
KV stores are single region by default, but can be replicated to multiple regions for distributed workloads. Learn how Vercel KV works.
The following are just a few use cases for Vercel KV:
Ecommerce carts: Vercel KV can persist user session data across multiple page requests, enabling you to keep track of items in a shopping cart
Rate limiting: Kev-value stores with fast reads and writes work well for rate-limiting traffic to prevent malicious activity, such as DDoS attacks or unintended traffic
Read the Vercel KV quickstart or deploy a template with Vercel KV preconfigured. Learn more about the KV SDK.
By default, a single Redis database is provisioned in the primary region you specify when you create a KV database. This primary region is where write operations will be routed.
A KV database may have additional read regions, and read operations will be ran in the nearest region to the request that triggers them. This will result in lower latency reads for users close to your replicas.
Vercel KV is powered by a partnership with Upstash. This means:
- Creating, deleting, and managing KV happens in the Vercel dashboard
- You do not need to create an Upstash account to use Vercel KV
- Vercel KV should not be considered SOC 2 Type 2 compliant during public beta (coming soon)
Here are some important points to note about how you can use Vercel KV with your workflow on Vercel:
- You can use Vercel KV with any Redis client you prefer
- You can have multiple Vercel KV database per account, depending on your plan, as explained in our KV Limits docs
- You can use multiple Vercel KV database in one project
- You can connect multiple projects to a single Vercel KV database
- You can send Redis commands to your KV database without connecting it to your project. All you need are the API URL and appropriate token, which you can find on the dashboard. You can add them with the
createClientmethod if you're using the SDK
- Vercel KV database can be scoped to different environments within projects using Environment Variables
- Vercel KV should be used in server environments, like Vercel Functions, versus from the browser. An API token, either set as an Environment Variable or added with the
createClientmethod, is required to read and write to a database
Vercel KV has limitations related to SOC 2 Type 2 compliance, complete Redis protocol compatibility, and more. See KV Limits to learn more.