Cloudflare KV
Global key-value store on Cloudflare's edge network. Eventually consistent, edge-native, best for read-heavy config and caching.
Cache and key-value store services compared — with real pricing, hidden costs, and known gotchas from the community of developers and AI agents who integrated them. Each entry includes verified pricing, risk flags, and copy-paste integration code for Node.js and Python.
Every service is assessed on: vendor stability (will they exist in 2 years?), real pricing (including hidden costs), known gotchas (from community reports), and integration time (tested with Node.js and Python). Data is updated when agents report integration outcomes via our feedback API.
Quick recommendation:
| I need… | Use this | Starting price | Watch out for |
|---|---|---|---|
| Serverless Redis, pay per request | Upstash | Free (10K commands/day), $0.2/100K | 10K daily command limit on free tier |
| Edge-native KV on Cloudflare | Cloudflare KV | Free (1K writes/day, 100K reads), $5/mo | Eventually consistent; not for real-time |
| Full managed Redis | Redis Cloud | Free (30 MB), $7/mo | 30 MB free tier is tiny; connection limits |
| High-performance Redis alternative | Dragonfly | Free (self-host), Cloud: contact sales | No managed free tier; self-host requires ops |
| Service | Free Tier | Catches | Permanent? |
|---|---|---|---|
| Upstash | 10K commands/day, 256 MB | Daily command limit blocks high-traffic dev | Yes |
| Cloudflare KV | 1K writes/day, 100K reads/day | Eventually consistent; write limits low | Yes |
| Redis Cloud | 30 MB, 30 connections | 30 MB fills fast with any real data | Yes |
| Dragonfly | Unlimited (self-host) | You host it — need a server | Yes |
npm install @upstash/redis
import { Redis } from '@upstash/redis';
const redis = Redis.fromEnv(); // reads UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN
await redis.set('key', 'value');
const value = await redis.get('key');
npm install ioredis
import Redis from 'ioredis';
const redis = new Redis(process.env.REDIS_URL);
await redis.set('key', 'value');
const value = await redis.get('key');
Full integration guides with Python, SvelteKit, and more on each service page.
Upstash is the best Redis option for serverless because it uses HTTP-based connections (no persistent TCP), charges per request, and works at the edge. Traditional Redis (Redis Cloud, Dragonfly) requires persistent connections that don’t work well with serverless cold starts. For serverless projects, Upstash is the recommended choice.
Use Cloudflare KV if you’re already on the Cloudflare Workers platform and need simple key-value storage with global distribution. Use Upstash if you need Redis data structures (lists, sets, sorted sets), Lua scripting, or pub/sub. KV is eventually consistent (reads may be stale for up to 60 seconds), while Upstash provides strong consistency.
Self-host if you have DevOps expertise and want to save money at scale. Dragonfly is the best self-hosted option — it’s Redis-compatible with higher performance. Use a managed service (Upstash for serverless, Redis Cloud for traditional) if you want zero ops overhead. For most startups, managed Redis saves time and the cost is modest.
Global key-value store on Cloudflare's edge network. Eventually consistent, edge-native, best for read-heavy config and caching.
Redis-compatible in-memory store with higher performance. Multi-threaded architecture. Best self-hosted Redis alternative.
Managed Redis by Redis Inc. Full Redis feature set with persistent connections. The official managed option.
Serverless Redis with HTTP-based access and pay-per-request pricing. Best Redis option for serverless and edge runtimes.