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

Optimization: Use Cluster write connections for read commands when using ReadFrom.MASTER #923

Closed
mp911de opened this issue Nov 20, 2018 · 0 comments
Labels
type: feature A new feature
Milestone

Comments

@mp911de
Copy link
Collaborator

mp911de commented Nov 20, 2018

Redis Cluster connections can utilize up to twice the number of the number of master nodes during operations. This is because Redis Cluster connections use separate read connections with READONLY set. This happens for replica and master connections.

We should be able to optimize if master-only operations are used, if ReadFrom.MASTER is set. In this case, we can assume that write connections are safe to use for reading operations and we can skip connection creation.

@mp911de mp911de added the type: feature A new feature label Nov 20, 2018
@mp911de mp911de modified the milestones: Backlog, 5.1.3 Nov 20, 2018
mp911de added a commit that referenced this issue Nov 24, 2018
…ASTER #923

Lettuce now reuses master connections when ReadFrom is configured to MASTER (which is the default configuration). By reusing the master connection, we can reduce the number of used connections by up to 50% as we don't need an additional read connection while talking to the same node.
mp911de added a commit that referenced this issue Nov 24, 2018
…ASTER #923

Lettuce now reuses master connections when ReadFrom is configured to MASTER (which is the default configuration). By reusing the master connection, we can reduce the number of used connections by up to 50% as we don't need an additional read connection while talking to the same node.
@mp911de mp911de closed this as completed Nov 24, 2018
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

1 participant