Load balancing for partition replicas
OceanBase Database provides a parameter for you to manage load balancing for partition replicas.
The enable_rebalance parameter specifies to enable or disable load balancing for resource units and partition replicas. When the value of enable_rebalance is False, load balancing is disabled for partition replicas. When the value is True, this feature is enabled.
Load balancing for leaders
OceanBase Database provides a parameter for you to manage load balancing for leaders.
The enable_auto_leader_switch parameter specifies to enable or disable load balancing for leaders. When the value of enable_auto_leader_switch is False, load balancing is disabled for leaders. When the value is True, this feature is enabled.
Control resource unit balancing
OceanBase Database provides three parameters for you to manage load balancing for resource units.
The
enable_rebalanceparameter specifies to enable or disable load balancing for resource units and partition replicas. When the value ofenable_rebalanceisFalse, load balancing is disabled for resource units and partition replicas. When the value isTrue, load balancing for resource units is enabled or disabled based on the value of theresource_soft_limitparameter.The
resource_soft_limitparameter specifies to enable or disable load balancing for resource units. When the value ofenable_rebalanceis True, load balancing is enabled or disabled for resource units based on the value of this parameter. When the value ofresource_soft_limitis less than100, load balancing is enabled for resource units. When the value is greater than or equal to100, this feature is disabled.The
server_balance_cpu_mem_tolerance_percentparameter specifies the threshold to trigger load balancing for resource units. When the difference between the resource load of one or more OBServers and the average resource load of all OBServers in a cluster reaches the value that you specified for theserver_balance_cpu_mem_tolerance_percentparameter, load balancing is scheduled. The scheduling for load balancing stops when the difference is less than the value specified for theserver_balance_cpu_mem_tolerance_percentparameter.