Valkey and Redis can use the same client protocol, but licensing, modules and data-file compatibility depend on the version. Check those differences before choosing a server or planning a migration.
This comparison covers Redis OSS through 7.2, Redis Community Edition 7.4, Redis Open Source 8.x and Valkey 7.2, 8.1 and 9.0. The examples assume a single self-managed Linux VPS running an in-memory cache. Check the exact release tag before applying the guidance.
Before switching, check the license, the commands and modules your app uses, and whether the target can load your data files. Test backup and rollback on a separate instance.
If you use Redis OSS 7.2 or earlier, the Valkey migration guide documents an upgrade path. For Redis Community Edition 7.4 or later, plan a separate migration method and test it with a recoverable backup.
Key Takeaways
- Check the license for the version you plan to run. Valkey uses BSD 3-Clause. Redis OSS through 7.2 also uses BSD 3-Clause, Redis CE 7.4–7.8 offers RSALv2 or SSPLv1, and Redis 8 adds AGPLv3 as a third option.
- Test the commands and modules your application uses. The shared client protocol does not guarantee that commands, modules or data files are interchangeable.
- Understand the difference between cache data and persistent data. Data that your application is able to rebuild needs no persistence. Sessions, queues and counters which have no other copy available need to be persisted.
- Test the migration and restore a backup on a separate instance. Keep the original instance available until your application works reliably on the new one.
Comparison between Valkey and Redis
Valkey started as a fork of Redis OSS 7.2.4. The two projects have released different features since the fork, so check the features and data formats of the versions you plan to run.
The table compares self-hosted releases. Redis Cloud and Redis Software sit outside its scope.
| Direction | Source release | Destination release | What the official guide says |
|---|---|---|---|
| Redis to Valkey | Redis OSS 2.x to 7.2.x | Valkey 7.2 or later | Protocol, configuration and RDB/AOF formats are compatible. |
| Redis to Valkey | Redis Community Edition 7.4 and later | None listed (n/a) | Data files are not compatible with Valkey. |
| Valkey to Redis | Not specified | Not specified | Outside the scope of Valkey’s Redis-to-Valkey guide. |
Licensing and Project Direction
Redis changed its licensing in 7.4 and again in 8.0. Check which of the three release ranges applies to your installation.
- Redis OSS through 7.2 uses the permissive BSD 3-Clause license.
- Redis Community Edition 7.4.x to 7.8.x uses RSALv2 or SSPLv1. Neither is OSI-approved.
- Redis Open Source 8 and later offers a choice of RSALv2, SSPLv1 or the OSI-approved AGPLv3. The bundled modules use the same terms. See Redis’s license overview.
Valkey’s COPYING file on the unstable branch contains a BSD 3-Clause license. Verify the license file of your version tag too.
In simple words:
- BSD is permissive. You can use the code in both open and proprietary products if you keep the notices.
- RSALv2 prohibits making the software available as a managed service to third parties.
- If you offer the software as a service to others under SSPLv1, the license requires you to make the source code for that service available under SSPLv1.
- AGPLv3 is an OSI-approved copyleft option for Redis 8.0 and newer. Choosing it does not exempt an unmodified deployment from the licence. Check its conditions for the selected release and use case, including the source-offer requirements when modified software is provided over a network.
The release licenses determine what choices there are:
- Redis 7.2 and below has the license BSD-3-Clause.
- Redis Community Edition 7.4 has RSALv2 or SSPLv1 but no choice for AGPLv3.
- Redis Open Source 8.0.0 and up has RSALv2, SSPLv1 or AGPLv3, choose your license.
Use the license for the exact release you plan to deploy.
Compatibility with your application
Test the commands and modules your application actually uses before you switch.
Clients and commands
Valkey supports the Redis client protocol, so existing Redis client libraries can connect. The migration guide also documents how redis-cli and valkey-cli work with Redis OSS and Valkey. Test the commands and options your app uses on the exact server release you’ll deploy.

