Upstash API
Upstash API
Upstash is serverless Redis / Kafka / Vector database — pay-per-request (no idle charge), HTTP API, edge-friendly; top choice for serverless apps.
HTTP API (callable from edge functions, no Redis TCP needed)
HTTP overhead slightly slower than TCP Redis
Create Redis DB at upstash.com for endpoint + token. @upstash/redis: const redis = new Redis({url, token}); await redis.set("key", "value");
Uptime · 30-day window
About this API
Upstash is a serverless data infrastructure company founded 2020, positioned as "Redis for serverless era". Background: Redis is standard for cache / queue / rate limit, but traditional Redis is TCP persistent connection + monthly server billing, not suited for serverless apps (Lambda / Workers stateless, short lifecycle). Upstash solves two problems: (1) HTTP API — call Redis via REST, edge function / serverless function can use (no TCP maintenance); (2) Per-request billing — by actual commands count not fixed monthly, no charge when idle. This design lets serverless apps "cheaply use Redis" for the first time. Product expanded to Kafka (message queue) and Vector (vector database). Customers: Vercel / Cloudflare Workers / Netlify apps, AI apps (vector), APIs needing rate limit. Free tier 10000 commands/day + 256MB more than enough for small projects.
What you can build
- 1Serverless function companion cache (Lambda / Cloudflare Workers / Vercel)
- 2Session storage / rate limiting
- 3Message queue (Upstash Kafka)
- 4Vector search (Upstash Vector)
Strengths & limitations
Strengths
- HTTP API (callable from edge functions, no Redis TCP needed)
- Per-request pricing ($0 when idle)
- Free 10000 commands/day
- Global replication
Limitations
- HTTP overhead slightly slower than TCP Redis
- Not for ultra-high-frequency writes (per-request billing gets expensive)
Example request
curl https://upstash.com/<endpoint> \
-H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.Getting started
Create Redis DB at upstash.com for endpoint + token. @upstash/redis: const redis = new Redis({url, token}); await redis.set("key", "value");
FAQ
Upstash vs. Redis Cloud?+
Serverless apps + per-request billing: Upstash. Steady high throughput + want lowest TCP latency: Redis Cloud.
Technical details
- Auth type
- api_key
- Pricing
- freemium
- Rate limit
- 默认 100 req/秒
- Protocols
- REST, Redis
- SDKs
- javascript, typescript, python, go