Tutorial

Valkey vs Redis in 2026: comparison and migration guide

Databases10 min read4 steps

In 2024, Redis's switch to the BSL licence shook the open source ecosystem. The Linux Foundation, Meta, Google and AWS responded with Valkey, a collectively maintained BSD fork. Since then, Redis reversed course by adopting AGPLv3 in May 2025 — a positive signal, but AGPLv3 is a strong copyleft: any software that embeds it must publish its source code, creating real constraints for reseller hosting providers and commercial software vendors. Valkey 9.1, released in May 2026, is now the default cache package on major Linux distributions, delivering +8% ops/sec, -22% P99 latency and -20% memory versus Redis. This guide covers the real differences — protocol, data format, module API, client libraries, configuration — and helps you choose and migrate in four steps.

Contents· Why the Redis/Valkey debate is back in 20261/11
  1. 01Why the Redis/Valkey debate is back in 2026
  2. 02Redis vs Valkey: key differences in 2026
  3. 03Protocol compatibility: RESP2 and RESP3
  4. 04Data formats: fully compatible RDB and AOF
  5. 05Command API: what is identical, what differs
  6. 06Configuration: parameters to check when switching
  7. 07Client libraries: what you don't change
  8. 08When to choose Valkey over Redis
  9. 09Migrate from Redis to Valkey in 4 steps
  10. 10What does not change in a Redis → Valkey migration
  11. 11What about your other databases on VPS?

Why the Redis/Valkey debate is back in 2026

In March 2024, Redis Ltd. switched to the BSL (Business Source License), excluded from OSI open source definitions. The reaction was immediate: the Linux Foundation coordinated the creation of Valkey with support from Meta, Google, AWS and several major hosting providers. The fork started from Redis 7.2 code under the BSD licence. In May 2025, Redis returned to an OSI-compatible licence by adopting AGPLv3 — a positive signal, but AGPLv3 is strong copyleft: any software that embeds it must publish its source code, creating real constraints for reseller hosting providers and commercial software vendors. Meanwhile, Valkey 9.1 became the default package on Ubuntu 24.04+, Debian 13 and Fedora 40+, consolidating adoption across major distributions.

Redis vs Valkey: key differences in 2026

Scroll the table

CriterionRedis 8 (AGPLv3)Valkey 9.1 (BSD)
LicenceAGPLv3 — strong copyleft, restricted commercial embeddingBSD — permissive, free commercial use
PerformanceHistorical baseline+8% ops/sec, -22% P99 latency, -20% memory
Protocol compatibility100% Redis protocol100% Redis protocol — transparent replacement
Distro supportNot installed by defaultUbuntu 24.04+, Debian 13, Fedora 40+ — native package
ModulesRedis Stack paid (RedisJSON, RediSearch…)Compatible module API, ecosystem in progress
Cloud adoptionAWS ElastiCache remains RedisGCP Memorystore Valkey available, AWS moving to Valkey
Best forExisting projects depending on Redis Stack modulesNew projects, hosting providers, sovereign stacks, modern distros

Protocol compatibility: RESP2 and RESP3

The most common question before a migration is about the protocol. Valkey implements 100% of the Redis Serialization Protocol in both versions.

RESP2 (the historic protocol) is fully supported. All your existing client libraries — ioredis, Predis, redis-py, Jedis, StackExchange.Redis — communicate with Valkey without any code or configuration changes. The replacement is transparent at the socket level.

RESP3 (introduced with Redis 6.0) is also supported by Valkey 9.1. This protocol brings enriched response types — maps, sets, doubles, booleans, attributes — allowing modern clients to reduce parsing round-trips. Libraries that enable RESP3 by default (ioredis 5+, redis-py 5+) work without modification with Valkey.

One point to verify: if your client negotiates the protocol via the HELLO command, Valkey responds identically to Redis. The HELLO 3 command activates RESP3 on both systems the same way. You can confirm this on an existing Valkey instance with valkey-cli HELLO 3.

Data formats: fully compatible RDB and AOF

The persistence file format is the other critical point of a migration. Valkey reads and writes the same formats as Redis, without intermediate conversion.

