The new version of the database engine Redis 6.0 has already been released and the new RESP3 protocol arrives as the main feature of this version, among other things. For those who do not know of this database engine they should know that it is related to the NoSQL systems class.
Redis provides Memcached-like functions to store key / value data, enhanced with support for structured data formats like lists, hashes, and sets, as well as the ability to run server-side scripting scripts in Lua.
Unlike Memcached, Redis provides permanent data storage on disk and ensures the security of the database in the event of an emergency shutdown.
For data management, provide commands like increment / decrement, standard operations on lists and sets (union, intersection), key renaming, multiple selections and sorting functions.
Se support two storage modes: periodic data synchronization on disk and change log on disk. In the second case, the complete security of all changes is guaranteed. It is possible to organize master-slave data replication across multiple servers, performed in non-blocking mode. Publish / subscribe message mode is also available, in which a channel is created, the messages of which are distributed to customers by subscription.
What's new in Redis 6.0?
Default, a new RESP3 protocol is proposed, but the connection starts in RESP2 mode and the client switches to the new protocol only if a new command is used when negotiating the connection. RESP3 allows you to directly return complex data types without the need to convert common arrays on the client side and separate the return types.
Another of the changes that stands out in this new version is the saccess control list support which allows to determine precisely which operations the customer can perform and which cannot.
ACL implementation does not imply additional overhead and it has practically no effect on performance. The interface modules have also been prepared for ACL, allowing you to create your own authentication methods. To view all logged ACL violations, the ACL LOG command is provided. To generate unpredictable session keys, the "ACL GENPASS" command has been added, using HMAC based on SHA256.
We can also find the sSupport for client-side data caching. There are two modes available To reconcile the client-side cache with the database state:
- Store in the server keys that the client previously requested to inform you of the loss of relevance of the record in the client's cache.
- The "broadcast" mechanism, in which the client subscribes to certain key prefixes and the server notifies this if the keys within these prefixes change. The advantage of the "broadcast" mode is that no additional memory is wasted on the server to store a card of cached values on the client side, but a minus on an increase in the number of transmitted messages.
Cluster Proxy was added, a proxy for a Redis server cluster, which allows you to organize your client's work with multiple Redis servers, as in an instance. A proxy can route requests to nodes with the necessary data, multiplex connections, reconfigure the cluster in case of node failures, and execute requests that span multiple nodes.
Significantly improved API for writing modules, essentially turning Redis into a framework that allows you to create systems in the form of plug-ins.
The PSYNC2 replication protocol has been improved, This has allowed partial resynchronization to be performed more frequently, by increasing the chances of identifying a common offset to the replica and the master.
And it also stands out faster loading of RDB files. Depending on the fill of the file, the acceleration is 20 to 30%. Significantly faster execution of the INFO command in the presence of a large number of connected clients.
Finally, if you want to know more about it or download the new version, you can do it from the following link