Read write separation of redis cluster

Read write separation of redis cluster 1. Cluster deployment In this article, we will not elaborate on how to deploy the master-slave cluster. In general, slaveOf configuration is used for initialization configuration. 2. Integrating with springboot to realize read-write separation The call layer read-write separation is realized by annotatio ...

Posted by lunarul on Tue, 10 Dec 2019 22:34:33 -0800

Operation database of performance test tools Loadrunner and Redis

Copyright notice: This is the original article of the blogger. It can't be reproduced without the permission of the blogger. Welcome to my blog https://blog.csdn.net/smooth00/article/details/72843748 1. Create a new script in loadrunner (take loadrunner 11 as an example in this paper). The protoco ...

Posted by ccalzaretta on Tue, 10 Dec 2019 16:50:46 -0800

Use try with resources to close resources gracefully

We know that in the process of Java programming, if external resources (file, database connection, network connection, redis, etc.) are opened, we must manually close these external resources after they are used. Because the external resources are not managed by the JVM, we can't enjoy the garbage collection mechanism of the JVM. If we don't ma ...

Posted by bladecatcher on Tue, 10 Dec 2019 16:08:38 -0800

If there is a problem in the Jedis case, can you help me see how to solve it? First of all, thank you for ordering in -- Day31

Today, I learned about Jedis, and then I made a case, but there was a mistake, and then I Baidu didn't solve it all night. I thought to see if I could have a big guy to help me see where the problem was. Baidu was a bit confused all night. Please help me out. I want to thank you very much in this place. Let's see. Thank you~ Here are the case r ...

Posted by Loafin on Mon, 09 Dec 2019 20:13:50 -0800

4. Construction and test of Redis connection pool

First, we will create a RedisPool class in our project The code is as follows: package com.mmall.common; import com.mmall.util.PropertiesUtil; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; /** * @author Chakid * @since 2018-10-30 20:15 */ public class RedisP ...

Posted by Virii on Mon, 09 Dec 2019 11:21:05 -0800

5. redis distributed lock

Reference link: https://www.cnblogs.com/linjiqin/p/8003838.html 1: Introduction There are three ways to implement distributed lock: 1. Optimistic database lock; 2. redis based; 3. zookeeper based. redis server is a single thread operation, which perfectly avoids the problem of multithreading synchronization and realizes atomicity. First of all, ...

Posted by freshrod on Sat, 07 Dec 2019 12:19:12 -0800

Spring integration redis spring data redis

Spring data redis encapsulates the operation of redis. It is very convenient to use redis in projects Integrating spring data redis is very simple. There are three files that need to be modified. 1.pom.xml 2.application-context.xml 3.redis.properties 1. Add spring data redis and redis dependencies in pom <dependency> ...

Posted by big_al on Tue, 03 Dec 2019 05:17:41 -0800

Notes on the installation of Redis3.0 in CentOS 6.5

CentOS 6.5 install Redis3.0 1. Install C compilation environment First, you need to install the C environment for compiling Redis, and execute the following commands at the command line: [root@itzhouq32 tools] yum install gcc-c++ 2. Upload redis3.0 to Linux 3. Unzip redis. I unzip it to / usr/local [root@itzhouq32 tools]# tar -xvf redis-3.0.0.t ...

Posted by jwwceo on Tue, 19 Nov 2019 10:43:52 -0800

Spring boot uses redis cache

1. pom import dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </depe ...

Posted by savedlema on Tue, 05 Nov 2019 10:44:31 -0800

Using redis under SpringBoot

When our project needs to use cache and high concurrency, we can use redis connection pool, let's go straight to the topic. The project environment of this paper is win 10, springboot 2.1.5.RELEASE, redis Java client jedis 2.9.3, fastjson 1.2.47 (for serialization). This project uses the lombok plug-in, so the set and get methods are replaced b ...

Posted by satanclaus on Wed, 16 Oct 2019 15:44:34 -0700