Skip to content

Connections for ReadFrom settings #2060

Answered by mp911de
akshagr asked this question in Q&A
Discussion options

You must be logged in to vote

ReadFrom.MASTER uses internally an optimization to the write-connection only. Since replicas aren't master nodes, ReadFrom.MASTER does not create read connections to replicas. You might see connections to replicas only in two cases:

  1. Topology update
  2. Topology changes when a replica is being promoted to a MASTER and if a MASTER is demoted to REPLICA, then the connection remains still open.

If a master is down, then the command is going to timeout. If a slot is not covered, then you will experience a PartitionSelectorException exception.

About REPLICA_PREFERRED: PREFERRED modes prefer to use a particular type of node. We always check if the connection is open and try to use a healthy connec…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@akshagr
Comment options

Answer selected by akshagr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants