Skip to content

Upstash Redis

Medium — good to knowCloud & Infra

ELI5 — The Vibe Check

Upstash is Redis that's serverless and speaks HTTP. Regular Redis needs a persistent TCP connection — awkward for serverless functions that spin up and die. Upstash solves this with a REST API. Pay per request, scale to zero, and use it from Lambda, Workers, or edge functions without connection headaches.

Real Talk

Upstash provides serverless Redis with a REST API and per-request pricing. It supports global replication, durable storage, and works in serverless environments where persistent TCP connections aren't possible. It's compatible with standard Redis commands and offers additional features like rate limiting and workflow primitives.

Show Me The Code

import { Redis } from '@upstash/redis'

const redis = new Redis({
  url: process.env.UPSTASH_REDIS_URL,
  token: process.env.UPSTASH_REDIS_TOKEN,
})

await redis.set('user:1', { name: 'John', visits: 42 })
const user = await redis.get('user:1')

When You'll Hear This

"Upstash Redis works with Workers because it uses HTTP instead of TCP." / "We use Upstash for rate limiting in our edge functions."

Made with passive-aggressive love by manoga.digital. Powered by Claude.