Redis 6.0.1 was released on May 2, 2020, and as Redis author Antirez describes it, it is the most “enterprise” release to date, the most changed Redis release ever, and the one with the most people working on it.

Therefore, before using this version, it is recommended that developers do in-depth testing before considering production, after all, production conditions are not trivial. Anyway, back to the point of this article, let’s focus on what Redis 6.0.1 brings to the table.

Therefore, before using this version, it is recommended that developers do in-depth testing before considering production, after all, production conditions are not trivial. Anyway, back to the point of this article, let’s focus on what Redis 6.0.1 brings to the table.

Redis new features

The Redis 6 update log contains the following five parts:

  1. Redis 6.0-RC1 new features;
  2. Redis 6.0-RC2 version of the new features;
  3. Redis 6.0-RC3 new features;
  4. Redis 6.0-RC4 new features;
  5. Redis 6.0.0 GA version features

In addition to the above version of the update log, there is also the 6.0.1 official update log, but this official release is only two days after Redis 6.0.0 GA, so only a few bugs are fixed, so we only need to look at the above five logs.

1.Redis 6.0-rc1 update logs

The official update log is as follows:

Redis 6 improves Redis in a number of key areas and is one of the largest Redis releases in the history of the project, so here we’ll list only the biggest features in this release:

  • The modules system now has a number of new APIs that allow module authors   to make things otherwise not possible in the past. It is possible to   store arbitrary module private data in RDB files, to hook on different   server events, capture and rewrite commands executions, block clients on   keys, and so forth.
  • The Redis active expire cycle was rewritten for much faster eviction of keys that are already expired. Now the effort is tunable.
  • Redis now supports SSL on all channels.
  • ACL support, you can define users that can run only certain commands and/or   can only access only certain keys patterns.
  • Redis now supports a new protocol called RESP3, which returns more   semantical replies: new clients using this protocol can understand just   from the reply what type to return to the calling program.
  • There is server-side support for client-side caching of key values. This feature is still experimental and will get more Changes during the next release candidates, but you can already test it and read about it here: redis. IO /topics/clie…
  • Redis can now optionally use threads to handle I/O, allowing to serve   2 times as much operations per second in a single instance when   pipelining cannot be used.
  • Diskless replication is now supported even on replicas: a replica is now   able, under certain conditions the user can configure, to load the RDB   in the first synchronization directly from the socket to the memory.
  • Redis-benchmark now supports a Redis Cluster mode.
  • SRANDMEMBER and similar commands have a better distribution.
  • Redis-cli improvements.
  • Systemd support rewritten.
  • A Redis Cluster proxy was released here: github.com/artix75/red…
  • A Disque module for Redis was released here: github.com/antirez/dis…

This version has the largest additions, as shown in the following list:

  • Lots of new modules apis
  • Better Expire Cycle
  • SSL
  • ACLs permission control
  • RESP3 agreement
  • Client Side Caching
  • Threaded I/O
  • Diskless replication on Replicas
  • Redis-benchmark clustering support and Redis-CLI optimization
  • Rewrite (Systemd support rewrite)
  • Redis Cluster agent shipped with Redis 6 (but on a different REPO)
  • The Disque module is shipped with Redis 6

2.Redis 6.0-Rc2 update logs

Hi Redis users, Redis 6 is approaching and will be released 30th of April. New release candidates will be released at the end of March, then another one mid April, to finally reach the GA at the end of April.

Redis 6 RC2 brings many fixes and new things, especially in the area of client side caching. This is the list of big changes in this release. As usually you can find the full list of commits at the end:

New features and improvements:

  • ACL LOG: log denied commands, keys accesses and authentications.
  • Client side caching redesigned. Now we use keys not caching slots.
  • Client side caching: Broadcasting mode implemented.
  • Client side caching: OPTIN/OPTOUT modes implemented.
  • Remove RDB files used for replication in persistence-less instances (option).

Fixes (only selected ones, see commits for all the fixes):

  • Different fixes to streams in edge cases.
  • Fix duplicated CLIENT SETNAME reply because of RESP3 changes.
  • Fix crash due to new active expire division by zero.
  • Avoid sentinel changes promoted_slave to be its own replica.
  • Fix bug on KEYS command where pattern starts with * followed by \x00.
  • Threaded I/O: now the main thread is used as well to do I/O.
  • Many fixes to modules APIs, and more to come in the next RCs.
  • ld2string should fail if string contains \0 in the middle.
  • Make the Redis test more reliable.
  • Fix SPOP returning nil (see #4709). WARNING: API change.

Redis 6 RC2 brings many fixes and new features, especially client-side caching. The major changes in this release are listed below.

  • ACL LOG: Records rejected commands, key access, and authentication.
  • Client caching has been redesigned. Now we use keys instead of cache slots.
  • Client cache: Broadcast mode is implemented.
  • Client caching: The OPTIN/OPTOUT pattern is implemented.
  • Delete (optional) the RDB file used for replication in non-persistent instances.
  • Fixes (selected fixes only, see submission of all fixes) :
  • Different repair of convection in the edge case.
  • Fixed duplicate CLIENT SETNAME reply due to RESP3 changes.
  • Fixed crash caused by new valid expiration divided by zero.
  • Avoid promoting sentinel changes to your own copy.
  • Fixed a bug with KEYS command starting with * followed by \x00.
  • Thread I/O: The main thread is now also used to perform I/O.
  • A number of fixes have been made to the module API and there will be more fixes in the next RC.
  • If the middle of the string contains \0, ld2String should fail.
  • Make Redis tests more reliable.

3.Redis 6.0-RC3 update log

Dear users, this is a list of the major changes in this release, please check  the list of commits for detail:

  • Fix crash due to refactoring for SSL, for the connection code.
  • Precise timeouts for blocking commands. Now the timeouts have HZ   resolution regardless of the number of connected clinets. New timeouts   are stored in a radix tree and sorted by expire time.
  • Fix rare crash when resizing the event loop because of CONFIG maxclients.
  • Fix systemd readiness after successful partial resync.
  • Redis-cli ask password mode to be prompted at startup (for additional safety).
  • Keyspace notifications added to MIGRATE / RESTORE.
  • Threaded I/O bugs fixed.
  • Implement new ACL style AUTH in Sentinel.
  • Make ‘requirepass’ more backward compatible with Redis <= 5.
  • ACL: Handle default user as disabled if it’s off regardless of “nopass”.
  • Fix a potential inconsistency when upgrading an instance in Redis Cluster   and restarting it. The instance will act as a replica but will actually be   set as a master immediately. However the choice of what to do with already   expired keys, on loading, was made from the POV of replicas.
  • Abort transactions after -READONLY error.
  • Many different fixes to module APIs.
  • BITFIELD_RO added to call the command on read only replicas.
  • PSYNC2: meaningful offset implementation. Allow the disconnected master   that is still sending PINGs to replicas, to be able to successfully   PSYNC incrementally to new slaves, discarding the last part of the   replication backlog consisting only of PINGs.
  • Fix pipelined MULTI/EXEC during Lua scripts are in BUSY state.
  • Re-fix propagation API in modules, broken again after other changes.

This release mainly fixes some bugs, as listed below:

  • Fixed connection code crash caused by refactoring SSL.
  • Used to prevent precise timeouts for commands. The timeout has now reached a HZ resolution, regardless of the number of Clinet connections. New timeouts are stored in the cardinality tree and sorted by expiration time.
  • Fixed a rare crash that occurred when the CONFIG MaxClients event loop size was adjusted.
  • Fix systemd readiness after partial successful resynchronization.
  • Redis- CLI ask password mode will be prompted at startup (to improve security).
  • Key space notifications have been added to MIGRATE/RESTORE.
  • Fixed thread I/O errors.
  • Implement the new ACL style AUTH in Sentinel.
  • Make ‘requirePass’ more backward compatible with Redis<=5.
  • ACL: If it is disabled by default, it is considered to be disabled regardless of whether it is nopass.
  • Fixed inconsistencies that could occur when upgrading instances in Redis clusters
  • -READONLY Aborts the transaction after an error.
  • Many different fixes to the module API.
  • BITFIELD_RO was added to invoke the command on a read-only copy.
  • PSYNC2: Meaningful offset implementation. Allow the disconnected host to still send pings to the replica so that PSYNC can be successfully delivered incrementally to the new slave, thereby discarding the replication backlog consisting only of Pings.
  • Fixed MULTI/EXEC for pipeline when Lua scripts are busy.
  • Re-fix the propagation API in the module and break again after other changes.

4.Redis 6.0-RC4 update log

Hi all, this the latest release candidate of Redis 6. This is likely to be very similar to what you’ll see in Redis 6 GA. Please test it and report any issue 🙂

Main changes in this release:

* Big INFO speedup when using a lot of of clients.     * Big speedup on all the blocking commands: now blocking       on the same key is O(1) instead of being O(N).     * Stale replicas now allow MULTI/EXEC.     * New command: LCS (Longest Common Subsequence).     * Add a new configuration to make DEL like UNLINK.     * RDB loading speedup.     * Many bugs fixed (see the commit messages at the end of this node)

The following are the major additions to this release:

  • Improved the query speed using the INFO command when a large number of clients are connected.
  • Much faster on all block commands: it is now possible to block O (1) instead of O (N) on the same key.
  • Old copies now allow MULTI/EXEC.
  • New command: LCS (longest common subsequence).
  • Add a new configuration to make DEL look like UNLINK.
  • RDB loading accelerated.
  • Fixed many bugs.

5.Redis 6.0.0 GA update log

Hi all, finally we have Redis 6.0.0ga! Enjoy this new Redis release. Most of the documentation was updated today so that you can likely find what you are looking for about the new features at redis.io. This is the list of what changed compared to the previoius release candidate:

  • XCLAIM AOF/replicas propagation fixed.
  • Client side caching: new NOLOOP option to avoid getting notified about   changes performed by ourselves.
  • ACL GENPASS now uses HMAC-SHA256 and have an optional “bits” argument.   It means you can use it as a general purpose “secure random strings”   primitive!
  • Cluster “SLOTS” subcommand memory optimization.
  • The LCS command is now a subcommand of STRALGO.
  • Meaningful offset for replicas as well. More successful partial   resynchronizations.
  • Optimize memory usage of deferred replies.
  • Faster CRC64 algorithm for faster RDB loading.
  • XINFO STREAM FULL, a new subcommand to get the whole stream state.
  • CLIENT KILL USER .
  • MIGRATE AUTH2 option, for ACL style authentication support.
  • Other random bugfixes.

The main content of this log update is as follows:

  • XCLAIM AOF/ Replicas propagation has been repaired.
  • Client cache: New NOLOOP option to avoid receiving changes about your execution.
  • ACL GENPASS now uses HMAC-SHA256 and has an optional “bit” parameter. This means you can use it as a generic “safe random string” raw!
  • Memory optimization of the cluster “SLOTS” subcommand.
  • The LCS command is now a STRALGO subcommand.
  • The meaningful offset of the copy. The more successful parts are resynchronized.
  • Optimize memory usage for delayed recovery.
  • The faster CRC64 method loads the RDB faster.
  • XINFO STREAM FULL, a new subcommand to get the status of the entire STREAM.
  • CLIENT KILL USER < USER name >.
  • MIGRATE AUTH2 option for ACL-style authentication support.
  • Fixed some other bugs.

Redis 6.0.1 is available for download at redis.io/

The official update log (English) : raw.githubusercontent.com/antirez/red…

conclusion

The main features of Redis 6.0 are:

  • A number of new modules apis are available
  • Client side caching is provided
  • Multithreaded I/O capabilities
  • Improved the loading speed of RDB logs
  • Several bug fixes and some optimizations

The multithreaded I/O capability is one of the features we are most concerned about, and some people use it to make a performance comparison with the single-threaded version, as shown in the following figure:

As you can see from the above results, the performance of the GET/SET command in the multi-threaded version is double that of the single-threaded version.

In general, Redis 6.0 brings us great functions and is very practical, but the version changes too much, we need to wait for the verification of time and a lot of testing before recommending to put into production environment.

The last word

Original is not easy, if you think this article is useful to you, please click on a “like”, this is the biggest support and encouragement to the author, thank you.

Reference & acknowledgements

Redis official documentation

Follow the public account “Java Chinese community” reply “dry goods”, obtain 50 original dry goods Top list.