Remote Dictionary Server - Redis - is an in-storage data store used as a key-value database, message broker, cache and queue. It has become a popular choice for a range of functions such as pub/sub apps, caching, messaging, real-time analytics and session management. Real-world applications for the data fabric include healthcare, financial services and the Internet of Things (IoT).
Spatial indexes, HyperLogLogs, sets, streams, lists and bitmaps are some of the data structures supported by the server. The software is open source with a 3-clause BSD licence. Salvatore SanFilippo developed the project for his startup as a solution to a database problem. He needed a data structure that could scale his real-time weblog analyser. The first programming language was Tcl, but it later changed to C.
There are also server-side Lua scripts in version 2.6. Java, Ruby and R are just some of the supported languages. The structured storage system is designed to store abstract data types, not just strings. Sets of strings, hash tables and lists of strings are some of the data types supported.
How Redis works
Instead of SDD or hard disk storage as used by other structured Databases Redis manages its data in an internal memory. For this reason, the server answers requests within microseconds, as there is no time delay. The structured memory has several levels of on-disc persistence. AOF persistence allows the server to log each received operation, which it then replays at startup. In doing so, the original record is recreated. Command logging is in append-only. The RDB option takes snapshots at intervals.
Alternatively, you can use RDB and AOF at the same time. In this case, AOF takes over the record reconstruction as it provides the complete version. The data structure also offers the option to deactivate persistence. This option is suitable if you only want to save data when the server is running.
Redis is one of the best data structures that combine caching and storage. It was developed to make data readable from the storage disk. The data storage format does not allow random access. Another key difference is that it does not require users to enter a query in order to run the database module. It works with specific commands for specific types of data. Therefore, data must be available for quick retrieval.
Master replica replication is another element of structured storage. This means that one replica can act as a master for another. A replication tree with a root is created with the help of the server. Replicas from the data structure enable write configurations. Since 2015, the software has also been available with clustering in version 3.0.