Redis 6 arrives with multithreading for faster I/O

With I/O threading enabled, the new version of Redis can serve up to twice as many operations as before on a single instance, say creators

Redis 6 arrives with multithreading for faster I/O
Thinkstock

Redis 6, the newest version of the in-memory database and cache system, moved to general availability today. The release introduces many new features while maintaining nearly complete backward compatibility with Redis 5.

Among the most significant changes in Redis 6 is threading for I/O, a long-desired feature now available as an option. With I/O threading enabled, Redis’s creators claim the database can serve up to twice as many operations as before on a single instance.

Redis’s developers have traditionally resisted adding threads because they believe it is difficult to implement without compromising Redis’s sharded and shared-nothing architecture. However, forks of Redis including Thredis and KeyDB provide their own implementations of threading; KeyDB claims up to a fivefold improvement in performance by doing so. Redis 6 implements threading to a lesser extent than those forks, but nevertheless yields significant performance improvements, without making major architectural changes.

Redis 6 also introduces several major security features. Access control lists within Redis let you restrict users to certain commands or to certain key patterns. Another key security addition is support for SSL on all channels, even when Redis isn’t exposed on a public-facing connection. Using SSL even for non-public communications between software components has become standard practice.

Redis’s module system, introduced in version 4 to allow Redis functionality to be expanded by third-party developers, receives a slew of new APIs in version 6. For instance, arbitrary module data can be stored in RDB files (the on-disk binary format for a Redis in-memory store) and many more server and client events can be hooked, captured, and rewritten.

Redis 6 also brings experimental support for client-side caching of values; expanded support for diskless (memory-to-memory) replication; a new protocol, RESP3, which allows better type inference on responses; and more tunable but fundamentally faster eviction of expired keys.

Copyright © 2020 IDG Communications, Inc.