Back-end Interview Speaking Skills Collection Chapter 8: Redis Interview Speaking Skills

This is the eighth blog post of the back-end interview collection - redisinterview skills❗❗❗

1. Introduce redis


RedisIt is a non-relational database, which is mainly used in our project to store hot data, reduce the pressure on the database, single-threaded pure memory operation, and adopts a non-blocking multiplexing mechanism, which is single-threaded monitoring, used in our project IOto springdata-redisoperate redis.

There are many places used in our project redis. For example, the hot data on the home page and the data in the data dictionary are all stored in hot words to improve access speed.

redisThere is5 a data type: string、list、hash、set、zset, we commonly use string, listand hash.

  1. Some simple key-valuetypes are stored in stringthe type, such as some system switches, whether to open registration, etc.

  2. There are also some stored in hash, for example, the recommended data and popular data of our homepage are all stored in hash. A fixed string is used as the key, the id of each piece of data is used as the field, and the corresponding data is stored as the value

redisThere are also two persistence methods:

  1. One is that RDBthis is also redisthe default persistence method.

    • This method stores data in the form of snapshots, within a fixed period of time such as

おすすめ

転載: blog.csdn.net/lvoelife/article/details/132554534