Analysis of duplicate order number caused by improper use of online redis distributed lock

background The day before yesterday, my colleague reported that there was a problem with the redis distributed lock, resulting in duplicate order numbers. Later, everything was normal after it was replaced with reission. Based on this phenomenon, this paper analyzes it Problem driven The following code is analyzed and three problems are foun ...

Added by bluetonic on Tue, 04 Jan 2022 19:27:01 +0200

Problems and solutions in Redis cache design

preface Today, I'd like to share common problems and solutions when Redis is used as a cache. Solutions to problems such as cache penetration, cache failure (breakdown) and cache avalanche. 1, Cache penetration? Redis middleware is basically an indispensable element in high concurrency system design. There are some problems that we n ...

Added by abc123 on Mon, 03 Jan 2022 18:40:14 +0200

Resolved: resolved the problem of multiple timer conflicts in Spring Boot multithreading environment

Forwarding official account: IT Ranch Tactical Analysis: There must be more than one timer in the actual development project, which needs to be used in many scenarios, and the problem brought by multiple timers is how to avoid the conflict of multiple timers Usage scenario: Our order service generally has an order to be paid, which has a ti ...

Added by anoopmail on Mon, 03 Jan 2022 08:52:55 +0200

@Add cache with Cacheable annotation

If you add, you have Clear cache. @Cacheable cannot set the expiration time directly. It should be used in combination with @ CacheConfig to set the expiration time Function description @The Cacheable annotation is used on a method to indicate that the return result of the method can be cached. That is, the returned result of this method wi ...

Added by miz_luvly@hotmail.com on Mon, 03 Jan 2022 07:45:15 +0200

redis usage scenarios (8 types)

Tip: after the article is written, the directory can be generated automatically. Please refer to the help document on the right for how to generate it preface Today, let's introduce the data structures of redis and their usage scenarios. My level is limited. If you are misled, welcome to learn together and make progress together! 1, ...

Added by designbooks59 on Mon, 03 Jan 2022 05:58:51 +0200

Interviewer: the new version of Redis begins to introduce multithreading. What's your opinion?

As a memory based cache system, Redis has always been known for its high performance. Without context switching and lock free operation, even in the case of single thread processing, the read speed can reach 110000 times / s and the write speed can reach 81000 times / s. However, the single thread design also brings some problems to Redis: On ...

Added by artisticre on Mon, 03 Jan 2022 04:08:44 +0200

Analysis of common exceptions of Redis client

During the use of Redis client, whether the client is improperly used or the Redis server has problems, the client will respond to some exceptions. The following is an analysis of the common exceptions in the use of Jedis: 1, Unable to get connection from connection pool The number of Jedis objects in the JedisPool is limited. The default is ...

Added by drucifer on Mon, 03 Jan 2022 01:21:01 +0200

Redis project practice - lottery turntable

1. Project introduction This is a simple case based on Spring boot + Mybatis Plus + Redis. It mainly caches the activity content, prize information, record information, etc. into Redis, and then all lottery processes do data operations from Redis. The general content is very simple, and the specific operation is analyzed slowly below. 2. Pr ...

Added by gewthen on Sat, 01 Jan 2022 23:32:16 +0200

Spring Boot: Redis cache usage

1. Introduction to redis Redis is the most widely used memory data storage in the industry. Compared with Memcached, redis supports richer data structures, such as hashes, lists and sets, and supports data persistence. In addition, redis also provides some database like features, such as transaction, HA and master-slave database. It can be said ...

Added by py343 on Thu, 30 Dec 2021 23:57:46 +0200

redis source code reading notes - sds

The source code of this article comes from redis 6.2 link: https://github.com/redis/redis/tree/6.2 https://github.com/redis/redis/blob/6.2/src/sds.h https://github.com/redis/redis/blob/6.2/src/sds.c Introduction to sds sds (simple dynamic string) its full name is simple dynamic string. It uses C language to encapsulate a binary secure string ...

Added by (RL)Ian on Mon, 27 Dec 2021 14:43:17 +0200