Valkey as additional service - redis alternative
Is there an existing issue for this?
- [x] I have searched the existing issues
Is your feature request related to a problem?
https://www.linuxfoundation.org/press/linux-foundation-launches-open-source-valkey-community
Describe your solution
https://www.drupal.org/project/redis/issues/3443819
Describe alternatives
No response
Additional context
No response
Hi @friedinando - Why don't you fork https://github.com/ddev/redis and create a new add-on using valkey. I imagine it's pretty straightforward. Another option would be a PR to make valkey an option on the redis PR.
I moved this issue to the ddev-redis add-on repo, it's worthy of conversation here.
They already have 17k stars https://github.com/valkey-io/valkey, we definitely should support Valkey.
I ran this to see what we have inside, and redis-server is available.
docker run --rm -it --name valkey valkey/valkey bash
We can replace this
https://github.com/ddev/ddev-redis/blob/0147f4170623ded62137a00ca7a62a762ebcef9a/docker-compose.redis.yaml#L5
with:
image: ${REDIS_IMAGE:-redis}:${REDIS_TAG:-6-bullseye}
and update tests to check if Valkey is going to work.
But this reminds me of https://github.com/ddev/ddev-elasticsearch vs https://github.com/ddev/ddev-opensearch that already have some differences.
What if Valkey implements something new, then it's better to have a new add-on.
Working on this in:
- #42
Hi @stasadev, I just went looking at this.
What is your progress with this and is the approach of a redis-backend the way you are still thinking of steering this out?
For now I will just replace the image myself on an override, but I am too worried if valkey ever forks away from redis drop in replacement, although that will lead to a lot more issues than just this add-on 😄
Note: I think that valkey 8 stopped working with a redis.conf file and needs a valkey.conf file, not 100% sure though.
but from https://github.com/search?q=repo%3Avalkey-io%2Fvalkey%20redis.conf&type=code it looks like it
Hi @hanoii,
It's ready, but I'm holding off pulling it only because I want to add real-time tests for writing/reading data from Redis.
I prepared the manual instructions for Laravel, but we need some automated checks.
Recently I broke ddev-redis in the v2.0.0 release, and it was only caught by failing tests on ddev-platformsh, not here.
I'll try to finish the tests this week. Feedback in the meantime is appreciated.
I think that valkey 8 stopped working with a redis.conf file
The filename doesn't matter, as long as it's passed here:
https://github.com/ddev/ddev-redis/blob/5eb87b40c8387445d8207aa700f3845f4a94aabb/docker-compose.redis.yaml#L18
It could be foobar.conf, anything.
This is a great improvement, thanks!
I tried to switch to Valkey backend, and everything went well. However, it wasn't clear if I had succeeded. DDEV still seemed to use ddev redis-cli and it said redis:6379> on the CLI ...
But I suppose it has changed, seeing all the valkey mentions after running INFO:
$ ddev redis-cli INFO | grep valkey
server_name:valkey
valkey_version:8.1.4
valkey_release_stage:ga
executable:/data/valkey-server
... compared to Redis as backend:
$ ddev redis-cli
redis:6379> INFO
# Server
redis_version:7.4.6
Could it be indicated somehow, when another backend than Redis is in use, like changing CLI wording to valkey:6379> ... or maybe it's not really possible?
Could it be indicated somehow, when another backend than Redis is in use, like changing CLI wording to
valkey:6379>... or maybe it's not really possible?
@gitressa, please test:
- #54