Stable Release in branch 5.0
5.0.14
Released 04 Oct 2021
(4 years ago)
SoftwareRedis
Version5.0
Status
End of life
Initial release5.0.0
17 Oct 2018
(7 years ago)
Latest release5.0.14
04 Oct 2021
(4 years ago)
Support statusNo
Source codehttps://github.com/redis/redis/tree/5.0.14
Documentationhttps://redis.io/docs/
Downloadhttps://download.redis.io/releases/
Redis 5.0 ReleasesView full list

What Is New in Redis 5.0?

Redis 5.0 is a major release focused on real-time data processing and operational maturity. It introduces a new core data structure, enhances cluster management, and improves scripting and client-side capabilities.

Category Key Changes
New Data Structure Stream data type with consumer groups
New Commands Sorted set pop operations (ZPOPMIN, ZPOPMAX, BZPOPMIN, BZPOPMAX), cluster management commands
Cluster Improvements New CLUSTER subcommands for slot and shard info (CLUSTER SLOTS, CLUSTER SHARDS, CLUSTER LINKS)
Lua Scripting Replication of commands executed by scripts, better error handling
Persistence RDB version 8 with new encoding, background AOF rewrite
Client-side Client side caching protocol (RESP3 basis)
Deprecated SLOWLOG GET/LEN/RESET, other minor commands

Why are Streams a big deal in Redis 5.0?

Streams are a new append-only log data structure designed for real-time messaging and event sourcing. They solve a common need that previously required workarounds with other Redis types.

Each stream entry has a unique ID and a set of field-value pairs. The killer feature is consumer groups, allowing multiple clients to cooperatively consume different parts of the stream with acknowledgment and pending message tracking. This makes Redis a strong contender for building reliable, scalable event-driven architectures without external message brokers.

What cluster management got easier?

Operational visibility into Redis Cluster is significantly better. New CLUSTER subcommands give you a clearer picture of your cluster's layout and health.

Key Commands

  • CLUSTER SLOTS: Maps slot ranges to master and replica nodes.
  • CLUSTER SHARDS: Provides a summarized view of shard distribution (introduced later in the 5.0 cycle).
  • CLUSTER LINKS: Shows detailed info about inter-node connections.

In practice, these commands are gold for automation scripts and monitoring tools. You spend less time parsing the output of older commands like CLUSTER NODES.

How did Lua scripting improve?

Lua scripts now replicate only the commands they execute, not the script body itself. This matters for deterministic writes and reduces network overhead during replication.

Error reporting is also more robust. If a script hits an error after writing data, Redis will log the error and continue replication, preventing a replica from stopping. This change increases operational resilience for applications relying heavily on scripts.

What's the deal with client-side caching?

Redis 5.0 lays the groundwork for a server-assisted client caching protocol. It's based on the new RESP3 protocol, though full client implementation often came later.

The idea is simple: the server can notify clients about key invalidations. This allows clients to keep a local cache without serving stale data. It's a game-changer for reducing latency and server load for read-heavy workloads, moving Redis closer to the application layer.

Were there any sorted set command additions?

Yes, new commands for popping elements from sorted sets were added. ZPOPMIN and ZPOPMAX remove and return the lowest or highest scoring member, respectively.

Their blocking variants, BZPOPMIN and BZPOPMAX, wait for an element to become available. This makes it easier to use sorted sets as priority queues without client-side polling loops.

What changed for persistence files?

The RDB file format moved to version 8. This new version stores LRU/LFU metadata more efficiently, which helps the eviction policies after a restart.

For AOF, the rewrite process now happens in a background thread, reducing latency spikes on the main thread during rewrites. This is a subtle but welcome improvement for systems under constant write load.

FAQ

Can I use Redis Streams as a Kafka replacement?
For many use cases, yes. Streams with consumer groups provide similar at-least-once delivery semantics and partitioning via consumer groups. They are ideal for high-throughput, intra-application messaging within the Redis ecosystem. For very large-scale, multi-datacenter, or long-term archival scenarios, a dedicated log system might still be necessary.

Do I need to rewrite my Lua scripts for 5.0?
No, your existing scripts will work. The replication change is backward compatible and happens automatically. The benefit is reduced replication traffic and better error handling without any code changes on your part.

Is client-side caching ready to use in 5.0?
The protocol specification is in place, but practical use requires client libraries that support RESP3 and the caching protocol. Many popular clients implemented full support after Redis 5.0's release. Check your client library's documentation for specific support details.

What commands were deprecated, and what should I use instead?
SLOWLOG GET, SLOWLOG LEN, and SLOWLOG RESET are deprecated. Use the unified SLOWLOG command without subcommands (e.g., SLOWLOG GET 10 becomes just SLOWLOG 10). This simplifies the API.

How does the new RDB version affect restart speed?
It doesn't significantly change load times. The primary advantage is preserving more accurate eviction metadata (LFU/LRU counts) across restarts, which helps maintain expected cache behavior immediately after a server reboot.

Releases In Branch 5.0

VersionRelease date
5.0.1404 Oct 2021
(4 years ago)
5.0.1321 Jul 2021
(5 years ago)
5.0.1202 Mar 2021
(5 years ago)
5.0.1122 Feb 2021
(5 years ago)
5.0.1027 Oct 2020
(5 years ago)
5.0.917 Apr 2020
(6 years ago)
5.0.812 Mar 2020
(6 years ago)
5.0.719 Nov 2019
(6 years ago)
5.0.625 Sep 2019
(6 years ago)
5.0.515 May 2019
(7 years ago)
5.0.418 Mar 2019
(7 years ago)
5.0.312 Dec 2018
(7 years ago)
5.0.222 Nov 2018
(7 years ago)
5.0.107 Nov 2018
(7 years ago)
5.0.017 Oct 2018
(7 years ago)
5.0-rc610 Oct 2018
(7 years ago)
5.0-rc506 Sep 2018
(7 years ago)
5.0-rc403 Aug 2018
(8 years ago)
5.0-rc314 Jun 2018
(8 years ago)
5.0-rc213 Jun 2018
(8 years ago)
5.0-rc129 May 2018
(8 years ago)