Back to articles
Upstash Has a Free API — Serverless Redis and Kafka with HTTP

Upstash Has a Free API — Serverless Redis and Kafka with HTTP

via Dev.to WebdevAlex Spinov

Upstash provides serverless Redis and Kafka accessible via HTTP — perfect for edge functions, serverless, and environments where TCP connections aren't available. Why Upstash? HTTP-based — works in Cloudflare Workers, Vercel Edge, Deno Deploy Pay per request — no idle charges, scale to zero Free tier — 10K commands/day, 256MB storage Global replication — read from the nearest region Quick Start npm install @upstash/redis import { Redis } from ' @upstash/redis ' ; const redis = new Redis ({ url : ' https://YOUR_REDIS.upstash.io ' , token : ' YOUR_TOKEN ' , }); // Basic operations await redis . set ( ' key ' , ' value ' ); const value = await redis . get ( ' key ' ); // JSON await redis . set ( ' user:1 ' , { name : ' Alice ' , age : 30 }); const user = await redis . get < { name : string ; age : number } > ( ' user:1 ' ); // Expire await redis . set ( ' session ' , ' data ' , { ex : 3600 }); // 1 hour Rate Limiting npm install @upstash/ratelimit import { Ratelimit } from ' @upstash/rate

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
3 views

Related Articles