hippo has asked for the wisdom of the Perl Monks concerning the following question:

Given the recent licensing hokey-cokey by Redis I'm inclined to use Valkey in preference. However, there isn't any explicit mention of Valkey on CPAN that I could find. This isn't a huge surprise given how relatively new it is but nor does it give me confidence about support for it now or in the future.

So, does anyone have experience with using any of the various Redis modules with Valkey as the server? Is it as much of a drop-in replacement as I would hope?


🦛

Replies are listed 'Best First'.
Re: Valkey and Redis support
by pfaut (Priest) on Aug 23, 2025 at 00:48 UTC

    I have some simple applications that use Redis. I swapped out the Redis server for Valkey. The apps didn't notice. I use the Redis module.

    My weatherstation reports current readings to my server with an HTTP post. A perl program records the readings into a database. It then connects to Redis and reads the previous settings, compares them to the new readings, and publishes any changed readings to a Redis topic after storing the newest readings. Another perl program displays the current readings from Redis using Curses, then listens to the topic for updates.

    90% of every Perl application is already written.
    dragonchild

      Thank you - that's just the info I was hoping for. The plan was to use the Redis module so it's great to hear that it has worked for you with no problems. I will give it a go now with some confidence.


      🦛

Re: Valkey and Redis support
by stevieb (Canon) on Aug 23, 2025 at 15:06 UTC

    A couple of years ago our guys were in the process of migrating our code from Memcached to Redis. We decided we would continue to use our custom memcached library, but tweak it a bit so we could implement Redis as a base. This way, none of our scripts or applications would have to change anything. The front end API to them stayed the same, just the innards had changed to use a new backend.

    Then this whole Open Source thing happened, and we transitioned to Valkey. We did not have to make any code changes to change the backend from Redis to Valkey. Regardless if the fiasco is fixed, we're sticking with Valkey.

      Thanks for this info, stevieb. You and pfaut have given me the confidence to proceed with Valkey and in the week or so I've been testing it out it has worked really well. My Perl code is accessing it via CHI::Driver::Redis::SortedSet and it has been very easy to drop into some of our existing CHI-driven code in place of (or as l1_cache addition to) some of our other less efficient back ends.

      Just out of curiousity, what was the reason for your initial Memcached to Redis migration? Aside from the non-volatility of the Redis store there doesn't immediately seem to be a massive difference between them.

      Regardless if the fiasco is fixed, we're sticking with Valkey.

      Sounds very prudent. I suspect we will do the same.


      🦛

Re: Valkey and Redis support
by 1nickt (Canon) on Aug 22, 2025 at 21:13 UTC

    hippo can you please describe or link to the hokey-cokey you are referring to? I know there's a paid version of Redis and an "open-source" version that is the one I believe we use at $work, is something changing about that?

    Thanks.


    The way forward always starts with a minimal test.

      In essence, Redis was always open source until about a year and a half ago when suddenly it wasn't any more. Then the last open source version was forked to Valkey. Now Redis has realised the error of their ways and it is now open source once again. There's a fair summary of the whole mess at the start of this Register article.


      🦛

        Thanks.


        The way forward always starts with a minimal test.