Menu

Upstash for Beginners: Serverless Redis and Kafka Without Managing a Server
📰

Upstash for Beginners: Serverless Redis and Kafka Without Managing a Server

DEV Community: redis·Arhan Khan·10 days ago
#xKwaX1md
#devtoredis#devto#dev#redis#upstash
Long article (396 words) — no AI summary yet.
Reading 0:00
15s threshold

Upstash is a serverless data platform. It gives you Redis and Kafka as a service, with a pricing model that charges per request instead of per server. If you have ever wanted Redis in a small project but did not want to run and maintain a Redis server, Upstash is built for exactly that situation.

How does it work? You create a database in the Upstash console, and you get an HTTP endpoint and a token. Instead of keeping a persistent TCP connection open, you send your commands over HTTP, which fits perfectly with serverless functions that spin up and shut down constantly.

# Create a key with the REST API curl -X POST https://your-db.upstash.io/set/visits/1 \ -H "Authorization: Bearer YOUR_TOKEN"

# Read it back curl https://your-db.upstash.io/get/visits \ -H "Authorization: Bearer YOUR_TOKEN"

Enter fullscreen mode

Exit fullscreen mode

// Or use the official client in your app import { Redis } from '@upstash/redis' ;

const redis = new Redis ( { url : process . env .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.