Redisson vs Lettuce - Performance Comparison
See original GitHub issueI was just trying to do a simple performance test to compare Redisson and Lettuce. I really like Redisson. But Redisson seems to be consistently slower than Lettuce. Is this expected?
Redisson throughput = 58K requests / sec Lettuce throughput = 75K requests / sec
@RepeatedTest(10)
public void lettucePerformance() throws InterruptedException {
RedisClient redisClient = RedisClient.create("redis://localhost:6379/0");
StatefulRedisConnection<String, String> connection = redisClient.connect();
RedisReactiveCommands<String, String> reactiveCommands = connection.reactive();
long before = System.currentTimeMillis();
Mono<Void> mono = Flux.range(1, 500_000)
.flatMap(i -> reactiveCommands.incr("user:1"))
.then();
StepVerifier.create(mono).verifyComplete();
System.out.println((System.currentTimeMillis() - before) + " ms");
}
@RepeatedTest(10)
public void redissonPerformance() throws InterruptedException {
RAtomicLongReactive longReactive = client.getAtomicLong("user:2");
long before = System.currentTimeMillis();
Mono<Void> mono = Flux.range(1, 500_000)
.flatMap(i -> longReactive.incrementAndGet())
.then();
StepVerifier.create(mono).verifyComplete();
System.out.println((System.currentTimeMillis() - before) + " ms");
}
My Config:
I tried with this
config
.setNettyThreads(0)
.useSingleServer()
.setAddress("redis://127.0.0.1:6379");
and this.
config
.useSingleServer()
.setAddress("redis://127.0.0.1:6379");
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Feature Comparison: Redisson vs Lettuce
When it comes to Java distributed collections, Redisson has a much more ample feature set. Lettuce supports the following collections for plain commands...
Read more >Comparing Redis Clients - The Discreet Programmer
This article aims to provide a quick comparison between Redisson and Lettuce, two popular client libraries in Java for Redis – the popular ......
Read more >Picking between Redisson and Lettuce for Redis with ...
I haven't been able to find a proper comparison of the two from people who have tried them both or one of them...
Read more >Developers - Redisson vs Lettuce - Performance Comparison -
I was just trying to do a simple performance test to compare Redisson and Lettuce. I really like Redisson. But Redisson seems to...
Read more >Jedis vs. Lettuce: An Exploration | Redis
Lettuce is a Redis Java client that is fully non-blocking. It supports both synchronous and asynchronous communication. Its complex abstractions ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mrniko I could not get back to you. The performance looks good now.
@kitkars
Thank you for feedback.