redispipe
redispipe copied to clipboard
Creating multiple cluster clients versus higher connections per host
In a recent refactor I changed code to instantiate one Redis cluster client but configure it to use more connections per host with the connsPerHost
setting. I noticed performance was regressing a lot. Is this expected?
I read through the source code and evidently the more connections per host, the more goroutines are running. I couldn't explain why the performance was regressing, maybe more locking? In my case there are different implementations making use of the Redis client going to the same cluster. Overall performance is much better when instantiating a client per use case.