Should You Use Valkey Over Redis On AWS?


Should You Use Valkey Over Redis On AWS?

Should You Use Valkey Over Redis On AWS?

In my previous post I alluded to a new tech on the scene that is likely to replace Redis at least for those of us on AWS.

Cost:

Just looking at the smallest possible instance for Redis or Memcached, a cache.t4g.micro we are looking at $0.016/hr. Compare that to Valkey at $0.0128.

Serverless Minimum Requirements: According to the Elasticache Pricing:

You can further optimize costs on ElastiCache Serverless for Valkey with 33% lower pricing and 90% lower minimum data storage of 100 MB compared to other supported engines. 

Considering the first time I tried Redis serverless on AWS they snuck in a minimum cost of 1GB when I was just using a few KB. There is still 100MB but that is literally a small fraction of the Redis charges.

Partitioning Minimum Requirements:

A while ago I setup a partitioned cluster of Redis OSS nodes and seem to remember there being a pretty minimum instance size. According to my IoC the smallest I was able to get booted up at the time was a cache.m7g.large.

Today I went looking for the minimum requirements in the documentation and found nothing of the sort.

Meanwhile last week I booted up a valley sharded cluster with only a cache.t4g.medium and its running fine.

Let me know if you want me to do a deeper dive and do some hands on testing with this.

SDK:

Despite the fact Valkey has it’s own CLI tool Valkey is backwards compatible with Redis-cli. As a matter of fact, at the time of writing this, Valley’s default PHP SDK client recommendation is PHPRedis or PRedis.

Geospatial:

Okay this deserves its own video series. I had no idea they added Geospatial functionality to Redis but its there and therefore Valkey has Geospacial built in as well. Let me know if you want to see a post on this.

Documentation:

This fell a bit short… or possibly Google results are getting worse. I will dive in deeper on some of the functionality that was a bit hard to figure out but for now understand their documentation, at least for spinning up sharded clusters and customizing them, was not the easiest to find and search through.

I will say that there was a text file that was NOT showing up in google results that helped a lot. I am sure this will get better over time(The docs, not Google search).

Docker Image Support:

Both RedisOSS and Valkey have well maintained Docker hub images making local development really simple. Obviously if you are running it via Elasticache this doesn’t matter as much.

Summary:

Right now, mainly because of the cost and performance issues, as well as the decreased minimum requirements, I am firmly in the Valkey camp. But that may change with time.

Questions:

Have you started using Valkey? If so, which do you prefer?