redis caching with Spring custom annotations

1, Foreword Redis is one of the basic components that must be used in distributed microservices. At present, it is basically used in most domestic projects, and caching is one of its main functions. Frequent use of set() method to add annotations in projects will cause code duplication and bloated. For those who do not have enough development ...

Posted by jaymc on Wed, 13 Oct 2021 04:26:16 +0200

Redis architecture design practice

catalogue Master slave replication Background introduction Basic architecture Quick start practice Principle analysis         Full synchronization         Incremental synchronization Interview questions         If you were aske ...

Posted by sps on Tue, 12 Oct 2021 21:09:06 +0200

Redis - transaction processing practice

Redis transaction introduction 1. General Redis uses optimistic locking for transaction control. It uses the watch command to monitor a given key. When exec (commit transaction), if the monitored key changes after calling watch, the whole transaction will fail. You can also call watch to monitor multiple keys multiple times. Note that the ...

Posted by kristo5747 on Tue, 12 Oct 2021 08:27:05 +0200

14 redis master-slave replication

redis master-slave replication concept Master Slave replication refers to copying data from one Redis server to other Redis servers. The former is called master / leader and the latter is called Slave / follower; Data replication is unidirectional and can only be from master node to Slave node. Master mainly writes, Slave mainly reads. ...

Posted by chintansshah on Fri, 08 Oct 2021 10:29:12 +0200

Redis class notes on the first day

Redis first day class notes Course objectives Be able to master the operation of different data types in RedisRedis can be operated using Java APIBe able to understand the two persistence methods of RedisUnderstand the master-slave replication architecture of RedisBe able to understand the Sentinel architecture of RedisUnderstand Redis cluste ...

Posted by dkoolgeek on Fri, 08 Oct 2021 03:09:43 +0200

Redis distributed lock, you hit me after reading it

Simple redis distributed lock Locking: set key my_random_value NX PX 30000 This command is better than setnx because the expiration time can be set at the same time. If the expiration time is not set, the application hangs and cannot be unlocked, so it is locked all the time. Unlock: if redis.call("get",KEYS[1])==ARGV[1] then ret ...

Posted by dokueki@gmail.com on Fri, 01 Oct 2021 03:33:21 +0200

To understand redis, you must first understand sds (the most detailed explanation of sds in the whole network)

1, Structure of sds Definition of sds sds.h //Defines a char pointer typedef char *sds; /* Note: sdshdr5 is never used, we just access the flags byte directly. * However is here to document the layout of type 5 SDS strings. */ struct __attribute__ ((__packed__)) sdshdr5 { unsigned char flags; /* 3 lsb of type, and 5 msb of string l ...

Posted by mimilaw123 on Sun, 26 Sep 2021 20:56:39 +0200

Build a misskey instance

Decentralized open source social platform – misskey I can't bear to see the leaders deploy mammoths. In fact, I also want to have my own district centered social platform... hmmm, but mammoths eat too much memory. Is there a better source program? So I found this high color value and low occupancy program misskey on github ##Program int ...

Posted by saltwater on Sun, 26 Sep 2021 12:10:45 +0200

codis cluster deployment

Introduction to Codis codis cluster Codis is a distributed Redis solution. For upper tier applications, there is no obvious difference between connecting to the Codis Proxy and connecting to the native Redis Server (unsupported command list). Upper tier applications can be used like stand-alone Redis. The lower tier of Codis will handle r ...

Posted by rulinus on Wed, 22 Sep 2021 15:26:29 +0200

Do you know the common scenarios of redis?

1. Cache String type For example, hot data cache (such as reports and star cheating), object cache and full page cache can improve the access data of hot data. 2. Data sharing distributed String type, because Redis is a distributed independent service that can be shared among multiple applications For example: distributed Session <depe ...

Posted by KoshNaranek on Wed, 22 Sep 2021 14:12:56 +0200