Database Management System Release , which belongs to the NoSQL class of systems. Redis provides functionalities similar to Memcached for storing data in key/value format, enhanced by support for structured data formats like lists, hashes, and sets, as well as the ability to execute server-side script processing in Lua. The project's code is licensed under BSD. Additional modules, offering advanced capabilities for enterprise users, such as RediSearch, RedisGraph, RedisJSON, RedisML, and RedisBloom, have been available under a proprietary RSAL license since last year. The development of open variants of these modules under the AGPLv3 license continues through the project .
Unlike Memcached, Redis provides persistent storage of data on disk and ensures the integrity of the database in the event of a crash. The project's source code is distributed under the BSD license. Client libraries are available for most popular programming languages, including Perl, Python, PHP, Java, Ruby, and Tcl. Redis supports transactions that allow users to execute a group of commands in one step, ensuring consistency and sequence (commands from other requests cannot interleave) during the execution of a specified set of commands, and in case of problems allows for changes to be rolled back. All data is fully cached in RAM.
To manage data, commands such as increment/decrement, standard operations on lists and sets (union, intersection), renaming keys, multiple selections, and sorting functions are provided. Two storage modes are supported: periodic data synchronization to disk and maintaining a change log on disk. In the latter case, full integrity of all changes is guaranteed. It is also possible to organize master-slave data replication across multiple servers, carried out in a non-blocking mode. A publish/subscribe messaging mode is also available, in which a channel is created, from which messages are distributed to clients by subscription.
Key , added in Redis 6.0:
- By default, the new RESP3 protocol is suggested, but the connection starts in RESP2 mode and the client switches to the new protocol only if the new HELLO command is used during the connection negotiation. RESP3 allows complex data types to be returned directly without the need to convert common arrays on the client side, while differentiating the returned types.
- Support for access control lists (), which allow precise definition of which operations the client can perform and which it cannot. ACLs also provide a safeguard against potential development errors; for example, a handler that executes only the BRPOPLPUSH operation can be prohibited from executing other operations, ensuring that if a debug-added FLUSHALL call is inadvertently forgotten in the working code, it won't cause issues. The implementation of ACLs does not incur additional overhead and has little impact on performance. Interface modules are also prepared for ACLs, allowing the creation of custom authentication methods. The command 'ACL LOG' is available to view all recorded ACL violations. To generate unpredictable session keys, the 'ACL GENPASS' command has been added, which uses HMAC based on SHA256.
- Support for encrypting the communication channel between the client and the server.
- caching data on the client side. Two modes are available for synchronizing the cache on the client side with the database state: 1. Storing keys on the server that the client has previously requested to inform it of the outdated state of the entry in the client cache. 2. The 'broadcasting' mechanism, in which the client subscribes to certain key prefixes and the server notifies it of changes to keys that fall under these prefixes. The advantage of the 'broadcasting' mode is that it does not require additional memory on the server to store a map of values cached on the client side, while the downside is an increase in the number of messages transmitted.
- The Disque message broker, allowing Redis to be used for message queue processing, has been moved out of the basic set into .
- Added , a proxy for a cluster of Redis servers that allows the client to operate with multiple Redis servers as if they were a single instance. The proxy can route requests to nodes with the necessary data, multiplex connections, reconfigure the cluster in case of node failures, and execute queries that span multiple nodes.
- The API for writing modules has been significantly improved, essentially transforming Redis into a framework for building modular add-on systems.
- A replication mode has been implemented where RDB files are immediately deleted after they have been used.
- The PSYNC2 replication protocol has been enhanced, allowing for more frequent partial resynchronizations by increasing the chances of identifying offsets common to both the replica and the master.
- The loading of RDB files has been accelerated. Depending on the contents of the file, the speedup ranges from 20% to 30%. The execution of the INFO command has been significantly sped up with a large number of connected clients.
- A new STRALGO command has been added with implementations of complex string processing algorithms. Currently, only one algorithm LCS (longest common subsequence) is available, which can be useful for comparing RNA and DNA sequences.
Source: opennet.ru
