Is redis a database?
Redis is amemory developed by Italian Salvatore Sanfilippo (screen name: antirez) Cache database. The full name of Redis is: Remote Dictionary Server (remote data service). The software is written in C language. Redis is a key-value storage system. It supports rich data types, such as: string, list, set, zset (sorted set), hash.
Recommended: "Redis Video Tutorial"
Features of Redis
Redis uses memory as the data storage medium, so it can read and write The efficiency of data is extremely high, far exceeding that of databases. Taking setting and getting a 256-byte string as an example, its reading speed can be as high as 110,000 times/s and its writing speed can be as high as 81,000 times/s.
The difference between Redis and memcache is that the data stored in Redis is persistent, and the data will not be lost after a power outage or restart. Because Redis's storage is divided into three parts: memory storage, disk storage and log files, after restarting, Redis can reload data from the disk into the memory. These can be configured through the configuration file. Because of this, Redis can achieve persistence. change.
Redis supports master-slave mode and can configure clusters, which is more conducive to supporting large-scale projects. This is also a highlight of Redis.
The above is the detailed content of Is redis a database?. For more information, please follow other related articles on the PHP Chinese website!