I developed an application with spring-boot 1.5.9, spring-data-redis 1.8.9 and lettuce 4.5.0.FINAL. Redis-server version is 6.0.5 I did performance benchmark on my machine for records (40 KB) insertion and the throughout is 2857 records inserted per sec.
I upgraded the application to spring-boot 2.3.1, spring-data-redis 2.3.1 and lettuce 5.3.1.FINAL. Redis-server version is 6.0.5. I didn't change the code to create connection. Just upgraded the spring boot. Now when I do benchmark, the performance is reduced lot. i.e., 1000 records (same 40KB) inserted per second.
Do we need to any configuration change after migrating to latest version?
Refer the code to create connection factory below:
@Beanpublic LettuceConnectionFactory lettuceConnectionFactory(){ return new LettuceConnectionFactory(hostName, port);}@Beanpublic RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory lettuceConnectionFactory) { RedisTemplate<String, Object> template = new RedisTemplate<>(); template.setConnectionFactory(lettuceConnectionFactory); return template;}