Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points of Redis cache

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the knowledge points of Redis cache". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the knowledge points of Redis cache".

Consistency between cache and database

Consistency refers to:

If there is data in the cache, then the cached data value needs to be the same as the value in the database

If there is no data in the cache itself, the value in the database must be the latest value.

Cache avalanche

Cache avalanche means that a large number of application requests cannot be processed in the Redis cache, and then the application sends a large number of requests

Send it to the database tier, resulting in a surge of pressure on the database tier.

A large amount of data in the cache expires at the same time.

When the data is saved in the cache and the expiration time is set, if at a certain time, a large amount of data expires at the same time, and the application accesses the data, the cache loss will occur. Immediately after that, the application sends the request to the database and reads the data from the database.

Fine-tune the expiration time

When you set the expiration time for each data with the EXPIRE command, increase the expiration time for that data

Add a smaller random number

Service degradation redis service outage implements service breaker or request current limit mechanism in the business system. Cache breakdown

Cache breakdown means that a request for a hot data accessed very frequently cannot be processed in the cache, and then a large number of requests to access the data are sent to the back-end database at once, resulting in a surge of pressure on the database, which will affect the database processing of other requests.

When the hot spot data expires

Set hotspot data without setting expiration time

Cache penetration

Cache traversal means that the data to be accessed is neither in the Redis cache nor in the database, resulting in a cache loss when the request accesses the cache, and when you go to access the database, you find that there is no data to be accessed in the database.

Misoperation of business layer

The data in the cache and the data in the database are deleted by mistake, so there is no data in the cache or database.

Malicious attack

Specialize in accessing data that is not in the database.

Thank you for your reading, the above is the content of "what are the knowledge points of Redis cache?" after the study of this article, I believe you have a deeper understanding of what are the knowledge points of Redis cache, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report