Redis (Remote Dictionary Server) is a database management system based on non-SQL (Structured Query Language). The main difference is that the program works with the data cache, and not with the values directly. This improves performance when working with databases (DB) several times.
The information that Redis works with is stored in the form of a “dictionary”. Each key has a single value.
If we draw an analogy with the storage market (data storage systems), then Redis is like Pure Storage. Narrow specialization and maximum performance.
Features
The main parameters that distinguish Redis from other DBMS (database management systems):
- The amount of data that Redis works with does not exceed the amount of RAM.
- It works with different types of data: lowercase, list, numeric, hash tables, etc.
- There is no differentiation between users or groups within Redis. There is no access control.
- The DBMS supports scalability. Clients can create multiple nodes with one master node, as well as clusters.
- The product does not work with the query language (SQL), but according to the key-value scheme.
- Redis supports replication. Information can be transferred from the main node to other nodes an infinite number of times, depending on the settings.
- In case of data loss, recovery is performed in one of two ways. The first one involves working with snapshots, and the second one is a preemptive recording log.
- Sentinel software is used to manage Redis nodes, which is included in the distribution. It supports monitoring, notification system, auto-switching to the active node and other functions.
- The DBMS supports many programming languages: Python, Ruby, PHP, Perl, Java, etc.
Areas of application
Redis is used in certain areas of data processing, for example, when working with Machine Learning as a fast data warehouse. Thanks to the software product, a huge amount of data is processed in a short period of time.
Another option is real—time data analytics. For example, Amazon Kinesis uses Redis as a storage of information in memory for further processing. Delays in this approach are measured in milliseconds.
The third option involves working together with relational databases. Redis is used as a highly accessible cache for downloading videos, metadata, saving the most frequently repeated database requests, etc.
In the web sphere, Redis is used for chats or news feeds. The product creates queues using a simplified algorithm, which increases performance with multiple simultaneous requests.
Redis also supports working with geodata in real time. It is added to the software to perform various operations instantly. For example, determining the user’s location or calculating the distance between the client and the endpoint.
Redis is best suited for use as a temporary storage with high data processing speed in conjunction with another DBMS (for example, MySQL). Reliability and fault tolerance are provided by integrated data replication and recovery mechanisms.