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

Java connection Redis

From the previous study, I have a general understanding of redis. So what is the first step for java to operate the redis database in the development process? Of course, it's connected to redis~ Here are some basic operations for connecting redis; 1, Import dependency <dependency> <groupId>redis.clients</groupId> ...

Added by winggundamth on Sat, 01 Jan 2022 09:15:53 +0200

redis master-slave structure and sentinel mechanism

Master-slave architecture Create one master and two slave folders. mkdir master slave1 slave2 Copy etc / redis / redis The conf files are stored in three folders. cp /etc/redis/redis.conf /master cp /etc/redis/redis.conf /slave1 cp /etc/redis/redis.conf /slave2 Modify the configuration in turn Set the master port number to 7000, slave1 p ...

Added by simple_man_11 on Fri, 31 Dec 2021 23:03:00 +0200

Openresty Redis uses connection pool correctly (set_keepalive)

Recently, I was working on an openresty project. Every time I visit, I need to read redis through openresty to judge whether access can be allowed. Question: If you need to establish a connection with redis for each access, the number of connections will explode when the concurrency is large. Affect performance and system. Scheme I: In init ...

Added by soulzllc on Fri, 31 Dec 2021 09:36:41 +0200

Common Redis operations

Article catalog 1, Introduction to SpringDataRedis 1,Redis 2,Jedis 3,Spring Data Redis 2, API usage in RedisTemplate 1,pom.xml dependency 2. Configuration file 3. Direct method of RedisTemplate 4. String type related operations 1) Add cache (2 / 3 is the progressive value of 1) 2) . set expiration time (set separately) 3) . get the ...

Added by Ali_baba on Fri, 31 Dec 2021 01:39:31 +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 learning and sorting

Several data types of redis 1. String 2. list 3. set 4. hash 5. Ordered set (zset) 1. String String type is the most basic data type in Redis. String can store any form of string, including binary data. The maximum capacity of data allowed to be stored in a string type is 512MB. set sets the value of the specified key Syntax: set key ...

Added by rdbdba on Thu, 30 Dec 2021 19:14:34 +0200

[Redis] install Redis for Ubuntu and add Redis to the system service to run

Introduction to Redis Redis is a memory database with excellent performance, which is stored through the key value storage system. Similar to memcached, it supports relatively more stored value types, Including string, list, set, zset (sorted set – ordered list), and hashes (hash type). These data types support push/pop, add/remove, unio ...

Added by iconicCreator on Thu, 30 Dec 2021 01:13:00 +0200

On openresty, a high-performance long polling push service is quickly built based on lock and redis

Why?In the actual development, we often encounter the situation that we need to wait for background events for a long time, such as the common code scanning login function, the event that the QR code interface needs to wait for the successful code scanning login in the background, and the task that takes a long time to complete, such as import ...

Added by usmanmr on Tue, 28 Dec 2021 19:39:11 +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