Allow providing custom ClusterTopologyRefresh implementation.
See original GitHub issueFeature Request
Is your feature request related to a problem? Please describe
During our load tests we have noticed an increasing level of CPU in each node of our Redis cluster that was proportional to the number of server connected.
Each server was on idle (no requests) and had a single Redis lettuce client instance running.
By looking at the Redis metrics we noticed that each node was constantly accepting new connections and reading the command logs we narrowed down the cause to the cluster topology refresh requests.
The DefaultClusterTopologyRefresh
class creates new connection every time is called.
We have already increased the cluster topology refresh and we have switched the dynamicRefreshSources
off, so the client refresh the topology is done against the seeds, in our case a single node.
With this adjustments we saw improvements but the CPU problem is still there.
This limits our ability to scale the number of server instances.
Describe the solution you’d like
Modify the DefaultClusterTopologyRefresh
class to keep the connection alive so they can be re-used between topology refresh calls.
Maybe the ConnectionTracker
class can be leveraged to store the connections between the calls.
Teachability, Documentation, Adoption, Migration Strategy
I will be happy to implement this feature, but I would like to know your opinion and maybe suggestions around the implementation.
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
That’s in place now.
Nice, thanks a lot!