You may want to check these before switching:
- Exact commands issued by your code and framework, possibly including commands added in Redis releases starting from 7.2.
- Check Lua scripts against the target release. Valkey’s guide documents support for the Redis scripting namespace.
- Authentication and ACL configuration used by your application.
- Code accessing the version in the INFO version string.
Modules and data files
Valkey supports modules written for the Redis OSS module API. If your app uses a feature bundled with Redis 8, such as search or JSON, check for a supported equivalent on your target Valkey release.
Valkey’s migration guide says it cannot load data files from Redis Community Edition 7.4 or later, including RDB snapshots.
| Redis source | Valkey target | Official note |
|---|---|---|
| OSS 2.x to 7.2.x | Valkey 7.2 or later | Compatible protocol, configuration and RDB/AOF formats |
| CE 7.4 and later | Not supported | Data files are not compatible with Valkey |
Valkey documents direct migrations from Redis OSS through 7.2. If you’re moving data from a later Redis release, plan a separate migration and test it with a recoverable backup.
Persistence, replication, and operations
Both systems provide RDB snapshots and AOF logging. RDB snapshots capture the data set at intervals. AOF records write operations, usually takes more space, and its impact on performance depends on the fsync policy.
Decide which data can be rebuilt and which data needs to survive a restart.
- Cache data. The application can regenerate all keys from an authoritative source. Persistence may be unnecessary, or it may be light at most. A restart comes with a cold cache penalty.
- Stateful data. Any session data, queues or counters that don’t exist anywhere else require persistence, validated restore process, and an acceptable risk for data loss.
Replication keeps a copy of your data on a second server, so you can recover or switch over if the primary fails. It is a design choice that adds a second instance to run, monitor and test, and it does not replace backups.
Performance and VPS sizing
Your performance depends on your data set, command set, persistence settings, and client/server settings.
Sizing of a VPS based on your needs:
- Test your memory usage using your data set and data structures, and leave some space for OS and your application (if there is one) in your server.
- Testing of snapshots and AOF rewrite involves memory and disk usage. Try it using your write load.
- Check latency percentiles using your client library and command set.
If you conduct your own experiment, note down your versions, setup, hardware, data set, commands used, and even software itself in order to repeat it by someone else. Use UltaHost VPS hosting for faster setup and Linux VPS hosting for Linux servers.
Migrations and rollback procedures
This is a decision list, not a step-by-step tutorial for production migrations. Test each step on an isolated environment beforehand.
- Take stock of dependencies. List all the clients, framework integrations, commands, Lua scripts and modules used by your app.
- Version check. Note the source and target versions of Redis and check them against the official migration matrix.
- Data format compatibility check. Valkey cannot load Redis CE 7.4 or later data files directly. Test a separate migration method if you’re on one of those releases.
- Backup and verify. Perform the backup operation, move it to an external storage and ensure that it can be restored. Document key count (INFO KEYSPACE), which you will use for comparison post-migration.
- Prepare the migration. There are three ways to migrate data described in Valkey migration guide – snapshot copy, replication and per key migration. Each comes with a trade-off between downtime and data loss risk. Warning from the guide: if AOF is enabled during first startup of Valkey, then the copied RDB file will not be imported.
- Test clients and restore. Use the application on the staged database instance, then restore the backup and verify the results.
- Decide before cutover what would trigger a rollback and how you would switch back. Account for writes made after the cutover.
Which would you select?
- New cache. It may be appropriate in both cases. Base your decision on licensing conditions, command and module sets, and your ability to manage either of them. Test in advance.
- Existing Redis application running on a supported version. It works well and you obey the license conditions. In case you run Redis 7.2 or an earlier version, Valkey represents an upgrade path. So, give it a try.
- Version-specific migration. For Redis CE 7.4 or later, stay on Redis or test a separate migration that does not import its data files directly.
Choose the release that supports your application’s commands, modules and data format, and that you can maintain on your VPS.
FAQ
What practical difference will using Valkey vs. Redis mean for my VPS?
The main differences are licensing, command and module support, and data-file compatibility. Valkey documents direct migration from Redis OSS through 7.2. Test your exact source and destination releases before switching.
Is Valkey drop-in replacement for Redis?
Valkey’s guide covers direct migration from Redis OSS 7.2 and earlier. Valkey cannot load the on-disk files created by Redis Community Edition 7.4 or later. Test command and module support separately.
Is Redis still open source?
Redis OSS through 7.2 uses BSD 3-Clause. Redis 7.4 is available under RSALv2 or SSPLv1. Redis 8 adds the OSI-approved AGPLv3 as a third option.
Which one is faster, Valkey or Redis?
Performance depends on your data, commands and persistence settings. Compare both servers with the same workload and configuration.
Do I need persistence for in-memory caching?
Not necessarily. If your system can reconstruct the data, then the use of a cache may require no persistence at all. If you cannot reconstruct the data, plan for persistence, backups and restores.