Cluster timing task single point control solution (distributed lock + renewal lock solution)

1. Business requirements description There is a requirement in the development process: there are some Spring scheduled tasks in the cluster environment. These scheduled tasks summarize and generate some log data every minute, but we only want one server in the cluster to execute and design a high-performance and stable execution framework (th ...

Added by TheWart on Wed, 15 Dec 2021 15:46:52 +0200

redis IV - high availability and cluster

1, Redis Cluster Early Redis distributed cluster deployment scheme: Client partition: the client program determines the key write allocation and the redis node to be written, but the client needs to handle the write allocation, high availability management, failover, etcProxy scheme: redis proxy is implemented based on three-party software. T ...

Added by adamjnz on Tue, 14 Dec 2021 23:58:42 +0200

redis does not perform vulnerability access

Vulnerability introduction and harm Redis is bound to 0.0.0 by default 0.0:6379. If relevant policies are not adopted, such as configuring firewall rules to avoid IP access from other untrusted sources, redis service will be exposed to the public network; If password authentication is not set (generally empty), any user can access Redis an ...

Added by aufkes on Tue, 14 Dec 2021 14:49:48 +0200

redis master-slave replication, sentinel mode, cluster mode

catalogue redis cluster redis master-slave replication Role of master-slave replication: Master slave replication process Set up master-slave replication: Environment configuration: Install Redis Master node Redis profile Slave node Redis profile Verify master-slave effect Verify the slave node on the Master node Redis sentinel mode ...

Added by dml on Tue, 14 Dec 2021 09:29:53 +0200

redis source code reading 3 - finally understand the main task execution

stay Reading 2 of redis source code - finally understand the redis startup process The start-up process of redis is introduced, and a diagram is also drawn. Today, let me explain in detail how the main task of redis is implemented. Let's look at the flow chart first There are three main tasks in redis: EventLoop - > beforesleep create a ...

Added by psychotomus on Tue, 14 Dec 2021 03:37:44 +0200

spring boot shiro+session+redis realizes login session, session retention and distributed session sharing

reference resources: Shiro Springboot cluster shared Session (Redis) + single user login https://zhuanlan.zhihu.com/p/54176956 Frame construction 1. Basic environment jdk8 maven lombok spring boot 2.5.7 2. Import shiro maven coordinates <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-sprin ...

Added by Getran on Sat, 11 Dec 2021 15:11:59 +0200

Principle and implementation of Redis distributed lock

When operating on the same resource, a single cache read is no problem, but what to do when concurrency exists. In order to avoid data inconsistency, we need to perform a "lock" operation before operating the shared resource. We are developing many business scenarios that use locks, such as inventory control, lucky draw, second kill, ...

Added by rdub on Sat, 11 Dec 2021 14:22:07 +0200

Practice of redis operation in Java_ 03

Redis client summary redis is a distributed cache database with C/S architecture. It has its own command-line client and corresponding Java or other language clients. redis can be read and written through some API s in these clients. preparation Step 1: create a project. Create a maven parent project, such as 03 redis, and create two sub p ...

Added by stevenheller7@gmail.com on Fri, 10 Dec 2021 05:35:32 +0200

03 redis transaction processing and architecture application practice

1. Introduction to redis transaction 1.1 general Transaction is a business and can also be regarded as a logical work unit. It is a control mechanism introduced to ensure the integrity of business and the correctness of data. In principle, transactions must meet the four characteristics of ACID (atomicity, consistency, isolation and persisten ...

Added by jamesflynn on Fri, 10 Dec 2021 04:07:00 +0200

Introduction to Redis - five basic data types

Introduction: NoSql, non relational database; Single thread + multiplex IO multiplexing technology Atomicity of Redis Because redis is single threaded, the execution of all single commands is atomic Applicable scenarios: Highly concurrent reading and writing of dataMassive data reading and writingFor high data scalability Key points: redis ...

Added by buluk21 on Fri, 10 Dec 2021 04:01:46 +0200