RDB (Redis Database Backup): Valkey supports RDB versions 6, 7, 8, 9 and 10. A dump.rdb file exported from Redis 7.x or 8.x imports directly into Valkey 9.1 by placing it in Valkey's dir directory before startup. No conversion tool is needed.

AOF (Append-Only File): the AOF journal format is identical between Redis and Valkey. If you use AOF persistence or mixed mode (aof-use-rdb-preamble yes), your existing files are read by Valkey without modification. The BGSAVE and BGREWRITEAOF commands behave the same way.

In-memory data format: Valkey data structures — strings, hashes, lists, sets, sorted sets, streams, HyperLogLog, bitmaps, geospatial — are identical to Redis. Internal encodings (ziplist, listpack, skiplist, quicklist, intset) have been maintained at parity. A client that stores a hash in Redis retrieves it intact from Valkey.

Command API: what is identical, what differs

The full Redis command set is supported by Valkey. The main categories — strings, hashes, lists, sets, sorted sets, streams, pub/sub, transactions, Lua scripting, keyspace notifications, cluster — work identically.

Lua scripting: Valkey supports EVAL, EVALSHA and SCRIPT LOAD. Lua scripts written for Redis run without modification on Valkey. The cjson library and redis.call() functions are available, with one nuance: Valkey has introduced compatibility with the valkey.call() alias for new scripts, but redis.call() remains functional for backwards compatibility.

Cluster: the Gossip protocol and cluster management commands (CLUSTER INFO, CLUSTER NODES, CLUSTER MEET, CLUSTER FAILOVER) are identical. A Valkey node can participate in an existing Redis cluster — however, a mixed Redis/Valkey cluster is not recommended in production: major versions may introduce behavioural differences on internal commands. Migrating nodes one by one remains the safe path.

ACL (Access Control Lists): the ACL rule format is identical. An aclfile exported from Redis (ACL SAVE) can be reloaded into Valkey. The ACL LIST, ACL SETUSER, ACL GETUSER commands work identically.

Keyspace notifications: the notify-keyspace-events configuration and subscription patterns (__keyevent@*__:set, etc.) are identical. Your pub/sub consumers listening to keyspace events do not need to be modified.

What differs: the proprietary Redis Stack modules — RedisJSON, RediSearch, RedisTimeSeries, RedisBloom — are not available in Valkey. Open source alternatives exist, but the API is not guaranteed to be identical. If your code calls commands like JSON.SET, FT.SEARCH or TS.ADD, direct migration is not yet possible.

Configuration: parameters to check when switching

The valkey.conf syntax is identical to redis.conf. You can copy your existing configuration file without rewriting. A few points require specific attention.

Default paths: Valkey uses /etc/valkey/valkey.conf and /var/lib/valkey/ instead of /etc/redis/ and /var/lib/redis/. If you copy your configuration, update the dir, logfile, pidfile and aclfile directives to point to Valkey paths.

systemd service name: the service is called valkey (not redis-server). Commands are therefore systemctl start valkey, systemctl enable valkey.

TLS: Valkey supports TLS on client connections (tls-port, tls-cert-file, tls-key-file, tls-ca-cert-file) identically to Redis 6+. If you have enabled TLS in Redis, the same configuration works in Valkey without modifying your clients.

maxmemory and eviction: eviction policies (allkeys-lru, volatile-lru, allkeys-lfu, noeviction, etc.) are identical. Your current policy transfers directly.

Bind and protection-mode: Valkey starts in protected mode by default (like Redis), refusing non-loopback connections if no password is defined. Your bind and requirepass (or ACL) configuration transposes directly.

Client libraries: what you don't change

This is one of Valkey's strengths: no client library requires modification to connect to Valkey. Since the protocol is identical, the client does not know whether it is talking to Redis or Valkey.

JavaScript / Node.js: ioredis, node-redis (the redis npm package), redis — all work. Change only the host and port in your connection configuration.

Python: redis-py (the redis package on PyPI), aioredis — compatible. The connection Redis(host='valkey-host', port=6379) works without any other change.

PHP: phpredis (C extension), Predis (pure PHP) — compatible. No code changes.

Java: Jedis, Lettuce, Redisson — compatible. Adapt only the connection parameters.

