Redis high performance database
1, Redis overview:
Redis: it is a persistent single process and single thread key value type cache system. Similar to memcached, it supports relatively more stored value types, including string (string), list (list), set (set) zset(sorted set -- ordered set) and hashes (hash type). These data types all support push/pop, add/remove, intersectio ...
Added by trp on Tue, 21 Dec 2021 05:25:03 +0200
redis master-slave replication and sentinel mode
1, Master slave replication concept
Master slave replication refers to copying data from one Redis server to other Redis servers. The former is called the master node (master/leader), which is called slave / follower; Data replication is unidirectional and can only be from master node to slave node. Master mainly writes, Slave mainly reads. By ...
Added by 3s2ng on Tue, 21 Dec 2021 02:43:33 +0200
Generics of Java advanced features
What is generics
As a literal meaning, a generalized type means that a specific type cannot be determined during encoding. A placeholder (uppercase, English is recommended) needs to be used first. When running, a specific type is passed in to replace this generic tag
Why do I need generics
Pseudo demand
Suppose we need a list to store Strin ...
Added by -Karl- on Mon, 20 Dec 2021 10:42:45 +0200
Recharge write off card secret malicious concurrent request to prevent reuse of card secret recharge successful solution
Project scenario:
Spring boot project write off card secret recharge in concurrent test, a card secret is successfully recharged repeatedly
Problem Description:
The first time I wrote, I didn't consider so much, so I added several logic to verify the card secret status in the business layer. As long as the card secret status is OK, I can ...
Added by rReLmy on Mon, 20 Dec 2021 05:01:03 +0200
Lua script quick start (with sample program code)
Lua scripts quick start
Lua is case sensitive
premise
After Lua is installed on this machine, the installation steps of lua can be completed
Basics
notes
-- This is a single line comment
-- [[
This is a multiline comment
This is a multiline comment
-- ]]
Reserved keywords
Reserved keyword document address
variable
Type when ...
Added by moberemk on Sun, 19 Dec 2021 19:04:12 +0200
CAS operation based on Redis
introduction
Yes NET, we can use interlocked Compareexchange to implement CAS (Compare And Swap) operation. In the distributed scenario, we often use redis. Recently, a wechat game project before the change was run on a single machine. Some data storage is based on memory and directly based on object operation. Recently, redis is introduced to ...
Added by cfemocha on Sat, 18 Dec 2021 20:07:00 +0200
redis distributed cache entry to proficiency
01... Getting started with redis caching
brief introduction
background
In our current project architecture, the Web server (Tomcat) and database are basically deployed independently and monopolize the server resources. With the growth of the number of users, concurrent reading and writing to the database will increase the pressure on dat ...
Added by ronald29x on Sat, 18 Dec 2021 14:44:29 +0200
Comprehensive analysis of advanced core knowledge in Java - Redis, the latest interview answer for java development
SET key2 value2 OK MGET key1 key2 key3 # returns a list
"value1""value2"(nil)
MSET key1 value1 key2 value2 MGET key1 key2
"value1""value2"
#### ⑤ , expiration, and SET command extensions
Yes key Set the expiration time, and the expiration time will be automatically deleted. This function is often used to control the expiration time ...
Added by doni49 on Sat, 18 Dec 2021 14:29:51 +0200
Redis advanced project practice, complete collection of old boy linux e-books
Function [#](
)
Ensure complete data transmission
Redis distributed lock implementation source code explanation [#](
)
Graphic explanation [#](
)
Step [#](
)
Distributed locks meet two conditions: one is the lock with effective time, and the other is high-performance unlockingredis commands setnx (set if not exist) and setex (set exp ...
Added by thoand on Sat, 18 Dec 2021 06:11:36 +0200
1, Introduction to Redis Foundation
1. Introduction to redis Basics
1.1 redis is a high-performance key value cache database,
1. Support data persistence 2. Rich data types 3. Atomic operation
1.2 role of redis
1. Provide cache service 2. For distributed locks 3. Used for message queuing (not the advantage of redis)
1.3 why Redis
The traditional application of Mysql bas ...
Added by holstead on Sat, 18 Dec 2021 00:38:38 +0200