Redis vs Memcached vs Valkey: In-Memory Caching Pricing, Persistence, and the Monthly Cost Math
A cache is the cheapest performance your application will ever buy, and the easiest bill to get wrong. The engines look interchangeable — all three answer `GET` and `SET` in under a millisecond — but the same 10 GB costs anywhere from about $5 to more than $1,300 a month depending on vendor, billing model, and whether a restart may empty it.
This guide prices all three engines from the vendors' own published pages and runs the same three workload profiles through every pricing model. Every figure traces to a vendor page or the vendor's own worked example.
> [!KEY TAKEAWAY]
> For a 10 GB cache at 50,000 requests per second, AWS's own worked example puts ElastiCache Serverless for Valkey at $1.254 per hour ($915.42 per month) and the same profile on Serverless for Memcached at $1.862 per hour ($1,359.26 per month) — a $443.84 monthly difference.
Who this is for
This guide is for a founder or engineering lead choosing the cache for a production application, API, or session store. It is not for teams choosing a primary database: a cache that loses its contents on restart is a performance layer, not a system of record. If your data must survive a node failure with zero loss, price durability first — MemoryDB below.
The five options
Redis is the incumbent: a single-threaded, in-memory data structure server — strings, hashes, lists, sets, sorted sets, streams — sold as a managed service (Redis Cloud), as software, and as open source. Persistence, replication, clustering, and eviction are first-class, and you pay for that breadth.
Memcached is the minimalist: key-value pairs in RAM, distributed across nodes by hashing. The project calls itself "short-term memory for your applications" — a volatile cache, not a database.
Valkey is the fork. After Redis changed its license in 2024, the community forked the last BSD-licensed Redis 7.2 codebase. Valkey is BSD-licensed, open source forever, now at version 9.1.3 (released October 26, 2026). It speaks the Redis protocol, and on ElastiCache it is priced 20% below Memcached on nodes and 33% below on serverless.
DragonflyDB is the fourth name here: the priced Valkey-like alternative. Dragonfly Cloud is fully managed and Redis-compatible at $8.00 per GB per month on demand, with a Flex tier from $36 per month and an Enterprise tier from $2,000 per month. It is Valkey-adjacent, not a drop-in replacement.
Upstash is the serverless Redis-compatible option for small and spiky workloads. It charges per command rather than per node: quiet databases are nearly free, and loud ones are ruinous.
What the vendors actually charge
| Vendor and model | Headline rate (2026-11-06) | Minimums and ceilings |
| :--- | :--- | :--- |
| Redis Cloud Free | $0 per hour, 30 MB | Single database, best-effort SLA |
| Redis Cloud Essentials | From $0.007 per hour (about $5 per month) | 250 MB to 100 GB, shared |
| Redis Cloud Pro | From $0.014 per hour, minimum $200 per month | Unlimited RAM, dedicated |
| Redis Cloud Flex | Hot data in RAM, cold data on SSD, at 10% of RAM | Shared and dedicated |
| ElastiCache Serverless for Valkey | $0.084 per GB-hour, $0.0023 per million ECPUs | Minimum 100 MB billed, starts at $6 per month |
| ElastiCache Serverless for Memcached | $0.125 per GB-hour, $0.0034 per million ECPUs | Minimum 1 GB billed |
| ElastiCache nodes, Valkey | `cache.r7g.xlarge` $0.3496 per hour | 26.32 GB per node, 25% reserved |
| ElastiCache nodes, Memcached | `cache.r7g.xlarge` $0.437 per hour | Same node sizes |
| MemoryDB for Valkey | `db.r6g.xlarge` $0.432 per hour | Durable, 1 primary plus 1 replica |
| Upstash Pay as You Go | $0.20 per 100K commands | 100 GB maximum data |
| Upstash Fixed | $10 to $1,500 per month by size | 250 MB to 500 GB, 10,000 cmd/s cap |
| Dragonfly Cloud | $8.00 per GB per month on demand | Flex from $36/mo, Enterprise from $2,000/mo |
Three facts do most of the decision work. Redis Cloud Pro's advertised rate is nearly irrelevant: $0.014 per hour is $10.22 a month, but the $200 minimum binds, so Pro costs at least $200 a month however small the database. Valkey's ElastiCache discount is exact — 20.0% lower on nodes ($0.3496 vs $0.437) and 32.8% lower on serverless storage ($0.084 vs $0.125, which AWS rounds to 33%). Upstash's bill scales with traffic, not data size.
!Redis Cloud pricing tiers: Free, Essentials, and Pro rates
> [!FOUNDER]
> "Every caching bill I have ever reviewed was decided by the billing model, not the engine. Pick the model that matches how your traffic behaves — flat, spiky, or relentless — and the engine choice mostly takes care of itself."
> — Enow A. Jovial, Founder & Chief Executive Officer
Profile A: 1 GB, 10 million commands a month
The smallest profile: a 1 GB cache serving 10 million commands a month.
$
\text{Upstash PAYG} = \frac{10{,}000{,}000}{100{,}000} \times \$0.20 + (1 - 1) \times \$0.25 = 100 \times \$0.20 + \$0 = \$20.00/\text{month}
$
The storage term is zero: Upstash's first 1 GB is free, and bandwidth is free up to 200 GB a month.
!Upstash pricing tiers: Free, Pay as You Go, and Fixed plans
$
\text{Redis Cloud Essentials} = \$0.007/\text{hour} \times 730 = \$5.11/\text{month}
$
Redis's own page rounds this to $5 a month — the cheapest managed option at this size, with up to 99.99% uptime.
$
\text{ElastiCache Serverless for Valkey} = 1 \times \$0.084 \times 730 + 10 \times \$0.0023 = \$61.32 + \$0.02 = \$61.34/\text{month}
$
The ECPU term is two cents; the storage term is the whole bill. Serverless charges for every GB-hour whether traffic arrives or not, so at 1 GB it costs twelve times the Essentials price. The lesson is structural: serverless pricing is a floor set by stored GB, not by requests. Ranking: Essentials ($5.11), Upstash PAYG ($20.00), ElastiCache Serverless Valkey ($61.34), Redis Cloud Pro ($200.00, the minimum).
Profile B: 10 GB, 50,000 requests a second
This is the profile AWS itself works through on its ElastiCache pricing page: 10 GB, 50,000 requests per second, each request under 1 KB, so 1 ECPU, in US East (N. Virginia).
$
\text{Valkey serverless storage} = 10 \times \$0.084 = \$0.84/\text{hour}
$
$
\text{Valkey serverless ECPUs} = \frac{50{,}000 \times 3{,}600}{1{,}000{,}000} \times \$0.0023 = 180 \times \$0.0023 = \$0.414/\text{hour}
$
$
\text{Valkey serverless total} = (\$0.84 + \$0.414) \times 730 = \$1.254 \times 730 = \$915.42/\text{month}
$
The identical profile on Serverless for Memcached ($0.125 per GB-hour, $0.0034 per million ECPUs):
$
\text{Memcached serverless total} = (10 \times \$0.125 + 180 \times \$0.0034) \times 730 = (\$1.25 + \$0.612) \times 730 = \$1.862 \times 730 = \$1{,}359.26/\text{month}
$
The difference is $443.84 a month, or 48.5% more for Memcached — same data, same rate, same region, entirely from the engine rates.
The same request rate through Upstash:
$
\text{Upstash PAYG at 50,000 req/s} = \frac{50{,}000 \times 2{,}592{,}000}{100{,}000} \times \$0.20 = 1{,}296{,}000 \times \$0.20 = \$259{,}200/\text{month}
$
That is not a typo: 50,000 requests a second sustained for a 30-day month is 129.6 billion commands. The Fixed plan does not rescue it — Fixed 10 GB costs $200 a month but caps at 10,000 commands per second, and 50,000 exceeds that cap fivefold.
> [!WARNING]
> Per-command pricing has no ceiling. A traffic spike that doubles your request rate doubles an Upstash pay-as-you-go bill the same month, while a node-based bill does not move. Size the worst case on paper before committing to a per-command meter, and set a billing alert on day one.
!AWS ElastiCache worked example: Serverless for Valkey at $1.254 per hour
Profile C: 100 GB, node-based
At 100 GB, node-based pricing takes over. AWS's example uses `cache.r7g.xlarge` nodes at $0.3496 per hour for Valkey — 26.32 GB per node, 25% reserved, leaving 19.74 GB usable:
$
\text{Shards} = \lceil 100 / 19.74 \rceil = 6 \text{ shards}
$
High availability doubles the node count, one primary plus one replica per shard:
$
\text{Valkey nodes} = 6 \times 2 = 12 \text{ nodes} \times \$0.3496 = \$4.1952/\text{hour} = \$3{,}062.50/\text{month}
$
The identical shape on Memcached is 12 × $0.437 = $5.244 per hour, or $3,828.12 a month — $765.62 more for the same 100 GB and availability. Cross-AZ transfer ($0.01 per GB) and backups ($0.085 per GiB per month) are priced separately.
Dragonfly Cloud prices the same 100 GB simply: 100 × $8.00 = $800.00 a month on demand, plus network charges. Its calculator shows $96.00 a month for 12 GB — exactly 12 × $8.00. That undercuts ElastiCache node-based Valkey by roughly 74%, but ElastiCache's price buys AWS-managed nodes inside your VPC with IAM, CloudWatch, and Multi-AZ replication.
MemoryDB answers a different question — durability. AWS's worked example for 25 GB uses two `db.r6g.xlarge` nodes at $0.432 per hour, one primary and one replica: $0.864 an hour, or $630.72 a month, plus snapshots at $0.021 per GB-month and data-written charges of $0.20 per GB only above a 10 TB monthly free allowance. It is the only option here with a durable multi-AZ transaction log.
Persistence and clustering ceilings
Redis and Valkey persist. Redis documents two mechanisms: RDB, point-in-time snapshots at configured intervals, and AOF, an append-only log of every write operation that replays at startup. Either lets a restarted node recover its data instead of refilling from the database.
Memcached does not persist. No snapshot, no write-ahead log: a restart empties the cache and the application refills it from the database. That is why AWS positions Memcached for session stores where persistence is not critical. If your cache holds anything expensive to recompute, the refill cost after a restart belongs in your cost model, even though no vendor prices it.
Clustering follows the same split. Redis and Valkey cluster with sharding, replication, and Active-Active global distribution. ElastiCache scales by adding shards — six for 100 GB above — and AWS's data-tiering nodes (the `cache.r6gd` family, SSD behind RAM) cut the node count: AWS puts 1 TB on one `cache.r6gd.xlarge` at $9.9816 an hour against four `cache.r6g.16xlarge` nodes at $5.2536 each, a 52.5% saving. Memcached scales by adding nodes behind client-side hashing — simpler, but with no replication.
> [!TIP]
> Reserve 25% of every ElastiCache node for non-data use, exactly as AWS recommends. A 26.32 GB node holds 19.74 GB of data. Sizing to the full node size is the most common self-inflicted outage in this category.
Valkey clusters like Redis, because it forked the same code. The project claims 2.1 million requests per second on a single server in version 9.1 — treat that as the project's own claim, not a measurement, and size from your own load test.
Eviction: the dial that decides your hit rate
When a cache fills, something must leave. Redis gives you a dial: `maxmemory-policy` offers `allkeys-lru`, `allkeys-lfu`, `volatile-lru` and `volatile-lfu` (expirable keys only), `allkeys-random`, and `noeviction` (refuse writes rather than evict). `allkeys-lru` suits a general cache, `volatile-lru` suits a cache where only expirable keys may be dropped.
Memcached exposes no comparable policy menu: eviction is fixed behavior, and the operator's only lever is adding memory. On Redis or Valkey you tune eviction to protect hot keys; on Memcached you buy your way out with more nodes.
Eviction pressure sets the cache size. At 50,000 requests a second with 1 KB values, a write-heavy workload pushes 50 MB a second in, so a 10 GB cache turns over completely in:
$
\text{Full turnover} = \frac{10 \times 1{,}024 \text{ MB}}{50 \text{ MB/s}} = 204.8 \text{ seconds} \approx 3.4 \text{ minutes}
$
If your working set is 12 GB and your cache is 10 GB, the coldest 2 GB is evicted continuously. The fix is a bigger cache or a smaller working set.
The decision table
| Your situation | Choose | Authority |
| :--- | :--- | :--- |
| 1 GB sidecar, cost is the constraint | Redis Cloud Essentials, $5.11 per month | Redis Cloud pricing page |
| 10 GB at 50,000 req/s on AWS | Serverless Valkey, $915.42 per month | AWS ElastiCache pricing, example 1 |
| 100 GB, VPC-native, high availability | Node-based Valkey, 12 nodes, $3,062.50 per month | AWS ElastiCache pricing, example 2 |
| Durability is a requirement, not a preference | MemoryDB, $630.72 per month at 25 GB | AWS MemoryDB pricing, example 1 |
| Spiky low-volume workload under 10,000 cmd/s | Upstash Fixed 1 GB, $20 per month, or PAYG $0.20 per 100K commands | Upstash pricing page |
| 100 GB where per-GB simplicity wins | Dragonfly Cloud, $800.00 per month on demand | DragonflyDB pricing page |
| Zero license cost, self-hosted or any cloud | Valkey 9.1.3, BSD open source, no vendor price | Valkey project site |
| Data must survive restart with zero loss | MemoryDB, or Redis with RDB plus AOF | Redis persistence docs; MemoryDB pricing |
Price both rows if you sit between them: a $765 monthly difference between Valkey and Memcached nodes at 100 GB repeats every month.
Before you commit
Related: CDN pricing playbook, PostgreSQL pooling playbook, serverless pricing comparison. Run your own numbers with the pricing calculator and the rates above.