Redis 12 Redis cluster construction

Related articles: Redis – 01 – what is redis Redis – 02 – source package installation on Linux Redis – 03 – possible problems in installing redis Redis – 04 – configure redis to start automatically Redis – 05 – redis common data types Redis – 06 – RDB of redis persistence mode Redis – 07 – AOF UTF-8...

Posted by bladx on Sat, 07 May 2022 21:09:54 +0530

Redisson implements distributed locks

The previous article introduced the use of setnx command to implement distributed locks, but this method is not so rigorous. We need to do some additional operations (setnx + lua) to ensure the robustness of locks. redisson has made some encapsulation for this, so that the application can be muUTF-8...

Posted by Wldrumstcs on Sun, 08 May 2022 21:41:21 +0530

[Redis] objective offline

In the sentinelHandleRedisInstance function, if it is the primary node, you need to do the following: void sentinelHandleRedisInstance(sentinelRedisInstance *ri) { // Omit... // If it is the primary node if (ri->flags & SRI_MASTER) { // Check for subjective offline sentinelCheckObjectivelyDown(UTF-8...

Posted by vickytam on Wed, 11 May 2022 19:35:22 +0530

"Java" understands the principle of CAS implementation

Let's take a look at the concept first, the full name of [CAS] is "CompareAndSwap", the Chinese translation is "compare and replace". definition: CAS The operation consists of three operands - the memory location ( V),expected value ( A),and the new value ( B). If the value of the memory locaUTF-8...

Posted by rwwd on Wed, 11 May 2022 23:33:11 +0530

dict of redis source code

Everyone knows that redis has 16 DBs by default, but what is the underlying design structure of these DBs?Let's take a brief look at the source code, the important fields are all annotated typedef struct redisDb { dict *dict; /* The keyspace for this DB Dictionary data structure, very importantUTF-8...

Posted by sapoxgn on Thu, 12 May 2022 01:15:27 +0530

From 7 minutes to 10 seconds, Mybatis batch processing is too strong

This article will take you step by step to uncover the mystery of batch processing from the perspective of a novice. It may be of great help to students who write Mybatis batch processing for the first time. I suggest collecting some praise~ There are many ways to process batch processing. The UTF-8...

Posted by hamzatki on Fri, 13 May 2022 01:53:47 +0530

Principle and implementation of handwriting cache framework redis expire from scratch

preface We are From zero handwriting cache framework (1) to achieve a fixed size cache Our cache has been preliminarily implemented in. In this section, let's learn how to implement the expire function similar to that in redis. Expiration is a very useful feature. For example, I want to put my UTF-8...

Posted by karimali831 on Sat, 14 May 2022 05:11:35 +0530

java practice of redis

redis official website redis data structure String type string Hash type hash : map format List type list : linkedlist format collection type set Sorted set type sortedset : non-repeating, sorted String type Set redis> SET mykey "Hello" OK redis> GET mykey "Hello" redis> Get redis> GET nonexistUTF-8...

Posted by bigscanner on Sat, 14 May 2022 09:01:52 +0530

Redis usage notes

1. Introduction to Redis Redis(Remote Dictionary Server - Remote Dictionary Service) is a key-value storage system written by Salvatore Sanfilippo. Redis is an open source log-type, key-value database written in ANSI C language, complies with BSD protocol, supports network, can be memory-based UTF-8...

Posted by gnize on Sat, 14 May 2022 19:54:58 +0530

Dock set up redis Cluster

use Docker build redis Cluster,The most important link is the problem of container communication. This article mainly practices after using multiple containers Redis Cluster Construction of cluster environment According to Redis official website: https://redis.io/docs/manual/scaling/ In order UTF-8...

Posted by phpwolf on Sun, 15 May 2022 02:16:34 +0530