IBRAVRA Media Network
Comparisons • 12 min read

Redis vs Memcached vs Valkey: In-Memory Caching Pricing, Persistence, and the Monthly Cost Math

The same 10 GB cache costs $5 a month on one vendor and over $1,300 on another — this guide prices Redis, Memcached, and Valkey from the vendors' own pages and shows every calculation.

By Enow A. Jovial • Published 2026-11-06

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.

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 modelHeadline rate (2026-11-06)Minimums and ceilings
Redis Cloud Free$0 per hour, 30 MBSingle database, best-effort SLA
Redis Cloud EssentialsFrom $0.007 per hour (about $5 per month)250 MB to 100 GB, shared
Redis Cloud ProFrom $0.014 per hour, minimum $200 per monthUnlimited RAM, dedicated
Redis Cloud FlexHot data in RAM, cold data on SSD, at 10% of RAMShared and dedicated
ElastiCache Serverless for Valkey$0.084 per GB-hour, $0.0023 per million ECPUsMinimum 100 MB billed, starts at $6 per month
ElastiCache Serverless for Memcached$0.125 per GB-hour, $0.0034 per million ECPUsMinimum 1 GB billed
ElastiCache nodes, Valkeycache.r7g.xlarge $0.3496 per hour26.32 GB per node, 25% reserved
ElastiCache nodes, Memcachedcache.r7g.xlarge $0.437 per hourSame node sizes
MemoryDB for Valkeydb.r6g.xlarge $0.432 per hourDurable, 1 primary plus 1 replica
Upstash Pay as You Go$0.20 per 100K commands100 GB maximum data
Upstash Fixed$10 to $1,500 per month by size250 MB to 500 GB, 10,000 cmd/s cap
Dragonfly Cloud$8.00 per GB per month on demandFlex 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
Redis Cloud pricing tiers: Free, Essentials, and Pro rates

Founder & CEO Insight — Enow A. Jovial

"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.

Upstash PAYG=10,000,000100,000×$0.20+(1−1)×$0.25=100×$0.20+$0=$20.00/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
Upstash pricing tiers: Free, Pay as You Go, and Fixed plans
Redis Cloud Essentials=$0.007/hour×730=$5.11/month\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.

ElastiCache Serverless for Valkey=1×$0.084×730+10×$0.0023=$61.32+$0.02=$61.34/month\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).

Valkey serverless storage=10×$0.084=$0.84/hour\text{Valkey serverless storage} = 10 \times \$0.084 = \$0.84/\text{hour}
Valkey serverless ECPUs=50,000×3,6001,000,000×$0.0023=180×$0.0023=$0.414/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}
Valkey serverless total=($0.84+$0.414)×730=$1.254×730=$915.42/month\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):

Memcached serverless total=(10×$0.125+180×$0.0034)×730=($1.25+$0.612)×730=$1.862×730=$1,359.26/month\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:

Upstash PAYG at 50,000 req/s=50,000×2,592,000100,000×$0.20=1,296,000×$0.20=$259,200/month\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.

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
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:

Shards=⌈100/19.74⌉=6 shards\text{Shards} = \lceil 100 / 19.74 \rceil = 6 \text{ shards}

High availability doubles the node count, one primary plus one replica per shard:

Valkey nodes=6×2=12 nodes×$0.3496=$4.1952/hour=$3,062.50/month\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.

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:

Full turnover=10×1,024 MB50 MB/s=204.8 seconds≈3.4 minutes\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 situationChooseAuthority
1 GB sidecar, cost is the constraintRedis Cloud Essentials, $5.11 per monthRedis Cloud pricing page
10 GB at 50,000 req/s on AWSServerless Valkey, $915.42 per monthAWS ElastiCache pricing, example 1
100 GB, VPC-native, high availabilityNode-based Valkey, 12 nodes, $3,062.50 per monthAWS ElastiCache pricing, example 2
Durability is a requirement, not a preferenceMemoryDB, $630.72 per month at 25 GBAWS MemoryDB pricing, example 1
Spiky low-volume workload under 10,000 cmd/sUpstash Fixed 1 GB, $20 per month, or PAYG $0.20 per 100K commandsUpstash pricing page
100 GB where per-GB simplicity winsDragonfly Cloud, $800.00 per month on demandDragonflyDB pricing page
Zero license cost, self-hosted or any cloudValkey 9.1.3, BSD open source, no vendor priceValkey project site
Data must survive restart with zero lossMemoryDB, or Redis with RDB plus AOFRedis 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

  • [x] Measure the working set: record the live dataset size in GB from INFO memory. Size the cache to the working set plus 25% headroom.
  • [x] Measure the request rate: record peak requests per second and average value size, then check the turnover time with the formula above.
  • [x] Price all three profiles: run your GB and request rate through the serverless, node, and per-command formulas. The cheapest changes with scale, usually between 1 GB and 10 GB.
  • [x] Check the caps: confirm the Fixed cap (10,000 per second), serverless minimum storage (100 MB Valkey, 1 GB Memcached), and the Pro $200 monthly minimum.
  • [x] Set the eviction policy explicitly: choose allkeys-lru, volatile-lru, or noeviction on Redis or Valkey and write it down. The default is a decision you did not make.
  • [x] Price replication and transfer separately: double nodes for HA, add $0.01 per GB cross-AZ transfer and $0.085 per GiB per month for backups.
  • [x] Test the restart: restart a node in staging and time the refill; if it hammers the database, you need persistence or a warmup procedure.
  • [x] Set a billing alert on day one: per-command and serverless meters scale with traffic.

Related: CDN pricing playbook, PostgreSQL pooling playbook, serverless pricing comparison. Run your own numbers with the pricing calculator and the rates above.