Getting less throughput on spring-boot 2 and lettuce

Skip to first unread message

Jul 16, 2020, 2:49:12 AM7/16/20
to lettuce-redis-client-users

Hi All,

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 (each record size is 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:

public LettuceConnectionFactory lettuceConnectionFactory()
    return new LettuceConnectionFactory(hostName, port);

public RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory lettuceConnectionFactory) 
    RedisTemplate<String, Object> template = new RedisTemplate<>();
    return template;

Reply all
Reply to author
0 new messages