This article focuses on how Redis-based distributed locking is implemented. It refers to a number of articles written by big guys and summarizes distributed locking.
Overview of Distributed Locks
In a multithreaded environment, in order to ensure that a block of code can only be accessed by one thread at a time, we can usua ...
Posted on Thu, 28 May 2020 17:50:56 -0700 by outsidaz
sentinel is a highly available program of redis. It can discover and automatically switch the configuration of redis service in the master-slave state. sentinel can also manage multiple sets of redis masters and slaves
The application can be directly connected to the sentinel through a driver similar to jedis to achieve high availabili ...
Posted on Tue, 12 May 2020 02:40:18 -0700 by teanza
1. Environment construction
We will continue to use the project used in Redis(4) for beginners
Extraction code: kzz3
1.1 replace pom dependency
Posted on Mon, 27 Apr 2020 07:45:39 -0700 by erupt
1. Redis installation configuration
a. Download address: Redis Download
b. In the folder saving location, open a cmd window, use the cd command to switch the directory to I:\Software\Redis-x64-3.2.100, run redis-server.exe redis.windows.conf
c. Another cmd window is opened. Do not close it, or you wi ...
Posted on Sun, 05 Apr 2020 17:04:01 -0700 by Smeep
This article uses Redis to achieve the article's likes, and arranges from the number of likes to the low.
The implementation language is JAVA, so the package to be used is jedis.
Function realization analysis.
Redis has five data type ...
Posted on Tue, 31 Mar 2020 11:57:37 -0700 by Rai_de
Java and spring connect Redis stand-alone version and cluster version respectively
1, Java connection Redis
1.1 Java connection Redis standalone
1.2 Java connection to Redis cluster
2, spring stores Redis connection objects
2.1 interface packaging
2.2 defining implementation classes
2.3 easy to co ...
Posted on Tue, 10 Mar 2020 22:29:43 -0700 by shamoon
Redis can not only be used as a cache server, but also as a message queue. Its list type is inherently supported as a message queue. As shown in the figure below:
Because Redis's list is implemented by using a two-way linked list, which saves the head and tail nodes, it is very fast to insert elements on both sides of the list.
So you can d ...
Posted on Wed, 15 Jan 2020 01:59:04 -0800 by Clerma
Introduction to Redis
Redis is an open source, in-memory, high-performance data storage system that can be used as a database, cache, and messaging middleware.
Redis supports many types of data structures, such as string, hashes, lists, sets, sortedSets, and so on.
Redis has built ...
Posted on Fri, 10 Jan 2020 17:16:18 -0800 by mountaindave
Redis has a lot of data structures: string, hash, list, set, etc. but in the actual delivery, we often save the object in redis, so the key value pairs are more commonly used.
Redis needs to satisfy serialization when saving objects. Due to the low efficiency of java's native serialization method, the protostaff serialization ...
Posted on Wed, 01 Jan 2020 14:02:53 -0800 by thedotproduct
Because of the load balancing of multiple servers, when obtaining the sessionId of the client, it will be different for the first time and the second time. Because of the load balancing, there are at least two servers in your server. If the first request and the second request of the client are not the same server, the sessionId will change. To ...
Posted on Sun, 29 Dec 2019 09:04:08 -0800 by itaym02