Back to articles
Upstash Has a Free Serverless Redis: Zero-Config Redis and Kafka for Edge and Serverless Functions

Upstash Has a Free Serverless Redis: Zero-Config Redis and Kafka for Edge and Serverless Functions

via Dev.to WebdevAlex Spinov

You need Redis for caching, rate limiting, or session storage. Traditional Redis requires a server, persistent connection, and doesn't work in serverless environments where connections are ephemeral. What if Redis worked over HTTP — no persistent connections, no server management, pay-per-request pricing? That's Upstash. Serverless Redis and Kafka designed for edge computing and serverless functions. Free Tier 10,000 commands/day 256 MB storage Global replication available Usage import { Redis } from " @upstash/redis " ; const redis = new Redis ({ url : process . env . UPSTASH_REDIS_URL , token : process . env . UPSTASH_REDIS_TOKEN , }); // Basic operations await redis . set ( " user:123 " , { name : " Aleksej " , role : " admin " }); const user = await redis . get ( " user:123 " ); // With expiration (caching) await redis . set ( " cache:products " , products , { ex : 3600 }); // 1 hour TTL // Lists, sets, sorted sets — all Redis commands work await redis . lpush ( " queue:tasks " , "

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles