Scrivio Interview library
ConceptFoundations6 min read · updated 13 November 2026

Since 2024 the Redis ecosystem has split: Redis changed its licences, the Valkey fork appeared, and cloud providers offer managed services built on one or the other.

Explain what Valkey is, how compatible it is with Redis, and the main features of Redis 7.x, Redis 8 and Valkey 8 that a Java developer would notice.

Valkey is a fork of Redis 7.2.4, created in 2024 under the BSD licence and hosted by the Linux Foundation after Redis moved to source-available licences from 7.4. It speaks the same protocol and commands as Redis 7.2, so Lettuce, Jedis, Redisson and Spring Data Redis work with it unchanged, and differences only appear in features added after the split. A Java developer notices Redis 7.x functions, sharded pub/sub, listpack and hash field expiration, Redis 8's built-in query engine, JSON, time series, probabilistic types and vector sets, and Valkey 8's faster I/O threading, replication and memory use.

Why this question is asked

For years 'Redis' meant one open-source project. Since 2024 it can mean Redis from Redis Ltd, the Valkey fork, or a cloud service built on either, and teams now have to know which one they run before using a newer command. Interviewers ask this to check that we understand the split well enough to make sensible choices and avoid surprises after a migration. In this answer, we will go through why Valkey exists, how compatible it is, what each recent release brought that a Java developer would notice, and how to check what an engine supports.

1Why Valkey Exists

Redis was BSD-licensed open source for most of its life. In March 2024, starting with version 7.4, Redis Ltd moved the project to source-available licences (RSALv2 and SSPLv1), which restrict offering Redis as a managed service without an agreement. Several cloud providers and long-time contributors responded by forking the last BSD release, Redis 7.2.4, as Valkey, hosted by the Linux Foundation and still under the BSD licence.

In 2025 Redis 8 added the AGPLv3, an OSI-approved open-source licence, as a third option alongside the other two. So today we have two actively developed engines with a common past, different licences and different roadmaps. For a company the licence decides what legal and procurement need to approve, and the managed services available in each cloud follow from it.

2How Compatible Valkey Is

Valkey started as Redis 7.2.4, so it speaks the same RESP2 and RESP3 protocol and supports the same commands, data types, persistence formats and cluster protocol as Redis 7.2. Client libraries do not need to know which engine is on the other end: Lettuce, Jedis, Redisson and Spring Data Redis connect to Valkey with the same configuration they used for Redis.

Differences grow with each feature added after the fork. A command introduced in Redis 7.4 or 8 may not exist in Valkey, or may arrive later with different details, and Valkey has added its own improvements. So compatibility is near perfect at the 7.2 level and becomes a question of version and feature beyond it.

3Redis 7.x Features a Java Developer Notices

Redis 7.0 brought functions, which are Lua scripts stored on the server as named libraries and called with FCALL, so they survive restarts and replicate instead of being sent each time. It added sharded pub/sub with SPUBLISH and SSUBSCRIBE, where a channel lives on one cluster shard instead of being broadcast to every node. AOF persistence became multi-part, with a base file, incremental files and a manifest in a directory, which makes rewrites cheaper. Listpack replaced ziplist as the compact encoding for small hashes, lists and sorted sets, and ACL selectors allowed several permission sets per user.

Redis 7.4 added hash field expiration, which Java developers had wanted for years: HEXPIRE, HPEXPIRE, HTTL and HPERSIST let each field of a hash have its own TTL, so a per-user hash of tokens no longer needs one key per token.

Text
HSET user:42:tokens t1 "abc" t2 "def" -- (integer) 2
HEXPIRE user:42:tokens 300 FIELDS 1 t1 -- 1) (integer) 1: t1 now expires in 300 s
HTTL user:42:tokens FIELDS 2 t1 t2 -- 1) (integer) 300 2) (integer) -1

Notice that HEXPIRE exists in Redis 7.4 and later, not in Redis 7.2, so it was not in the code Valkey forked. Newer Valkey releases have added hash field expiration as well, so check the exact engine and version you run before relying on it.

4Redis 8 and Valkey 8

Redis 8 folded what used to be separate modules into the main distribution: the query engine (search and secondary indexing, formerly RediSearch), JSON documents, time series and probabilistic types such as Bloom and Cuckoo filters, Top-K and t-digest. It also introduced vector sets, a new data type for similarity search. For a Java developer that means FT.SEARCH, JSON.SET or TS.ADD may simply work on a Redis 8 server, where before they needed Redis Stack.

Valkey 8 took a different focus: performance and operations. It reworked I/O threading so a single instance can handle far more requests per second on several cores, improved replication, including a dual-channel approach that sends the snapshot and the ongoing changes on separate connections, and reduced memory overhead per key. Search, JSON and Bloom filters are offered as separate Valkey modules rather than built in.

What each release brings
ReleaseLicenceNotable for Java developers
Redis 7.0 to 7.2BSDFunctions, sharded pub/sub, multi-part AOF, listpack, ACL selectors
Redis 7.4RSALv2 / SSPLv1Hash field expiration (HEXPIRE, HTTL)
Redis 8Adds AGPLv3 optionQuery engine, JSON, time series, probabilistic types, vector sets
Valkey 7.2BSDSame as Redis 7.2.4
Valkey 8BSDI/O threading, replication and memory gains; search, JSON, bloom as modules

5Checking What You Run

Because the engines and services diverge, never assume a command exists. INFO server reports the version, and Valkey reports its own server name and version alongside a Redis-compatible version field; COMMAND INFO HEXPIRE returns nothing for an unknown command; MODULE LIST shows loaded modules where it is allowed. Managed services often trail the newest open-source releases by months, so the version you can buy may be older than the one you read about.

6Follow-up questions

What breaks if your code uses HEXPIRE and you move to an engine without it?

Every call fails with an unknown command error, so the code that sets field expiry throws, and worse, any fields that should have expired never do, so the hash grows forever. The quiet failure is the dangerous one: if the error is caught and logged, the application keeps working while memory leaks. The fix is either to stay on an engine with the feature, or to model expiry the old way, with one key per field and a normal TTL, or with a sorted set of expiry times cleaned by a job.

Can a Redis 7.4 or 8 RDB file be loaded into Valkey?

Not reliably. Newer Redis versions can write data types or encodings that Valkey does not know, and the RDB format version may differ. Migrating between the two after the split is safest with a key-level copy or the provider's migration tool, not by moving files. Check the specific versions involved.

Do I need a different Spring Data Redis version for Valkey?

No. Spring Data Redis talks to Valkey through Lettuce or Jedis exactly as it does to Redis 7.2. Only engine-specific commands, used through execute or a raw connection, depend on what the server supports.

7Conclusion

In this answer, we saw that Valkey is a BSD-licensed fork of Redis 7.2.4 under the Linux Foundation, created after Redis moved to source-available licences in 7.4, and that Redis 8 later added AGPLv3. Valkey is protocol and command compatible with Redis 7.2, so Java clients work unchanged, and differences come from features added after the split: hash field expiration from 7.4, Redis 8's built-in query engine, JSON, time series, probabilistic types and vector sets, and Valkey 8's threading, replication and memory work. We always check the engine and version before relying on a newer command.

What to say in the interviewAbout 70 seconds aloud

Open with

Valkey is a fork of Redis 7.2.4 that started in 2024, when Redis moved to source-available licences from 7.4 onwards. It is BSD-licensed and hosted by the Linux Foundation, and Redis 8 has since added AGPLv3 as an option too.

Then, if they want more

Because Valkey began as Redis 7.2, it speaks the same protocol and command set, so Lettuce, Jedis, Redisson and Spring Data Redis work with it without changes; the differences come from what each project added after the split.

From Redis 7 I would notice functions, which are server-side libraries called with FCALL, sharded pub/sub, multi-part AOF, listpack encodings and ACL selectors, and in 7.4 hash field expiration with HEXPIRE, so each hash field can have its own TTL. Redis 8 puts the query engine, JSON, time series and probabilistic types into the main distribution and adds vector sets.

Valkey 8 focused on I/O threading, replication and memory efficiency, and offers search, JSON and bloom as separate modules. In practice I check the engine and version with INFO before using a newer command, especially on managed services, which often trail the latest releases.

About this answer

Last updated
13 November 2026
Versions it names
Redis 7, Redis 8
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Redis documentation
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Explain what Valkey is, how compatible it is with Redis, and the main features of Redis...": https://scrivio-interview-library.netlify.app/databases/redis-internals/bb80e09124/