Spring data redis dynamically switches data sources

Recently, we encountered a troublesome demand. We need a microservice application to access two different Redis clusters at the same time. Generally, we don't use Redis in this way, but the two Redis were originally different business clusters, and now a microservice needs to be accessed at the same time. In fact, we may encounter similar scen ...

Added by MilesStandish on Mon, 27 Dec 2021 10:25:17 +0200

The new monitoring method of Redis connection pool is not poked ~ I'll add a little more seasoning

Lattice is a Redis connection pool. Unlike Jedis, lattice is an asynchronous connection pool mainly based on Netty and ProjectReactor. Because it is based on project reactor, it can be directly used in spring weblux asynchronous projects. Of course, it also provides a synchronous interface. In our microservice project, Spring Boot and Spring ...

Added by xenoalien on Fri, 24 Dec 2021 02:11:02 +0200

Interviewer: how can Redis distributed locks be automatically renewed

Click on "end of life", pay attention to the official account. Daily technical dry goods, delivered at the first time! 1. Redis implements distributed locks Specify a key as the lock mark, store it in Redis, and specify a unique user ID as the value. When the key does not exist, the value can be set to ensure that only one ...

Added by jay_bo on Thu, 23 Dec 2021 22:37:26 +0200

Get the real-time leaderboard in the game with Redis (with source code)

1. Preface Recently, a real-time ranking function was implemented for the project (mobile game). The main features are as follows: Real time full service ranking You can query the ranking of a single player Support two-dimensional sorting The amount of data is small, roughly in the range of 1W ~ 50W (opening and closing services will lead ...

Added by classic on Thu, 23 Dec 2021 06:21:42 +0200

vagrant creates a virtual machine for vmbox and installs mysql and redis for docker

1, Install vmbox and vagrant 1. Download address Vagrant: https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.msi ==VirtualBox: == https://download.virtualbox.org/virtualbox/6.0.10/VirtualBox-6.0.10-132072-Win.exe Remember to turn on cpu virtualization 2. vagrant initializes the virtual machine CUHK mirror station, such as: ...

Added by crashmaster on Wed, 22 Dec 2021 22:39:24 +0200

Redis data type

Redis data type Redis supports five data types: string, hash, list, set and Zset. String (string) As like as two peas, string is the most basic type of redis. You can understand it as a type that is exactly the same as Memcached, and a key corresponds to a value. String types are binary safe. This means that the redis string can contain a ...

Added by Master_Phantom on Wed, 22 Dec 2021 17:16:44 +0200

Drink, talk and chat, based on vue3 0+Tornado6. 1 + redis PubSub mode to build an asynchronous non blocking (aioredis) real-time (websocket) communication chat system

The original text is reproduced from "Liu Yue's technology blog" https://v3u.cn/a_id_202 "Desire for expression" is a powerful "source power" in the history of human growth. Engels pointed out bluntly that human beings in the ignorant era, that is, the low-level stage, "take fruits, nuts and roots as food; th ...

Added by Mzor on Wed, 22 Dec 2021 13:02:40 +0200

Redis 6: redis master-slave replication + redis cluster

11, Redis master-slave replication 11.1 general After the host data is updated, it is automatically synchronized to the Master / Slave mechanism of the standby machine according to the configuration and policy. The Master is mainly write and the Slave is mainly read effect Read write separation, performance expansionDisaster recovery a ...

Added by TeddyKiller on Wed, 22 Dec 2021 05:27:24 +0200

Spring boot integrates Redis with multiple data sources

Spring boot integrates Redis In fact, the method is similar to the single data. Let's write it here Multi data source consolidation I Complete profile # Spring configuration spring: # resource information messages: # Internationalization resource file path basename: i18n/messages profiles: active: druid # File upload ...

Added by aeonsky on Tue, 21 Dec 2021 14:02:09 +0200

Redis sentinel and cluster configuration and use under centos7

catalogue About redisinstallSimple configuration and use of sentrySimple cluster configuration and use 1. About Redis What is Redis -redis is a key value storage system (NoSQL). -redis provides five data types: `string,hash,list,set and zset(sorted set) `. Advantages of Redis (compared with traditional relational databases)High performan ...

Added by henka on Tue, 21 Dec 2021 11:41:42 +0200