Cache elimination algorithms LRU and LFU

Caching is a computer thinking. For repeated calculations, cache the results. The next time you calculate this task, you don't go to the real calculation, but directly return the results, which can speed up the processing speed. Of course, for some things that will change over time, the cache will fail and have to be recalculated. For example, ...

Posted by fiztec on Wed, 25 May 2022 21:58:16 +0300

spring boot: use redis+lua to limit the frequency of sending SMS verification codes (spring boot 2.3.2)

1. Why limit the sending frequency of SMS verification codes? 1, SMS verification code Each SMS has cost constraints, Certainly can not be brushed the random hair of the interface And the interface is brushed will affect the user's experience, Affect the normal access of the server, So even with the protection of graphic verification codes, etc ...

Posted by shashiku on Wed, 25 May 2022 21:42:39 +0300

redis-cluster is built according to wiki learning records, adding and deleting nodes, and failover

Node planning Three masters and three slaves master slave node-1 192.168.0.142 6379 192.168.0.142 26379 node-2 192.168.0.143 6379 192.168.0.143 26379 node-3 192.168.0.144 6379 192.168.0.144 26379 16379 Messaging port 36379 Messaging port Directory Planning installation manual /usr/local/redis4 config file directory /u ...

Posted by RTT on Wed, 25 May 2022 09:21:28 +0300

Cluster node management of Redis service

The previous blog mainly talked about the deployment configuration of redis cluster, the construction of the ruby ​​environment required by the redis.trib.rb tool, the creation of the redis.trib.rb tool, and the viewing of cluster-related information. For a review, please refer to https://www.cnblogs.com/qiuhom-1874/p/13442458.html ; Today we w ...

Posted by GB_001 on Mon, 23 May 2022 22:14:20 +0300

Introduction to Redis

summary https://baike.baidu.com/item/Redis/6549233?fr=aladdin Baidu Encyclopedia Basic knowledge redis has 16 databases by default, and the 0 database is used by default. You can use the * * select * * command to switch Connected. my:0>select 3 # Switch database "OK" my:3>dbsize # View DB size "0" my:3> Other commands ...

Posted by manalnor on Mon, 23 May 2022 07:29:25 +0300

Prevent repeated submission of AOP + annotation

Idempotent problem Definition of idempotency in Http/1.1: one and multiple requests for a resource should have the same result for the resource itself (except for problems such as network timeout). In other words, any number of executions will have the same impact on the resource itself as one execution Under what circumstances is idempotent ...

Posted by aspekt9 on Sun, 22 May 2022 05:04:51 +0300

Redis intersection union difference set

introduce Intersection: an element that appears at least twice in all setsUnion: combine the elements of multiple sets and remove the duplicate elementsDifference set: an element that exists in the first set and does not exist in other sets Related commands commandexplainsinter key [key ...]Gets the intersection of all setssinterstore desiti ...

Posted by KoopaTroopa on Sun, 22 May 2022 02:45:39 +0300

redis sentinel mode

Sentinel mode (automatic election mode) summary The method of master-slave switching technology is: when the master server is down, a slave server needs to be manually switched to the master server, which requires manual intervention, which is laborious and laborious, and the service will not be available for a period of time. This is not a r ...

Posted by ron814 on Sat, 21 May 2022 18:52:19 +0300

Redis data type (hash type)

hash type and operation ① Overview The hash type in Redis can be understood as a map container with String Key and String Value, so the hash type is suitable for storing value object information. Such as Username, Password or Age. Even if there are only a few fields in the hash, its data only takes up a small amount of disk space. Each ha ...

Posted by daniel_grant on Sat, 21 May 2022 04:01:06 +0300

Interviewer: talk about redis6 Three ways to build cluster in version 0

Friends interested in PHP back-end technology and PHP architecture technology, my official group Click here , study together and discuss with each other. There are already managers in the group to sort out the knowledge system (source code, learning videos and other materials). Welcome to add the group for free. 1, Single node instance The s ...

Posted by alex.hughson on Fri, 20 May 2022 17:24:46 +0300