Skip to content

Creating multiple cluster clients versus higher connections per host #23

@konradreiche

Description

@konradreiche

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions