Redis cache breakdown, cache penetration, cache avalanche solution (with code)

In our daily use of redis development, cache penetration, breakdown and avalanche are unavoidable problems. It is also a question we are often asked during the interview. Next, we will explain a variety of solutions to these three kinds of problems. Buffer breakdown Cache breakdown means that a Key is very hot and is accessed with high ...

Added by mecha_godzilla on Sun, 27 Feb 2022 08:42:11 +0200

[Spring] three level cache and circular dependency in Spring

In the last article, we talked about the life cycle of springbeans and knew the process of instantiation, creation and destruction of springbeans, but we know that Spring supports one Bean to introduce other Bean objects, so the problem of interdependence is inevitable. How does Spring solve this problem? There are many ways for Spring to regis ...

Added by WormTongue on Fri, 25 Feb 2022 13:51:15 +0200

Go concurrency control, anti breakdown - singleflight

background In high concurrency scenarios, there are often concurrent accesses to the same resource. These concurrent request parameters are the same, and the response results are the same. If each request repeatedly queries the resource, it will undoubtedly bring unnecessary overhead to the system and increase the system pressure. In order t ...

Added by system_critical on Thu, 24 Feb 2022 16:51:56 +0200

06 redis architecture design and application practice

Redis master-slave replication brief introduction The read-write capability supported by a single redis is still limited. At this time, we can use multiple redis to improve the concurrent processing capability of redis. How these redis cooperate requires a certain architecture design. Here, we first analyze and implement the master / slave ar ...

Added by genie on Thu, 24 Feb 2022 13:36:46 +0200

Persistent data of Redis

Why persist   all the data of Redis is in memory. If it goes down suddenly, all the data will be lost. Therefore, persistence is needed to ensure that the data of Redis will not be lost due to failure. When Redis is restarted, the persistence file can be reloaded to recover the data; Redis persistence related configuration Configure in ...

Added by toppac on Wed, 23 Feb 2022 04:01:05 +0200

Redis -- 02 -- redis string structure and Application

1 string Character array, redis string is a binary security string, which can store binary data such as pictures, as well as through Binary data compressed by tools such as messagepack or protobuffer. The internal actual storage can adopt int, embstr and raw storage according to the data characteristics of string (use object encoding key to v ...

Added by ten31studios on Tue, 22 Feb 2022 15:35:15 +0200

Redis persistence, master-slave replication and sentinel mode

1, Redis persistence RDB snapshot By default, redis saves the in memory database snapshot in the name dump RDB binary file. Redis can be set (save N M) to automatically save the dataset (the whole memory at the current time) as an RDB file when the condition of "at least M changes to the dataset in N seconds" is met. You can also en ...

Added by alexcrosson on Mon, 21 Feb 2022 18:01:27 +0200

Session is shared with Cookie, deployment memcached and session

nginx problem handling 1. Cache files on the client If the user repeatedly accesses the same file of the server, it can be cached to the client to avoid the server repeatedly transmitting the same file and save time Open the configuration file and add a location under the default location location ~* \.(jpg|html|txt|mp3) ${/ / when it i ...

Added by PyraX on Mon, 21 Feb 2022 13:48:02 +0200

Problems encountered in building Redis clusters from scratch

Install Redis Download package On the official website https://redis.io/download install Download redis-6.2.6 tar. GZ file Use Xshell to transfer files into the virtual machine Using sftp protocol, the host ip is the ip address in ens33 in ifconfig on the command line. For the first time, you need to enter the virtual machine login acc ...

Added by alan543 on Sun, 20 Feb 2022 20:35:15 +0200

Redis weapon CSRedis under NetCore

It should be very common for everyone to use redis cache in the project. We used stackexchange before Redis. Inadvertently browsed a post * * net core 2.0 redis driver performance competition * *, it is found that there are two shorter and stronger components: CSRedis and newlife Redis is actually like servicestack Redis . ServiceStack.Redis ...

Added by dm3 on Sun, 20 Feb 2022 03:51:24 +0200