Skip to main content
Upstash Redis is an HTTP/REST based Redis client for TypeScript, built on top of the Upstash REST API. It’s the only connectionless (HTTP-based) Redis client, designed specifically for modern serverless and edge computing platforms.

Why Upstash Redis?

Traditional Redis clients use TCP connections, which don’t work well in serverless environments. Upstash Redis solves this by using HTTP/REST, making it perfect for:
  • Serverless functions - AWS Lambda, Google Cloud Functions, Azure Functions
  • Edge runtimes - Cloudflare Workers, Fastly Compute@Edge, Vercel Edge Functions
  • Modern frameworks - Next.js, Remix, SvelteKit, and more
  • Client-side applications - Web and mobile apps
  • WebAssembly - Any environment where HTTP is preferred over TCP

Quick start

Get a working Redis client in under 5 minutes

API reference

Complete Redis command reference

Examples

Platform-specific examples and code samples

Platform guides

Setup guides for Cloudflare, Vercel, AWS, and more

Key features

Connectionless architecture

No need to manage connection pools or worry about connection limits. Every command is a simple HTTP request.

Full Redis compatibility

Supports all major Redis data structures and commands:
  • Strings - get, set, incr, decr
  • Hashes - hget, hset, hgetall
  • Lists - lpush, rpush, lrange
  • Sets - sadd, smembers, sinter
  • Sorted sets - zadd, zrange, zrank
  • JSON - Native JSON support with json.get, json.set
  • Streams - xadd, xread, xrange

TypeScript-first

Fully typed with generic support for your data structures:
interface User {
  name: string;
  email: string;
}

const user = await redis.hgetall<User>('user:123');
// user is typed as User | null

Auto-pipelining

Automatically batches commands for optimal performance:
const redis = new Redis({
  url: process.env.UPSTASH_REDIS_REST_URL,
  token: process.env.UPSTASH_REDIS_REST_TOKEN,
  enableAutoPipelining: true,
});

// These commands are automatically batched
const [user, posts, count] = await Promise.all([
  redis.get('user:123'),
  redis.lrange('posts:123', 0, 10),
  redis.incr('views:123'),
]);

Read-your-writes consistency

Ensure strong consistency across globally distributed databases:
const redis = new Redis({
  url: process.env.UPSTASH_REDIS_REST_URL,
  token: process.env.UPSTASH_REDIS_REST_TOKEN,
  readYourWrites: true,
});

Platform support

Node.js

Full support for Node.js 14+

Cloudflare Workers

Optimized for Cloudflare Workers

Vercel

First-class Vercel integration

Deno

Native Deno support via ESM

Fastly

Compute@Edge compatible

Bun

Works seamlessly with Bun

Production ready

This project is in General Availability (GA) stage. It receives regular updates and bug fixes, with full support from the Upstash team.
The SDK is battle-tested and used in production by thousands of developers. It includes:
  • Automatic retries with exponential backoff
  • Comprehensive error handling
  • Built-in telemetry (can be disabled)
  • Environment variable support
  • Custom middleware support

Next steps

Quick start

Create your first Redis client

Installation

Install for your platform

Build docs developers (and LLMs) love