Home  >  Article  >  Database  >  When do you need to use redis?

When do you need to use redis?

藏色散人
藏色散人Original
2019-05-21 14:44:2114431browse

When do you need to use redis?

redis is a key-value storage system. Similar to Memcached, it supports relatively more stored value types, including string (string), list (linked list), set (set), zset (sorted set - ordered set) and hash (hash type).

When do you need to use redis?

● Does not require real-time updates but extremely consumes database data. For example, the product sales ranking list on the website can be counted once a day, and users will not pay attention to whether it is real-time.

● Data that needs to be updated in real time, but the update frequency is not high. For example, a user's order list would definitely like to be able to see the orders he has placed in real time, but most users will not place orders frequently.

● Data that is highly visited at a certain moment and updated frequently. A typical example of this kind of data is the flash sale. At the moment of the flash sale, there may be N times as much traffic as usual, and the system will be under great pressure. However, the cache used for this kind of data cannot be the same as the ordinary cache. This cache must be guaranteed not to be lost, otherwise there will be big problems.

The above is the detailed content of When do you need to use redis?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn