
AWS Elasticache: A Performance and Cost Analysis of Redis 7.1 vs. Valkey 7.2
Elasticache redis 7.x, valkey 7.x benchmark on different aws managed instance.
Recent changes to Redis’s licensing model have marked a significant turning point for developers and companies using in-memory databases. In response to this shift, the open-source community and industry leaders like AWS initiated the Valkey project, a fully compatible alternative to Redis. With AWS quickly integrating this new engine into its ElastiCache service, critical questions have emerged for users: Can Valkey truly replace Redis in terms of performance? And more importantly, which offers a better price-performance ratio on AWS: the established Intel-based instances or the new-generation Graviton-powered instances?

This benchmark study provides clear, data-driven answers to these questions by analyzing the results of a comprehensive test suite conducted in the AWS ap-south-1 (Mumbai) region.
Why Valkey? The Story in Short
It all began in March 2024, when Redis Inc. changed its license from the friendly open-source BSD license to a more restrictive one (RSALv2/SSPLv1). This change created a problem for cloud companies like AWS, who used Redis code to offer their own services.
In response, the Linux Foundation, with support from AWS, Google Cloud, and Oracle, launched the Valkey project. Valkey is a copy (or “fork”) of Redis version 7.2.4, the last version that was fully open-source. The goal of Valkey is to continue Redis’s development with a completely open-source license (BSD-3-Clause). Valkey is a community-driven project and acts as a drop-in replacement for Redis.
A Quick Technical Look: Differences Between Redis and Valkey
Before diving into performance, it’s important to understand what’s under the hood of these two engines.

Our Test Setup (Methodology)
We ran our tests in the ap-south-1a availability zone to get fair and reliable results.
- Engines:
ElastiCache for Redis 7.1,ElastiCache for Valkey 7.2 - Server Types (Instances):
1
2
3
4
Instance Type Processor vCPUs Memory (RAM)
cache.r5.xlarge Intel Xeon 4 26.22 GiB
cache.r6g.xlarge AWS Graviton2 4 26.3 GiB
cache.r7g.xlarge AWS Graviton3 4 26.3 GiB- Tests: We tested pure writing (
SET), pure reading (GET), and a mix of both (GET/SET Mix) to simulate how real applications work. - Benchmark Command: All tests were run from a
c6gn.xlargeEC2 instance in the same VPC to ensure network performance was not a bottleneck. The core command used for the tests was structured as follows:
1
redis-benchmark -h <cluster-endpoint> -p 6379 -t set,get -c 50 -n 1000000 -d 128 -P 8 --csv
-c 50: 50 parallel clients sending requests.-n 1000000: 1,000,000 total requests per test.-d 128: A small 128-byte data size for each value.-P 8: Pipelining 8 commands together for better throughput.
Comparing the Costs (ap-south-1 Region)
First, let’s look at the price. To encourage users to switch, AWS offers a big discount for ElastiCache for Valkey.
The table below shows the monthly On-Demand cost for both services in the ap-south-1 (Mumbai) region.

The numbers are clear: just by choosing Valkey, you get an immediate 20% discount on your monthly bill.
Performance Results
Now, let’s see what performance you get for that price.
Throughput (How much work can it do?)
Throughput means how many operations the server can handle per second. Higher is better. The charts below show the results for our different tests.



- Graviton is Faster: In every test, the AWS Graviton servers (
r6gandr7g) were much faster than the Intel-basedr5server. Ther7g.xlargewas the fastest of all. - Engines are Equal in Speed: There was almost no speed difference between Redis 7.1 and Valkey 7.2. This proves Valkey is just as fast as Redis.
- Top Performer: In the mixed test (the most realistic one), Valkey 7.2 on the
r7g.xlargeserver handled the most operations per second (about 1.22 million).
p99 Latency (How stable is the performance?)
Latency is the time it takes to get a response. We measure “p99 latency,” which tells us the maximum response time for 99% of requests. It’s a great way to measure stability under pressure. Lower is better.


- Graviton is More Stable: The biggest difference was in the
SET(write) test. The Intelr5server's latency was over 3.2 ms, while ther7gserver's latency was under 0.7 ms. That means ther7gis 4-5 times more stable, which is very important for a good user experience. - Predictable Speed: Graviton servers gave faster and more consistent response times in all tests, making them a much better choice for applications where speed matters.
Price-Performance: Getting the Most for Your Money
This final chart answers the most important question: “How much performance do you get for every dollar you spend?”
The tallest bar is the winner.
The tallest bar is the winner.

This chart makes the final decision easy. Because Valkey is 20% cheaper, it offers better value on every server type. When you combine that saving with the high performance of Graviton servers, the choice becomes obvious. The combinations of Valkey 7.2 on r7g.xlarge and r6g.xlarge are much more efficient than any other option.
Based on our tests, here is our clear recommendation for anyone using ElastiCache on AWS:
- Which Server? Go with AWS Graviton. The r7g.xlarge offers the best performance and stability. If you are on a tighter budget, the r6g.xlarge is still an excellent and much faster choice than the older Intel
r5instance. - Which Engine? Valkey performs just as well as Redis, but AWS gives you a 20% discount for using it. The choice is simple.
Putting it all together, the best and smartest choice is clear:
For the best performance, stability, and value on AWS ElastiCache , use the
ElastiCache for Valkey engine on a cache.r7g.xlarge instance.This combination gives you the fastest speed, a 20% cost saving, and the security of building on a fully open-source project supported by a strong community.
----------------
Redis and Its Return to Open Source
After feedback from the community, Redis Inc. changed its strategy. With the release of Redis 8.0 in May 2025, the company announced it would add an OSI-approved open-source license (AGPLv3) as an option.
This is a sign that Redis wants to reconnect with the open-source community. It will be interesting to see how this affects the future of both Redis and Valkey. For now, the competition in the world of in-memory databases continues.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article