Vercel KV
Vercel KV is a durable Redis database that enables you to store and retrieve JSON data.Vercel KV is available on Hobby and Pro plans for customers with existing KV storage. For new KV storage, visit the Marketplace integrations.
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: Key-value stores with fast reads and writes work well for rate-limiting traffic to prevent malicious activity, such as DDoS attacks or unintended traffic.
Go to the Marketplace integrations or deploy a template with Vercel KV preconfigured. Learn more about the KV SDK.
qrGPT – AI QR Code Generator
QrGPT is an AI tool for you to generate beautiful QR codes using AI with one click. Powered by Vercel and Replicate.
Vercel KV for Redis Nuxt.js Starter
Simple Nuxt.js template that uses Vercel KV for Redis to track pageviews.
Vercel KV for Redis SvelteKit Starter
Simple SvelteKit template that uses Vercel KV for Redis to track pageviews.
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 run 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
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
createClient
method 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
createClient
method, is required to read and write to a database
You can import/export your Redis database using the upstash-redis-dump
tool. Learn more about importing and exporting data.
To learn more about Vercel KV limitations, see KV Limits.
Was this helpful?