Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not require CLIENT LIST in cluster topology refresh #973

Closed
bentharage opened this issue Jan 28, 2019 · 3 comments
Closed

Do not require CLIENT LIST in cluster topology refresh #973

bentharage opened this issue Jan 28, 2019 · 3 comments
Labels
type: feature A new feature
Milestone

Comments

@bentharage
Copy link

bentharage commented Jan 28, 2019

We are using Lettuce 5.0.0 and spring-data-redis(v2.1.3) in our application.
We are using a redis cluster and CLIENT/CONFIG commands on redis has been removed for security reasons.

Our application is running without any flows when those commands are present but fails to connect to redis without them.

Following error occurs:

2019-01-28 13:55:47.482  WARN 25442 --- [           main] i.l.c.c.topology.ClusterTopologyRefresh  : Cannot retrieve partition view from RedisURI [host='localhost', port=7000], error: java.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: ERR unknown command `CLIENT`, with args beginning with: `LIST`, 

Is there are any workaround to overcome this problem?

@mp911de mp911de added the type: feature A new feature label Jan 28, 2019
@mp911de
Copy link
Collaborator

mp911de commented Jan 28, 2019

Lettuce uses CLIENT LIST to determine the number of connected clients for load balancing. We could make this information optional. Lettuce uses the client count to determine a cluster node with the least number of clients to use that one as default node. The default node is used for Pub/Sub and key-less commands.

@mp911de mp911de changed the title Lettuce won't conect when CLIENT command in redis is removed. Do not require CLIENT LIST in cluster topology refresh Jan 28, 2019
mp911de added a commit that referenced this issue Jan 28, 2019
Topology refresh now no longer requires a successful completion of CLIENT LIST during the refresh. Errors can happen if the command is disabled.

Previously, an entire cluster node was disabled if the client list could not be retrieved and so the node was not considered in the routing table. Ignoring failed CLIENT LIST commands disables default connection load balancing that helped previously to use the cluster node with the least number of connections.
@mp911de mp911de added this to the 5.2.0 milestone Jan 28, 2019
@mp911de
Copy link
Collaborator

mp911de commented Jan 28, 2019

That change is in place now.

@mp911de mp911de closed this as completed Jan 28, 2019
@bentharage
Copy link
Author

bentharage commented Jan 29, 2019

That change is in place now.

@mp911de →Thank you very much for the change & reply.
I tried the snapshot build and worked without any problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

No branches or pull requests

2 participants