Five data types and usage scenarios of Redis

Redis has five basic data structures: string, list, set, hash and zset. All data structures of Redis are a key corresponding to a value. The difference between different types of data structures lies in the different structure of value. For example, string data type, its value is a string, list data type, and its value is a linked list. 1.Str ...

Added by horsefaceba on Tue, 04 Jan 2022 02:25:06 +0200

Analysis of Redis Sentinel Mechanism

1. Preface Last article Redis Master-Slave Replication Principle In this paper, a basic principle of master-slave replication is briefly explained, which includes full replication, replication backlog buffer and incremental replication. Interested students can look at it first. With master-slave replication, read-write separation, data backup ...

Added by skyloon on Mon, 03 Jan 2022 21:25:09 +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

[learning redis source code] the "message queue" Stream in redis

About redis Stream redis stream implements most of the functions of message queues, including: news ID Serialization generation of Message traversal Blocking and non blocking reads of messages Packet consumption of messages ACK Confirmation mechanism After this combination, I realized that I didn't know the message queue. You can t ...

Added by torsoboy on Mon, 03 Jan 2022 13:09:39 +0200

redis sentinel cluster

redis sentinel cluster Redis sentinel is different from redis master-slave; redis master-slave; The master hangs up and will never replace the master redis sentinel master and slave will replace the master MHA 1, Overview of Redis sentinel; summary; Sentinel: sentinel mode is a distributed system. This process is used to monitor the workin ...

Added by SecureMind on Mon, 03 Jan 2022 09:39:21 +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 source code analysis -- Design and implementation of ziplist

background ziplist is a data structure developed to save memory. Its essence is a byte array. ziplist is one of the underlying implementations of list keys and hash keys, and is also used for the implementation of quicklist. Problem thinking The bidirectional linked list structure has serious memory waste when the length of the stored data ...

Added by Neumy on Sun, 02 Jan 2022 19:26:49 +0200