Redis [II] practical application

catalogue 1, Distributed lock 1. Implementation principle 2. Timeout problem 3. Reentrancy 2, Delay queue 1. What if the queue is empty 2. Idle connection is automatically disconnected 3, Bitmap 1. Basic usage 2. Statistics and search 3.BITFIELD instruction 4, Hyperlog (base valuation) 5, Bloom filter 6, Simple current limiting 7 ...

Posted by Scrumpers on Sun, 30 Jan 2022 09:41:37 +0100

Spring Cache + Redis implements caching

Spring Boot cache Several important concepts & cache annotation CacheCache interface, which defines cache operations. Implementations include RedisCache, EhCacheCache, ConcurrentMapCache, etcCacheManagerThe Cache manager manages various Cache components@CacheableIt is mainly for method configuration, and the results can be cached accordin ...

Posted by chriskiely on Sun, 30 Jan 2022 01:04:37 +0100

Publish redis stand-alone pseudo cluster under window s (redis version 5 or above)

catalogue 1, Download windows version of redis 2, Unzip redis to a directory 3, Create cluster node directory 4, Register windows services 5, Create cluster 6, Testing 7, Summary and expansion 1, Download windows version of redis Baidu online disk: https://pan.baidu.com/s/19LVXqtp8lHNRqeYQkc8CKA  Extraction code: v5oj win_ The current ...

Posted by longhorn14 on Sat, 29 Jan 2022 20:06:34 +0100

[practical tutorial] deploy Redis applications on instances equipped with persistent memory

Introduction: instances equipped with persistent memory (such as re7p, r7p and re6p) provide a large CPU memory ratio. Redis applications running on such instances can greatly reduce the cost of single GiB memory. Taking some operating systems as examples, this paper introduces how to quickly deploy redis applications on such instances.Instance ...

Posted by gershon on Sat, 29 Jan 2022 17:00:29 +0100

Redis source code read the multithreading of Redis 6.0

Redis single thread refers to that the thread of event loop is single, and command execution mainly depends on a single thread. Redis uses single thread because it is fast based on memory, and multiplexing can ensure that redis can process multiple requests at the same time. The introduction of multi thread in Redis 6.0 is because some operatio ...

Posted by FijiSmithy on Sat, 29 Jan 2022 10:23:52 +0100

Build redis cluster based on docker container (3 master and 3 slave)

Build redis cluster based on docker container (3 master and 3 slave) 1, Container preparation Pull the centos basic image from the image warehouse, then create the container, initialize the environment, install some common commands and environment dependencies such as gcc, tar, ssh and telnet, and then create the test01 user and set the passw ...

Posted by Addos on Sat, 29 Jan 2022 08:26:02 +0100

Concurrent programming -- three implementation methods of distributed lock

Understanding of using distributed locks Each distributed lock has its advantages and disadvantages. In extreme cases, such as NPC, there may be wrong results and it is unsafe, as shown in the figure below (both clients think they have obtained the lock), NPC refers to Network Delay; Process Pause, Process Pause (GC) [such as JAVA GC]; Clock ...

Posted by Gump on Sat, 29 Jan 2022 04:59:24 +0100

Reading the underlying data structure of Redis source code

Redis's extreme encapsulation of the underlying data structure is one of the reasons for redis's efficient operation. We analyze it in combination with redis source code.1, Data type encapsulation of ValueObject structure in Redis: redisObject structuretypedef struct redisObject { unsigned type:4; // Type of object, string / list ...

Posted by Chief on Sat, 29 Jan 2022 02:43:49 +0100

Redis realizes dynamic rate control

1. Background Recently, a third-party interface has been accessed, which limits the frequency of interface calls (single user Id, 30 operations / min). However, the interface does not prompt that the frequency limit is exceeded, indicating that the interface call is successful, but the actual business is not running, and the requests exceeding ...

Posted by gunslinger008 on Sat, 29 Jan 2022 01:57:27 +0100

redis-full-check checking tool

brief introduction redis-full-check is an open source tool used by the Redis&MongoDB team in Aliyun to verify the consistency of the two redis data and is often used to verify the correctness of the redis data migration (redis-shake). Support: Homogeneous or heterogeneous comparisons between single-node, master-slave, cluster, proxy cloud ...

Posted by newman on Fri, 28 Jan 2022 21:03:54 +0100