Skip to content

redis-upstash

Use when working with Redis or Upstash — caching, rate limiting, queues, session storage, or pub/sub. Also use when adding a caching layer to an existing application or implementing background job processing with serverless-compatible Redis.

ModelSource
sonnetpack: database
Full Reference

┏━ 🔧 redis-upstash ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Redis or Upstash — cachi… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Upstash is a serverless Redis platform built for edge and serverless environments. HTTP-based — no persistent TCP connections, no connection pools to manage, no cold-start penalties. Pay per request, scale to zero.

Core products: Redis (key-value store), QStash (message queue/scheduler), Vector (vector search).

ItemValue
Consolehttps://console.upstash.com
Docshttps://upstash.com/docs
Redis SDKnpm install @upstash/redis
Rate Limit SDKnpm install @upstash/ratelimit
QStash SDKnpm install @upstash/qstash
Vector SDKnpm install @upstash/vector
Free Tier500K commands/month, 256MB storage
PAYGPer-command pricing, 200GB bandwidth free/month
InitRedis.fromEnv() — reads UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN
I want to…File
Create database, install SDKs, initialize client, REST API, TCPreference/setup.md
Strings, hashes, lists, sorted sets, sets, pipeline, transactionsreference/core-operations.md
Cache-aside, write-through, invalidation, TTL strategies, memoizationreference/caching.md
Sliding window, fixed window, token bucket, Next.js middleware, multi-regionreference/rate-limiting.md
Publish messages, schedule cron, receive + verify, DLQ, local devreference/qstash.md
Session create/read/extend/destroy, Next.js cookies, force-logoutreference/session-storage.md
Publish, subscribe, serverless limitations, alternativesreference/pubsub.md
Upsert, query, hybrid search, delete, similarity functionsreference/vector-search.md
HTTP vs TCP comparison, region co-location, global replication, edgereference/serverless.md
Redis, QStash, Vector plans + hard limitsreference/pricing.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.