DEV Community

Alex Spinov
Alex Spinov

Posted on

Upstash Has a Free Serverless Redis and Kafka With Per-Request Pricing

Upstash provides serverless Redis and Kafka with per-request pricing. Pay nothing when idle — perfect for serverless and edge.

Free Tier

  • 10K commands/day — Redis
  • 10K messages/day — Kafka
  • 256MB storage — Redis
  • Global replication — optional
  • REST API — works from edge/serverless
  • QStash — serverless message queue

Redis (REST API)

import { Redis } from '@upstash/redis';

const redis = Redis.fromEnv();
await redis.set('user:1', { name: 'Alice' });
const user = await redis.get('user:1');
Enter fullscreen mode Exit fullscreen mode

Works from Cloudflare Workers, Vercel Edge, Deno Deploy.

Rate Limiting

import { Ratelimit } from '@upstash/ratelimit';

const ratelimit = new Ratelimit({
  redis, limiter: Ratelimit.slidingWindow(10, '10s'),
});
const { success } = await ratelimit.limit('user:123');
Enter fullscreen mode Exit fullscreen mode

Upstash vs Redis Cloud

Feature Upstash Redis Cloud
Pricing Per-request Per-instance
Edge REST API TCP only
Free tier 10K/day 30MB

Need serverless cache? GitHub or spinov001@gmail.com

Top comments (0)