Redis learning notes -- the underlying data structure of redis

Redis learning notes - the underlying data structure of redis 1.Redis as a key value storage system Redis is written in ANSI and c,The key in Redis is of string type. Of course, there are other types, but they will be converted to string typeThe data types of value are: Commonly used: string type, list type, set set type, sortedset (zset ...

Posted by pianoparadise on Thu, 20 Jan 2022 23:11:40 +0100

Redisson & RedLock distributed lock

preface This article aims to share experience and welcome your comments Application scenario: 1. Second kill 2. Grab coupons 3. Interface idempotency check Summary: grab resources 1. Single lock -- > to distributed lock synchronized () is no longer described here 1.1. Based on opsforvalue() Setifabsent() implementation Format ...

Posted by millwardt on Thu, 20 Jan 2022 20:37:22 +0100

Integrating Lua script based on redis to complete current limiting operation

shield-ratelimiter Redis based distributed current limiting Toolkit In the distributed field, we will inevitably encounter a sudden increase in concurrency, which will cause high pressure on back-end services, and even lead to system downtime. To avoid this problem, we usually add current limiting, degradation, fusing and other capabilities to ...

Posted by kel on Thu, 20 Jan 2022 08:44:54 +0100

Redis data type

1, String data type String is the most basic type of redis. It can store up to 512MB of data. String is binary safe, that is, it can store any data, such as numbers, pictures, serialized objects, etc 1,append append #The append command of Redis is to append value to a key. If there is no key, create one and set value Example: redis-cl ...

Posted by SpecialFX on Thu, 20 Jan 2022 00:37:38 +0100

Introduction and use of hash data type related commands of redis

Introduction to hash type The hash (hash or hash) in redis stores many key value pairs internally in the form of key - [field value]. It is also a two-dimensional structure of array + linked list (itself is also a key value pair structure). Because of this, we can usually use hash to store an object information. Each hash in redis can stor ...

Posted by zipp on Wed, 19 Jan 2022 23:16:53 +0100

Analysis of redis cluster source code

The redis cluster source code is divided into two parts. The first part mainly analyzes how a command locates to a server to process the command in the cluster mode. The second part mainly analyzes the source code of cluster failover. This article mainly includes 1. How is a command request processed in cluster mode 2. What problems should we ...

Posted by tony.j.jackson@o2.co.uk on Wed, 19 Jan 2022 16:14:09 +0100

[Shiro]5. Integrating Redis to realize caching

In the actual development of front-end and back-end, we will use annotations to control permissions. When performing authentication or authorization operations, Shiro will query the identity or permission information in the DB. It is known that identity information and authority information will not change frequently and are very complex. If ma ...

Posted by everisk on Wed, 19 Jan 2022 05:29:28 +0100

5 data types of Redis (String, List, Hash, Set, Sorted Set)

1, String Overview: string is the most basic type of redis. It can store up to 512MB of data. String type is binary secure, that is, it can store any data, such as numbers, pictures, serialized objects, etc ① append 1,append #The append command of Redis is to append value to a key. If there is no key, create one and set value Example: ...

Posted by nitko on Wed, 19 Jan 2022 03:40:11 +0100

redis learning notes SpringBoot integration implementation

preface Spring Boot is a new framework provided by pivot team. It is designed to simplify the initial construction and development process of new spring applications. The framework uses a specific way to configure, so that developers no longer need to define templated configurations. In this way, Spring Boot is committed to becoming a ...

Posted by praveenbabur on Tue, 18 Jan 2022 03:50:13 +0100

Introduction to Redis Fifteen: Using Redis Five in Java: Caching Data One with Jedis; (In fact, it uses redis to store objects)

Explain: (1) Demonstrate how to store objects in a redis database MySQL database, which stores data on the hard disk by default; Due to the slow read and write speed of the hard disk, MySQL processing speed is slower and delays as the data volume increases and the concurrency number increases. Redis uses memory to store data, which is fas ...

Posted by misschristina95 on Tue, 18 Jan 2022 03:22:14 +0100