01 redis cache and common data types

1 Introduction 1.1 background In our current project architecture, the Web server (Tomcat) and database are basically deployed independently and monopolize the server resources. With the growth of the number of users, concurrent reading and writing to the database will increase the pressure on database access and lead to performance degradati ...

Added by gavinandresen on Thu, 09 Dec 2021 07:29:19 +0200

Internship stepping on the pit: why doesn't my redis lock take effect in the cluster scenario? Threads on other machines are unlocked?

Today, when I was in the group codereview, I was found out by the bosses that my program was written and shared. Some of the code involved internal secrets. I tried to describe it clearly with comments scene I'm a conversation scenario. I need to lock the group session and then reply automatically. That is, when a message comes in, I can't le ...

Added by noeledoran on Tue, 07 Dec 2021 11:25:42 +0200

Spring Boot + Redis implements interface idempotency. It's great to read this article

introduce The concept of idempotency is that the impact of any multiple executions is the same as that of one execution. According to this meaning, the final explanation is that the impact on the database can only be one-time and cannot be processed repeatedly. The means are as follows Create a unique index of the databasetoken mechanismPessi ...

Added by mits on Mon, 06 Dec 2021 22:31:13 +0200

Redis master-slave architecture

Steps for setting up redis master-slave architecture and configuring slave nodes: 1. Make a copy redis.conf file 2. Modify the relevant configuration to the following values: port 6380 pidfile /var/run/redis_6380.pid # Write the pid process number to the pidfile configuration file logfile "6380.log" dir /usr/local/redis‐5.0.3/data/6380 # Spec ...

Added by dlester on Wed, 01 Dec 2021 11:37:17 +0200

How to play Fluid + JuiceFS in Kubernetes cluster

Yunzhisheng Atlas team began to contact and follow up JuiceFS storage in early 2021, and has accumulated rich experience in Fluid use in the early stage. Recently, the cloud voice team and the jucedata team have jointly developed the Fluid jucedas acceleration engine, enabling users to better use the jucedas cache management capability in the K ...

Added by overlordhu on Wed, 01 Dec 2021 11:30:24 +0200

redis notes

target Be able to tell the common data types of redis You can use redis's string operation command Can use the hash operation command of redis You can use the list operation command of redis You can use the set operation command of redis You can use the zset operation command of redis Redis can be operated using jedis Understan ...

Added by frost on Tue, 30 Nov 2021 00:26:46 +0200

Redis Sentinel mechanism

Sentinel sentinel mechanism of Master automatic election In the master/slave mode mentioned earlier, in a typical one master multi-slave system, slave plays the role of redundant data backup and separation of read and write in the whole system. When the master encounters an abnormal terminal, the developer can manually select a slave database ...

Added by ingchun on Sun, 28 Nov 2021 06:29:31 +0200

Docker series] docker learning 7, DockerFile writing and actual combat

Let's start learning about DockerFile DcokerFile is a file used to build a docker image. It is a command parameter script Steps to build a general docker image: 1. Write a dockerfile file 2. docker build builds into an image 3. docker run run image 4. docker push publish image (we can publish it to DockerHub or alicloud) Let's see how th ...

Added by coderage on Sun, 28 Nov 2021 04:57:04 +0200

redis source code learning allocated memory

1. Overview of redis In terms of memory allocation, Redis simply encapsulates the malloc/free of the system, and then adds the exception handling function and memory statistics function. Its implementation is mainly in zmalloc.c and zmalloc.h files 2. Function function void *zmalloc(size_t size); // Call the zmalloc function to apply for spa ...

Added by glassroof on Wed, 24 Nov 2021 06:44:23 +0200

Principle and optimization of Redis replication

1.1 Redis stand-alone problems 1.1.1 machine failure When a Redis node is deployed on a server, if the mainboard and hard disk of the machine are damaged and cannot be repaired in a short time, the Redis operation cannot be handled. This is the possible problem of a single machine Similarly, the server runs normally, but the main Redis proce ...

Added by david4u on Wed, 24 Nov 2021 01:13:18 +0200