.NET: StackExchange.Redis — compatible. Same connection string, host and port updated.

Go: go-redis, rueidis — compatible.

If you use an abstraction like Laravel Cache (CACHE_DRIVER=redis), Django django-redis, Spring Data Redis or Symfony Cache with the Redis adapter, these abstraction layers reconnect to Valkey without code changes — only the connection DSN changes.

When to choose Valkey over Redis

Valkey is the natural choice in several contexts. Hosting providers and resellers are the most affected: Redis's AGPLv3 requires publishing the code of any service that embeds it, a constraint incompatible with most commercial offerings. New projects have no reason to start on Redis: Valkey is the default package on recent distributions, performance is superior and the licence has no restrictions. GDPR and sovereignty stacks also benefit from the Linux Foundation governance, which is more neutral than a private vendor. Finally, if you do not use the proprietary Redis Stack modules (RedisJSON, RediSearch, RedisTimeSeries), migration is transparent — all your existing libraries and configurations remain valid.

Migrate from Redis to Valkey in 4 steps

  1. Verify compatibility

    Run redis-cli INFO server | grep redis_version to identify your current version. List your dependencies and confirm none uses Redis Stack modules (RedisJSON, RediSearch, RedisTimeSeries). If so, direct migration is not yet recommended. Also check your Lua scripts: redis.call() remains compatible, but identify any call to proprietary module commands.

  2. Install Valkey

    On Ubuntu 24.04+ and Debian 13, Valkey is available in native repositories: apt install valkey. On Fedora 40+, dnf install valkey. On older distributions, add the official Valkey repository before installation. The package also installs valkey-cli, valkey-benchmark and valkey-server — tools functionally identical to their Redis counterparts.

  3. Copy configuration and data

    The configuration syntax is identical between Redis and Valkey. Copy your file and update the paths: cp /etc/redis/redis.conf /etc/valkey/valkey.conf, then adapt dir, logfile, pidfile to point to /var/lib/valkey/ and /var/log/valkey/. Export your Redis data via an RDB snapshot (redis-cli --rdb /tmp/dump.rdb) then place the file in Valkey's dir directory. If you use AOF, also copy the .aof file to that same directory.

  4. Start Valkey and validate

    Start the service (systemctl start valkey), then validate with valkey-cli ping — you should receive PONG. Verify your data is present with valkey-cli DBSIZE and compare with the key count from your old Redis instance. Test your application on a few representative requests before cutting over from Redis. If you use ACLs, reload your exported ACL file with valkey-cli ACL LOAD. All your client libraries (ioredis, Predis, redis-py) are compatible without modification — change only the connection host.

Valkey includes valkey-benchmark, functionally identical to redis-benchmark. Before any production migration, validate performance on your hardware with valkey-benchmark -n 100000 -q. This command sends 100,000 requests and displays the ops/sec summary for each command type. Expected result: figures higher than your old Redis instance on the same server. To specifically test pipelining and RESP3, add the --pipe or -3 flag depending on your client version.

What does not change in a Redis → Valkey migration

  • All your client libraries (ioredis, redis-py, Predis, Jedis, StackExchange.Redis, go-redis) — no code changes
  • The communication protocol: RESP2 and RESP3 are fully supported
  • Your RDB and AOF persistence files — readable by Valkey without conversion
  • The redis.conf syntax — copy the file and update the paths
  • Your Lua scripts — redis.call() works, valkey.call() is additionally available
  • Your ACL rules exported from Redis — reloaded directly into Valkey
  • TLS configuration, memory eviction policies and keyspace notifications
  • The usual redis-cli commands — valkey-cli accepts them all

What about your other databases on VPS?

Valkey is just one piece of your data stack. If you also host a relational database, see our guide on MariaDB on VPS: configuration, performance and replication. For full-text search, our Elasticsearch on VPS guide covers installation, memory tuning and production indexes. Each component deserves configuration adapted to your workload — our Cloud VPS gives you full control of your environment.

Deploy Valkey on a controlled VPS

Our Cloud VPS gives you full root access to install Valkey, configure your data stack and optimise performance to your real needs. No proprietary overlay, no licence constraints.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.

Message us on WhatsAppopens in a new tab