lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

Improve Document on dynamicRefreshSources

Open DanielYWoo opened this issue 2 years ago • 0 comments

Feature Request

The doc says

         * Discover cluster nodes from topology and use the discovered nodes as source for the cluster topology. Using dynamic
         * refresh will query all discovered nodes for the cluster topology and calculate the number of clients for each node.If
         * set to {@code false}, only the initial seed nodes will be used as sources for topology discovery and the number of
         * clients will be obtained only for the initial seed nodes. This can be useful when using Redis Cluster with many
         * nodes. Defaults to {@code true}. See {@link ClusterTopologyRefreshOptions#DEFAULT_DYNAMIC_REFRESH_SOURCES}.

I believe we use "CLUSTER INFO" to build the client view of the cluster topology (nodes and slot partitions), if we only query seeds, or even a single seed, we still have the whole cluster view, that's efficient and no need to query all nodes. The only reason we query all nodes is to get the number of connections per node by "INFO" command, right? But, I don't get why we need the number of clients, is it for least-connection strategy with pub/sub? Can we specify why and the usage scope of this parameter?

Is your feature request related to a problem? Please describe

No

Describe the solution you'd like

N/A

Describe alternatives you've considered

N/A

Teachability, Documentation, Adoption, Migration Strategy

N/A

DanielYWoo avatar Jul 05 '22 08:07 DanielYWoo