Docker Builds Redis Master-Slave Mode (Sentinel Monitoring) & SpringBoot 2.0 Integrated Redis Service (Lettuce Connection Pool)
1. Docker sets up Redis Master+Sentinel Monitoring
Set up environment: Ubuntu 18.04.3 Docker 18.09.7
Download Mirrordocker pull redis (default redis:latest)
Get the configuration file and modify it wget http://download.redis.io/redis-stable/redis.conf
wget http://download.redis.io/redis-stable/sentinel.conf
# Primary four slave port ...
Added by virtualdevl on Thu, 09 Apr 2020 08:54:36 +0300
Redis (13) - redis's AOF mode of persistence
AOF mode: log every operation
Advantages: the security is much higher than RDB;
Disadvantages: the efficiency is much lower than RDB;
To configure:
Edit redis.conf
[root@localhost redis]# vi redis.conf
Pull down to find:
The following picture:
appendonly no the aof mode is turned off by default. We change it to yes to ...
Added by linfidel on Sat, 04 Apr 2020 00:36:45 +0300
One click online installation of redis database by shell script (implemented by function)
The previous article gives the process of manual compilation and installation of redis, and gives the process of online installation of redis when simulating the establishment of redis cluster, so I want to write a redis script for online installation. In this paper, I mainly use shell functions to realize and verify the process of online ins ...
Added by philipolson on Wed, 25 Mar 2020 16:47:34 +0200
SpringBoot+Redis solves the problem of thousands of submissions in an instant
In a real development project, an exposed interface is often faced with a large number of repeated requests submitted in an instant. If you want to filter out the repeated requests and cause damage to the business, you need to implement idempotent!
Let's explain the concept of idempotent:
Any number of executions has the same impact as a ...
Added by azylka on Tue, 24 Mar 2020 03:56:42 +0200
Using websocket (redis subscription) in nginx distributed cluster
Preface
1.1 principle
The core of websocket is to store the session information of successful handshake into static variables. However, there are many servers in the distributed system, Tomcat, which use nginx to forward to different tomcat, so it can not guarantee that this Tomcat stores the sessio ...
Added by Spudgun on Mon, 16 Mar 2020 12:58:54 +0200
Why is Redis so fast?
redis-benchmark -t set,lpush -n 100000 -q
SET: 38550.50 requests per second //Processing 38000 set requests per second
LPUSH: 37821.48 requests per second //Process 37000 lpush requests per second
### Script execution times
redis-benchmark -n 100000 -q script load"redis.call('set','foo','bar')"
script loadredis.call('set','foo','bar'): 3705 ...
Added by bckennyw on Sat, 14 Mar 2020 09:08:33 +0200
How to use redis to generate serial number redis persistence
How to use redis to generate serial number
Summary
Principle introduction
Flow chart
1. Initializing serial number information into cache
2. Generate serial number
code implementation
1. Serial number entity class
2. Initialize serial number into cache
3. Generate serial number
Code testing
Gene ...
Added by Parody on Wed, 11 Mar 2020 05:38:01 +0200
Virtual machine builds local spring cloud environment
Setting up local environment records for virtual machine
1.vmware installation
1. Enter the vm website, Download page
2. Select trial, or log in
3. installation
4. Input the secret key Baidu to test UG5J2-0ME12-M89WY-NPWXX-WQH88 on February 13, 2020
2. Installation of VMware centos7
1. Download ce ...
Added by phpscriptcoder on Mon, 17 Feb 2020 09:06:42 +0200
ThreadPoolExecutor Thread Pool Source Analysis
ThreadPoolExecutor Thread Pool Source Analysis
White teeth want to say
I haven't updated it for a long time, not because I didn't learn, but because I didn't know how to write it. At the same time, there was a voice telling me that public numbers are flying all over the world. There are more people writing public numbers than reading public nu ...
Added by itbegary on Fri, 14 Feb 2020 04:55:32 +0200
Spring boot monitoring redis subscription monitoring and publish subscription
Preface
We can publish a subscription to the channel in redis. Anyone who listens to the channel can receive the published content!
redis subscription listening configuration class
image.png
The code is as follows: RedisListenerConfig.java
package com.wzq.redis.config;
import org.springframe ...
Added by boombanguk on Fri, 07 Feb 2020 16:13:14 +0200