enable_single_leader_node_routing specifies whether to apply more efficient routing rules when a tenant is deployed in leader concentration mode where replicas of the tenant are distributed in the 1:1:1 (leader:follower:follower) pattern in the OceanBase cluster. If enable_single_leader_node_routing is set to True for a tenant deployed in leader concentration mode, OceanBase Database Proxy (ODP) uses more efficient routing rules to quickly route strong-consistency read requests to the leader when it forwards requests of this tenant. This can improve the routing and forwarding performance by 20% to 30%.
Note
This parameter was introduced in ODP V4.3.1.
If you set this parameter to
Truefor a tenant deployed in leader concentration mode, the MySQL protocol, instead of the OceanBase 2.0 protocol, is used. If the features or components of the OceanBase 2.0 protocol are required for using ODP, you need to set this parameter toFalse.This parameter is invalid if the OceanBase cluster is deployed on a single node.
| Attribute | Description |
|---|---|
| Parameter type | Boolean |
| Default value | True |
| Value range |
|
| Effective upon ODP restart | No |
Take note of the following considerations:
When this parameter is set to
True, ODP automatically adjusts the routing rules of a tenant if its replica distribution meets the conditions, and the tenants whose replica distribution does not meet the conditions are not affected.When this parameter is set to
Trueand the replica distribution of a tenant meets the conditions, the following features of the tenant are unavailable. To use these features, you need to manually set this parameter toFalse.Distributed transaction routing
Replicated table-based load-balanced routing
Latency threshold for weak-consistency reads