| name | upstash-redis |
| title | Upstash Redis |
| category | Backend & Data |
| description | Use to add serverless Redis (caching, counters, sessions) or rate limiting over HTTP from edge/serverless runtimes. |
| tags | ["redis","cache","serverless","edge","rate-limiting","kv"] |
| official_docs | https://upstash.com/docs/redis |
| sources | ["https://upstash.com/docs/redis/overall/getstarted","https://upstash.com/docs/redis/sdks/ts/getstarted","https://upstash.com/docs/redis/sdks/ratelimit-ts/gettingstarted"] |
| last_verified | 2026-08-10T00:00:00.000Z |
Upstash Redis — Skillship
Serverless, HTTP-based Redis that works from edge/serverless runtimes (Vercel, Cloudflare Workers,
Lambda) where raw TCP is restricted. Pay-per-request, scales to zero.
🧭 When to use this skill
- Use when: you need caching, counters, sessions, queues, or rate limiting in serverless/edge code.
- Use when: your runtime can't open TCP sockets (edge) — Upstash speaks HTTP/REST.
- Don't use for: relational data or transactions across tables (use Postgres).
⚡ Quickstart
1. Install
npm install @upstash/redis
npm install @upstash/ratelimit
2. Configure env (Console → your DB → REST API)
UPSTASH_REDIS_REST_URL=https://<id>.upstash.io
UPSTASH_REDIS_REST_TOKEN=<token>
3. Minimal working example
import { Redis } from "@upstash/redis";
const redis = Redis.fromEnv();
await redis.set("counter", 0);
await redis.incr("counter");
const value = await redis.get<number>("counter");
🧩 Common recipes
Recipe: Cache with TTL
await redis.set("user:42", JSON.stringify(user), { ex: 60 });
const cached = await redis.<>();