ElastiCache is quite an expensive AWS cost. Especially Redis imposes significant costs on AWS users. Companies with resource-intensive workloads running on the cloud spend a great deal managing cloud costs. Expenses can grow out of control, but there is always room to cut costs without sacrificing performance and compatibility.
This is where Valkey steps in. It is an open source replacement for Redis that is fully supported by AWS. It offers the same or better Valkey’s pricing model allowing it to offer more savings than Redis while still providing full API compliance, thus increasing community support.
In this blog, we will show how moving to Valkey from Redis translates into lowering costs and caching retrieval times at the same time:
What is AWS ElastiCache and Valkey
Comparing Redis and Valkey on AWS
Pricing Example
Planning Your Migration from Redis to Valkey
Step-by-Step Guide to Migrating Redis to Valkey
Maximizing Cost Savings After Migration
What Is AWS ElastiCache, and Why Consider a Redis Alternative?
AWS ElastiCache is a fully managed, in-memory caching service that supports Redis and Memcached. Both are used for ElastiCache supports Redis which is to boost the performance of an application by lowering the load of a database. It delivers data with microsecond latency. Redis offers additional features beside ElastiCache. These include high availability, in-memory storage, low latency, and fast access to data a user might need. However, as cost arises, accessing redis features becomes challenging especially during application scaling.
Why Do ElastiCache Costs Add Up?
Common cost drivers for ElastiCache include:
Instance Pricing: Larger, memory-optimized nodes like r6g.8xlarge come with high costs.
Cluster Scaling: Cost drivers such as increased expense for adding shards and replicas pays a huge role in user spending. Scaling traffic or making services available also contributes to the high cost.
Data Transfer & Storage: You will also incur cost with cross region or AZ transfers where in backup storage, and add persistent storage.
Premium Features: Advanced features or enterprise support may incur extra charges.
Licensing Fees: For certain users, new restrictions are being introduced due to redis labs’ new license policies.
What Is Valkey?
Valkey is an open source fork of redis that seeks to preserve the good parts of Redis while avoiding licensing constraints. Valkey was created as a response to the licensing changes of Redis Labs. Valkey is now under governance of the Linux foundation which ensures neutrality from vendors granting community governance.
Why Choose Valkey?
100% Open Source: No licensing costs or proprietary restrictions.
Cost Efficiency: Save 20-30% compared to Redis on AWS ElastiCache. For example, a cache r6g.8xlarge instance costs $3.66/hour with Redis but only $2.93/hour with Valkey.
Enhanced Performance: Multi-threading, asynchronous I/O, memory optimizations and other high level features reduce latency and boost overall performance.
Rapid Innovation: New innovations, including features and security updates are rolled out regularly.
Community-Driven: Backed by AWS, other technology giants alongside an active developing community.
Comparing Redis and Valkey on AWS
Performance and Compatibility
Valkey has been designed as a true drop-in replacement for Redis in AWS. Here’s what that means:
No Application Changes: Valkey can connect with applications utilizing Redis clients and APIs. Valkey is fully compatible with Redis OSS APIs and data formats which allows for seamless migration making no changes necessary.
Same or Better Performance:Like Redis, Valkey 8.0 and all higher versions maintain throughput, latency, and scalability benchmarks. Using Valkey 8.0, the enhanced I/O multithreading improves throughput to over three times earlier Redis versions, reaching 1.19 million requests per second. End users have observed a 3x acceleration in performance for demanding tasks.
Seamless AWS Integration: Valkey connects directly with AWS ElastiCache, EC2, and Kubernetes, allowing clustering, high availability, auto-scaling, and multi-AZ deployments.
Technical Enhancements in Valkey
Threading Model: Advanced multithreading uses modern multi-core processors, improving scalability during heavy concurrent load.
Memory Efficiency: Valkey 8.1 has been designed to cut memory allocation by as much as 20% for large datasets, thus reducing operational costs.
Cluster Management: Enhanced algorithms for cluster governance reduce the periods of failover and increase ease of management in distributed systems.
Cost Savings Analysis
Let’s look at how migrating to Valkey can cut your AWS ElastiCache costs:
Feature/Aspect | Redis (ElastiCache) | Valkey (ElastiCache/EC2) |
Licensing | May incur fees/restrictions | 100% open source |
Instance Flexibility | Limited to AWS offerings | Deploy anywhere (EC2, K8s) |
Reserved Instances Savings | Yes | Yes |
Data Tiering | Yes | Yes |
Support | Paid | Community/professional option |
Vendor Lock-In | Possible | None |
Example:
Imagine you running a 10-node Redis cluster on ElastiCache switched to Valkey on Graviton-based EC2 instances. The result:
Annual savings: $50,000+
Performance: Identical or better
Migration time: Under 4 hours
Pricing
Valkey offers significant cost savings compared to Redis, making it an excellent option for cost-conscious businesses. Here's a detailed breakdown:
Example: cache.r6g.8xlarge Instance (32 vCPUs, 209.55 GiB RAM)
On-Demand Rate for Redis: $3.284/hour
Monthly Cost (Redis): $3.284 × 24 × 30 ≈ $2,368/month per node
Monthly Cost (Valkey): $2,368 × 0.8 ≈ $1,894/month per node (20% less)
For a 3-node cluster:
Redis: $7,104/month
Valkey: $5,682/month
Monthly Savings: $1,422 (≈20%)
Annual Savings: $17,064
For larger clusters (e.g., 10 nodes), savings scale even further, exceeding $50,000/year for high-throughput setups.
Serverless Pricing Example
Valkey: $0.084/GB-hour for storage, $0.0023 per million ECPUs
Redis OSS: $0.125/GB-hour for storage, $0.0034 per million ECPUs
For a 10 GB cache at 50,000 requests/second:
Valkey Monthly Cost: ~$897
Redis Monthly Cost: ~$1,335
Savings: Over 30% for typical workloads
Planning Your Migration from Redis to Valkey
Pre-Migration Checklist
Evaluate Compatibility:
Review your current Redis configuration to ensure it aligns with Valkey's supported commands and features. Valkey is a drop-in replacement for Redis OSS, supporting most standard commands and data types.
Verify that Valkey supports your required database settings, such as the number of replicas, shard count, and persistence options.
Check version compatibility; Redis OSS 5.0.6 or higher is typically required for migration from ElastiCache.
Resource Assessment:
Confirm your AWS environment (ElastiCache or EC2) has enough compute and memory resources to support the Valkey cluster and your dataset.
Ensure source and target clusters are on the same network or VPC, and verify security groups allow necessary connectivity.
Data Backup:
Create a fresh snapshot (RDB or AOF) of your Redis cluster as a fail-safe before migration.
Securely store the backup in a location like Amazon S3 for quick recovery if needed.
Test Environment:
Set up a non-production Valkey cluster to test the migration process and confirm application compatibility before deploying changes in production.
Tools and Resources for Migration
AWS and Valkey offer powerful tools to simplify your migration process:
AWS Management Console & AWS CLI: Configure, launch, and manage ElastiCache clusters while initiating migration workflows with ease.
Valkey Migration Guides: Access detailed steps for physical migration, replication, and key-specific scenarios through official Valkey documentation.
AWS Online Migration: Perform live, low-downtime migrations from self-hosted Redis to ElastiCache Valkey using the StartMigration and CompleteMigration APIs.
Step-by-Step Guide to Migrating Redis to Valkey
Step 1: Prepare Your AWS Environment
Launch a Valkey cluster with the same specs as your Redis setup (node size, shard count, replicas).
Configure subnet groups, VPC, and security groups for access.
Ensure compatibility: Redis OSS 2.x–7.2.x supported (not CE 7.4+).
Take a final Redis snapshot as backup.
Step 2: Migrate Your Data
Option A: Online Migration (Minimal Downtime)
Use AWS Console, CLI, or StartMigration API to sync Redis data to Valkey.
Monitor progress with valkey-cli INFO.
Promote Valkey to primary and redirect application traffic to the new endpoint.
Option B: Snapshot Migration
Export an RDB or AOF snapshot from Redis and transfer to Valkey.
Load the snapshot into Valkey and validate data with INFO KEYSPACE.
Step 3: Validate and Optimize
Verify data integrity with valkey-cli INFO KEYSPACE.
Test application functionality and monitor metrics (latency, throughput, memory).
Fine-tune Valkey configurations if needed.
Decommission the old Redis cluster once validated.
Maximizing Cost Savings After Migration
1. Optimize Reserved Instances
Commit to Reserved Instances for predictable workloads and long-term cost savings. Choose a 3-Year All Upfront RI for up to 55% savings, or a 1-Year Partial Upfront RI for ~40% savings on stable base workloads. Use AWS Cost Explorer to analyze usage and maximize efficiency. For immediate savings, convert existing RIs (e.g., migrate Redis RIs to Valkey clusters with AWS Support).
Pro Tip: For added flexibility, consider AWS Savings Plans for up to 28% discounts across all Valkey clusters. Pump intelligently combines RIs and Savings Plans to ensure the best coverage and maximum savings, no matter your workload.
2. Implement Data Tiering
Reduce costs with ElastiCache Data Tiering, which automatically moves less-accessed data to SSD storage.
How It Works:
Hot Data: Stored in-memory for microsecond access.
Warm Data: Stored on NVMe SSDs for millisecond access.
Configuration Example:
Savings Impact:
Cost Reduction: Up to 60% for clusters > 100 GB.
Use Case: Ideal for applications with 80/20 access patterns (e.g., e-commerce catalogs).
Complement with Serverless Caching:
For spiky or unpredictable workloads, use ElastiCache Serverless for Valkey ($6/month minimum vs. $35 for node-based).
3. Monitor and Tune Performance
Use tools like Amazon CloudWatch, Prometheus, and Grafana to monitor Valkey cluster performance metrics effectively:
Cache Hit Rate: Aim for >90% using CloudWatch or Grafana.
Evictions: Keep below 1% of total keys with Prometheus.
Network Throughput: Ensure <70% of the instance limit with AWS Compute Optimizer.
Tuning Tips:
Adjust maxmemory-policy to allkeys-lru for volatile data.
Scale horizontally by adding shards if CPU usage exceeds 70% for over 15 minutes.
Upgrade to Graviton3 instances (e.g., r7g) for 20% better price-performance compared to x86.
4. Measure ROI
Calculate your return on investment by comparing your AWS bills before and after migration. For example, migrating from a 10-node Redis cluster ($12,540/month) to an 8-node Valkey cluster ($8,320/month) can save $50,640 annually. Use AWS Cost Explorer to track spending and Trusted Advisor to identify underutilized Valkey nodes.
Conclusion
Migrating from Redis to Valkey on AWS ElastiCache is no simple cost-saving shift; it’s a migration to a next-gen open-source platform that is fully supported by industry leaders such as AWS, the Linux Foundation, and a well-established open-source community. In addition to providing seamless transitions with full compatibility to Redis APIs and data formats, Valkey’s node-based clusters have a 20% cost reduction while 33% savings are observed in serverless deployments.
Valkey’s efficiency is further achieved with enhanced performance due to the utilization of multi-core systems and asynchronous I/O threading. With in-place engine upgrades and managed online transfers, AWS frameworks migrate with minimal downtime, preserving contracts and migrating at no additional expense.
Combining enterprise-grade reliability with unparalleled cost-efficiency, Valkey is a go-to solution for real-time applications with its flexible scalability.
Happy Migrating!
Join Pump for Free
If you are an early-stage startup that wants to save on cloud costs, use this opportunity. If you are a start-up business owner who wants to cut down the cost of using the cloud, then this is your chance. Pump helps you save up to 60% in cloud costs, and the best thing about it is that it is absolutely free!
Pump provides personalized solutions that allow you to effectively manage and optimize your Azure, GCP and AWS spending. Take complete control over your cloud expenses and ensure that you get the most from what you have invested. Who would pay more when we can save better?
Are you ready to take control of your cloud expenses?