Execute lua script using RedisTemplate
Business scenario
The document number format generated by handling business in different regions must be: current month and year + 5 digits, and the number increases from 00001. The initial solution is to generate self increasing sequences, but because there are too many regions to complete a sequence in each region, this scheme will not w ...
Posted by doug007 on Thu, 27 Jan 2022 17:48:41 +0100
Overview and installation of Redis
Redis overview
What is Redis
Redis (Remote Dictionary Server), that is, remote dictionary service, is an open source log type and key value database written in ANSI C language, supporting network, memory based and persistent, and provides API s in multiple languages. Redis has largely compensated for its emergence memcached This kind of ...
Posted by hucklebezzer on Thu, 27 Jan 2022 16:28:37 +0100
Detailed explanation of Redis persistence
1: Overview of Redis persistence
Persistence function: Redis is an in memory database, and all data are stored in memory. In order to avoid permanent loss of data caused by process exit, it is necessary to regularly save the data in Redis from memory to hard disk in some form (data or command); When Redis restarts next time, use persistent fil ...
Posted by cashflowtips on Thu, 27 Jan 2022 08:11:43 +0100
Spring boot + redis realizes the record of article views
Spring boot + redis realizes the record of article views
Previously, the article visits in personal blog websites were stored in MySQL. Every time you visit, you need to check the database through the article id and operate + 1 after obtaining the number of views. After updating the database, in order to display the article views in real time, ...
Posted by StumpDK on Wed, 26 Jan 2022 18:47:21 +0100
Implementation of retry mechanism (4m,10m,10m,1h,2h,6h,15h)
Project scenario:
As I know, the project we are working on now has many external interfaces for the agent to call, but the response of some interfaces is not returned in real time. At this time, we need to respond to the agent by calling back the interface. During this period, other situations such as network instability may occur, resulting i ...
Posted by mordeith on Wed, 26 Jan 2022 10:14:43 +0100
Redis core data structure underlying principle, source code analysis + jump table + GEO map actual combat
1, List
Common API
Underlying implementation
List is an ordered data structure (sorted according to the added sequence). Redis uses quicklist (double ended linked list) and ziplist as the bottom implementation of list.
You can improve data access efficiency by setting the maximum capacity of each ziplost and the data compression range of ...
Posted by ledtear on Wed, 26 Jan 2022 05:16:26 +0100
Summary of Redis | Day5 and Java operation in seven days
1. jedis class
1. First, we need to import the jedis package Latest jedis
After that, we put it into the directory at the same level as src, and then right-click the item to find: Next, let's test. At the beginning, I encountered such a problem The reason is that I didn't open the server, so you must remember to open the server. Now let ...
Posted by cmburns69 on Wed, 26 Jan 2022 04:40:30 +0100
Interface permission control (springboot)
Principle: first, call login, and a token will be passed to the front end. Later interfaces need to use this token. The front end needs to put the token into the request header and pass it when calling the interface. After the back end obtains the token, compare the obtained token with that in the database. If it is the same, it means that it h ...
Posted by Develop_Sake on Wed, 26 Jan 2022 03:15:03 +0100
Redis basic commands
typora-root-url: D:\software\dev\Typora\locales
Installing Redis under Linux
1. Download the installation package! redis-6.2.4.tar.gz
$ cd /home/wlk
$ wget http://download.redis.io/releases/redis-6.0.6.tar.gz
2. Unzip the installation package to / opt, and you can see redis Conf file
$ tar xzf redis-6.0.6.tar.gz -C /opt
$ cd redis-6.0.6
...
Posted by tomash on Mon, 24 Jan 2022 20:25:15 +0100
Deeply understand the principle of master-slave replication of Redis cluster
1, First, consider a question: why does redis need a distributed solution with such high performance?
1. Achieve higher performance: for highly concurrent applications, the performance of a single machine will be affected. More redis servers are needed to share the pressure and achieve load balancing
2. Achieve high availability: prevent down ...
Posted by Box on Mon, 24 Jan 2022 14:03:13 +0100