Every production enterprise-grade solution requires a caching component. Very often we all use Redis as the solution for this. There are a couple of ways to run it:
- You are responsible for everything and running it as software inside EC2.
- Using the AWS managed ElastiCache service where you are responsible only for capacity.
The second solution sounds more natural — we use it to eliminate patching, security overhead, etc. You create it. You have an endpoint. You forget about it. Very convenient.
Of course you should still define some monitoring alarms to track current memory utilisation, eviction rates, and so on. But the other question is cost. The price for node-based Redis is pretty straightforward and depends on the instances you manage.
We had a Redis cluster for a while, everything was working, and we didn’t have a problem. The price wasn’t too high either, so we didn’t prioritise automating it. Then I came across an article about Valkey.
The Spark: AWS Introduces Valkey
When AWS introduced Valkey into ElastiCache, it sparked curiosity across the cloud community. Valkey is an open-source Redis fork supported by the Linux Foundation, backed by over 50 companies including AWS, Google Cloud, Oracle, Ericsson, and Snap Inc.
Valkey is a high-performance key-value datastore designed as a drop-in replacement for Redis OSS. It supports a variety of workloads — caching, message queues, and can even act as a primary database. Compatible with Redis APIs while enabling community-driven features and contributions.
Key facts about Valkey:
- Fork of Redis, developed under the Linux Foundation governance
- Open-source under permissive BSD licensing
- API-compatible with Redis OSS — your existing tools and applications work without changes
- Supports Linux, macOS, OpenBSD, NetBSD, and FreeBSD
- Growing community with contributions from 40+ companies
- Valkey 8.0+ makes no backwards-incompatible changes to existing command syntax
The best part? We didn’t need to overhaul our applications. Thanks to Valkey’s compatibility with Redis APIs, migrations were seamless.
How One Line of CDK Can Save You 20%
An update from Redis to Valkey is one of those no-brainers. With just a small update of your infrastructure code, you can save up to 20% on the same amazing service. If you are using ElastiCache with Route53, you don’t have to change anything within your app.
I’m a big Redis lover and have “some” ElastiCache Redis clusters. Last week, I updated my caching clusters, and as promised, I saw a 20% billing drop without any impact on the performance of my systems. Just a few lines changed in CDK. It’s just great!
Here’s what the CDK code looks like after the switch:
| |
The key change? engine: 'valkey' instead of engine: 'redis'. That’s it.
How to Switch with No Downtime
You can perform an in-place, zero-downtime upgrade of your existing ElastiCache clusters from Redis OSS to Valkey. Alternatively:
- Create a new Valkey cluster.
- Point your CNAME to the new endpoint.
That’s it. Result? 20% lower cost with the same efficiency, reliability, and performance.
Going Serverless for Even Bigger Savings
On-demand pricing gave us a 20% discount, but the Valkey Serverless option offers an even more significant discount — around 33%.
Migrating to Serverless Valkey was straightforward:
- Created new serverless caches using the AWS console.
- Adjusted resource configurations in our infrastructure-as-code setup.
- Tested in staging to ensure seamless failover and performance consistency.
Within a week, we had shifted major workloads to Valkey Serverless. The results? A consistent 33% reduction in caching costs, with performance metrics matching — or even slightly surpassing — our previous Redis setup.
Real Numbers from Our Infrastructure
| Metric | Before (Redis) | After (Valkey) |
|---|---|---|
| Daily cost | $11.42 | $9.14 |
| Monthly savings | ~$68 | — |
| Annual savings (per env) | $820.80 | — |
We have 2 environments. Total annual savings: ~$1,000+.
Worth it? Absolutely. For a change that took less than an hour.
Up to 60% Savings with Valkey 8.x and Right-Sizing
According to the AWS Database Blog, upgrading to Valkey 8.x brings additional memory efficiency improvements — up to 40% better memory utilisation compared to Valkey 7.2 (and all Redis OSS versions). This means you may be able to downsize your node type, delivering a further 50% cost saving for the same workload.
The combined savings can reach up to 60%: 1 – (0.8 × 0.5) = 60%.
AWS also recommends using the CUDOS dashboard (part of the Cloud Intelligence Dashboards framework) to visualise your ElastiCache Redis-to-Valkey migration progress, quantify savings achieved, and identify which clusters offer the highest savings potential.
Content was rephrased for compliance with licensing restrictions. Source
Why This Works
- API Compatibility: Valkey is a drop-in replacement for Redis OSS, reducing migration risks.
- Seamless Scaling: Serverless architecture auto-scales based on demand, eliminating overprovisioning.
- No Downtime: AWS supports in-place upgrades from Redis OSS to Valkey with zero service interruptions.
- Reservations Still Apply: Your existing ElastiCache for Redis OSS Reservations will continue to apply after the upgrade.
Valkey vs Redis: Key Differences
| Aspect | Redis | Valkey |
|---|---|---|
| Governance | Controlled by Redis Labs | Open-source, Linux Foundation |
| Licensing | Redis Source Available License (RSAL) | Permissive BSD license |
| Pricing | Standard ElastiCache rates | 20% lower (node-based), 33% lower (serverless) |
| Community | Primarily Redis Labs managed | 50+ contributing companies |
| Enterprise Features | Redis Enterprise modules (RedisBloom, RedisGraph, etc.) | Growing — Bloom filters added in 8.1 |
| Cloud Integration | Redis Cloud + third-party managed | Native AWS ElastiCache & MemoryDB |
| Migration | — | Zero-downtime upgrade from Redis OSS |
Lessons Learned
- Don’t fear change: Experimenting with new services can yield significant benefits with minimal risk.
- Infrastructure as Code is a superpower: Managing changes via CDK/CloudFormation allowed us to deploy updates efficiently and rollback if needed.
- Monitor continuously: While cost savings are great, we maintained rigorous monitoring to ensure performance remained unaffected.
- Start simple: The 20% node-based saving is literally a one-property change. Start there, validate, then consider serverless.
Final Thoughts
Improvements coming with Valkey are a no-brainer. It’s great for our wallet and super cheap to implement, offering fantastic ROI even for teams with huge technical debt and tight schedules.
Regarding improvements in the Serverless area, I love the direction of the changes. AWS addressed almost all significant issues from the initial release, which shows they listen to community feedback. However, as much as we appreciate having an option, all frugal architects will stick to their ElastiCache clusters on reserved nodes for predictable workloads.
If you’re looking to optimise your AWS spend, consider giving Valkey a shot — it might just be the easiest saving you make this year. A few lines of CDK, zero downtime, and real money back in your pocket.
Useful links:
