复古 护眼 海天 深邃 暗黑 默认

ReadQueryLoadBalanceAlgorithm

全限定类名

org.apache.shardingsphere.readwritesplitting.spi.ReadQueryLoadBalanceAlgorithm

定义

读库负载均衡算法

已知实现

配置标识 详细说明 全限定类名
ROUND_ROBIN 基于轮询的读库负载均衡算法 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RoundRobinReadQueryLoadBalanceAlgorithm
RANDOM 基于随机的读库负载均衡算法 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReadQueryLoadBalanceAlgorithm
WEIGHT 基于权重的读库负载均衡算法 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.WeightReadQueryLoadBalanceAlgorithm
TRANSACTION_RANDOM 无论是否在事务中,读请求采用随机策略路由到多个读库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionRandomReadQueryLoadBalanceAlgorithm
TRANSACTION_ROUND_ROBIN 无论是否在事务中,读请求采用轮询策略路由到多个读库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionRoundRobinReadQueryLoadBalanceAlgorithm
TRANSACTION_WEIGHT 无论是否在事务中,读请求采用权重策略路由到多个读库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionWeightReadQueryLoadBalanceAlgorithm
FIXED_REPLICA_RANDOM 显式开启事务,读请求采用随机策略路由到一个固定读库;不开事务,每次读流量使用指定算法路由到不同的读库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaRandomReadQueryLoadBalanceAlgorithm
FIXED_REPLICA_ROUND_ROBIN 显式开启事务,读请求采用轮询策略路由到一个固定读库;不开事务,每次读流量使用指定算法路由到不同的读库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaRoundRobinReadQueryLoadBalanceAlgorithm
FIXED_REPLICA_WEIGHT 显式开启事务,读请求采用权重策略路由到多个读库;不开事务,每次读流量使用指定算法路由到不同的读库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaWeightReadQueryLoadBalanceAlgorithm
FIXED_PRIMARY 读请求全部路由到主库 org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedPrimaryReadQueryLoadBalanceAlgorithm