8.1. General information about Redis
Redis (REmote DIctionary Server) — data storage system of type «key-value» in working memory. Due to the simplicity and high speed of operation, it is used for caching, systems «subscriberpublisher» and other tasks that require maximum performance. Allows you to store not only strings, but also arrays, dictionaries, sets without repetitions, sorted sets and other data structures. It also supports transactions (when either all operations are performed sequentially, or none) and batch processing of commands (first a series of commands are executed, then a series of results are obtained).
Redis is available on hosting in two variants:
- Single service - the full version, which has the following advantages:
- Support for external connections.
- User management, configuration and access restriction.
- Autosave data to disk and restore it in memory when the service is stopped and restarted.
- Restoreable daily automatic backups.
- Additional service - a version with limited features that can only be used within the hosting account.
Plans
Available rates vary:
- The amount of RAM.
- The number of databases.
- The number of IP addresses for access restrictions.
- The number of concurrent connections.
In the process of using Redis tariff can change.
Members
To create, modify and delete users, view their list and access rights in the section «Redis» in the instance bar, click «Members»:
System user «Default» to connect to Redis only by password, without specifying a login or with a login of a non-existent user. Suitable for use with older clients that only support password authentication.
You can connect to Redis no password, but without authorization, the data will not be available.
Access rights:
- Data access — the ability to read and write data by keys.
- Access to pub/sub - the ability to use the event subscription system Redis Pub/Sub.
Memory usage
To view statistics on memory usage and control the mode of its cleaning when full, in the section «Redis» in the instance bar, click «Memory usage»:
Button «Memory cleaning mode» on the page with diagrams allows you to choose the behavior of Redis when the available memory is full:
- Do not delete anything or allow new data to be written.
- Save recently used keys, delete the most recently used ones.
- Keep frequently used keys, delete rarely used ones.
- Delete the most recently used keys with the expire field set to true.
- Delete least frequently used keys with expire field set to true.
- Delete random keys.
- Delete random keys with expire field set to true.
- Delete keys with the expire field set to true and the smallest remaining time-to-live (TTL) value.