After Redis 4.0, Redis can execute multi thread some functions (1. deleting objects in backgrounds, etc.), but Redis still usually uses single thread. FAQ - Redis
So I guess lettuce is useless. Lettuce is redis client that can use multiple threads in 1 connections, but Redis can use only single thread in 1 connection.
Can you recommend to use lettuce for Redis client? Why?
Because you spend time not only while Redis executes commands, but also transferring data (sending commands, recieving results). In single thread mode while you transfer, Redis doesn't work. While Redis works, no transfer occures. Multiple connections or one pipelined connection are here to help you saturate both bandwidth and CPU cycles.
And luttece is not only about speed. It also helps you organize your code better with asynchronous and reactive API.
Back to performance topic, here is a simple benchmark to get general understanding of threading and pooling impact. Note, that while pooling is a bit slower (you spend some time on pool operations), it allows you to isolate actions (so an error doesn't affect other threads) and use
MULTI
and blocking commands.Here are my results (local system has 4 cores, remote system CPU is about 2 times slower):
Threads=1
Threads=2
Threads=4
You can see here that performance scales very well with the number of threads, so lettuce is not useless.