Deeply understand the underlying data structure of Redis List queue
Deeply understand the underlying data structure of Redis List queue
CentOS 7 installs redis6.25 in combination with the docker image configuration method (redis.conf file is attached)
list underlying data structure:
linkedList linked list Zip list zip list quickList
Linked list: LinkedList
The two-way linked list of the leading nod ...
Posted by petersro on Mon, 20 Sep 2021 12:32:35 +0200
SpringBoot creates media classes and filters that store tokens
The reason why you need to create a media class to store tokens is that the filter interface to be used later.
1, Create ThreadLocalToken class
Purpose of creating ThreadLocalToken class:
Create the ThreadLocalToken class in com.example.emos.wx.config.shiro. Write the following code:
package com.example.emos.wx.config.shiro;
import org.sp ...
Posted by jmarcv on Sun, 19 Sep 2021 07:12:10 +0200
Application of Bloom filter
In an App login scenario, there are two important information: account and device number
The device number identifies an installed App and is generated when the App is installed. If it is uninstalled and reinstalled, a new device number will be generated.
Suppose there is a demand, it is necessary to check whether the active account and equip ...
Posted by provision on Fri, 10 Sep 2021 11:32:31 +0200
redis practice in step04day14 java operation
1.redis client tool jedis
1.1 Introduction and preparation of jedis
Introduction to 1.1.1 jedis
Jedis is a client in Java that operates on redis, similar to accessing the mysql database through jdbc.
To implement jedis in java's mevan, you need to import the following dependencies:
<dependency>
<groupId>redis.clients</g ...
Posted by btubalinal on Mon, 06 Sep 2021 20:18:42 +0200
Redis's low-cost, high availability design has taken nearly a year to sort out the list of Java core knowledge
This paper mainly introduces the design of redis high availability scheme using official sentinel.
Redis Sentinel
Sentinel introduction
Sentinel is a highly available solution officially provided by redis for clusters. In actual projects, sentinel can be used for automatic redis failover to reduce the workload of manual intervention.
In a ...
Posted by psychowolvesbane on Mon, 06 Sep 2021 03:23:37 +0200
The simple test of celery and the data type of redis when using redis as the broker
1. First two files
<1> Tasks (general name fixed)
tasks.py
from celery import Celery
import time
# app = Celery('tasks')
app = Celery('celery_name',
backend='redis://127.0.0.1:6379/3',
broker='redis://127.0.0.1:6379 / 2 ') # configure the backend and broker of the celery
# app.config_from_object('tasks') #Co ...
Posted by Robin M on Sat, 04 Sep 2021 19:14:29 +0200
SpringCache of grain mall
summary
spring has defined Cache and CacheManager interfaces since 3.1 to unify different caching technologies. It also supports the use of JCache(JSR-107) annotations to simplify our development The implementation of Cache interface includes RedisCache, EhCacheCache, ConcurrentMapCache, etc
Each time a method requiring caching is called, spr ...
Posted by hitman6003 on Wed, 01 Sep 2021 20:14:23 +0200
redis-sentinel cluster (k8s script)
1 redis backup
It is recommended that rdb and aof be turned on simultaneously.rdb is on by default and aof is off by default.Refer to rdb and aof for additional details http://blog.csdn.net/guoxingege/article/details/48780745
1.1Redis.confConfiguration Details
requirepass 123456
## The following is the rdb confi ...
Posted by Alt_F4 on Tue, 14 Jul 2020 16:40:04 +0200
docker builds redis cluster
docker builds redis cluster
1. Download the redis image
docker pull redis
2. Prepare the configuration fileRedis.conf
mkdir /home/docker/redis/
wget https://raw.githubusercontent.com/antirez/redis/3.0/redis.conf -O /home/docker/redis/redis.conf
cd /home/docker/redis/
sed -i 's/# slaveof <masterip> <masterport>/slaveof red ...
Posted by legacyblade on Mon, 13 Jul 2020 16:48:41 +0200
Common methods of current limiting in high concurrency system
In the development of high concurrency system, there are four tools to protect the system: diffluence, cache, degradation and flow restriction. Based on the author's experience, this paper introduces the related concepts, algorithms and conventional implementation of current limiting.
Concept interp ...
Posted by plapeyre on Mon, 29 Jun 2020 04:11:04 +0200