org.apache.shardingsphere.readwritesplitting.spi.ReadQueryLoadBalanceAlgorithm
Read query load balance algorithm’s definition
Configuration Type | Description | Fully-qualified class name |
---|---|---|
ROUND_ROBIN | the read database load balancer algorithm based on polling | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RoundRobinReadQueryLoadBalanceAlgorithm |
RANDOM | the read database load balancer algorithm based on random | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReadQueryLoadBalanceAlgorithm |
WEIGHT | the read database load balancer algorithm based on weight | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.WeightReadQueryLoadBalanceAlgorithm |
TRANSACTION_RANDOM | Whether in a transaction or not, read requests are routed to multiple replicas using a random strategy | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionRandomReadQueryLoadBalanceAlgorithm |
TRANSACTION_ROUND_ROBIN | Whether in a transaction or not, read requests are routed to multiple replicas using a round-robin strategy | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionRoundRobinReadQueryLoadBalanceAlgorithm |
TRANSACTION_WEIGHT | Whether in a transaction or not, read requests are routed to multiple replicas using a weight strategy | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionWeightReadQueryLoadBalanceAlgorithm |
FIXED_REPLICA_RANDOM | Open transaction, and the read request is routed to a fixed replica using a random strategy; if the transaction is not opened, each read traffic is routed to a different replica using the specified algorithm | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaRandomReadQueryLoadBalanceAlgorithm |
FIXED_REPLICA_ROUND_ROBIN | Open transaction, and the read request is routed to a fixed replica using a round-robin strategy; if the transaction is not opened, each read traffic is routed to a different replica using the specified algorithm | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaRoundRobinReadQueryLoadBalanceAlgorithm |
FIXED_REPLICA_WEIGHT | Open transaction, and the read request is routed to a fixed replica using a weight strategy; if the transaction is not opened, each read traffic is routed to a different replica using the specified algorithm | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaWeightReadQueryLoadBalanceAlgorithm |
FIXED_PRIMARY | All read traffic is routed to the primary | org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedPrimaryReadQueryLoadBalanceAlgorithm |