To implement load balancing of business traffic, the client driver such as the JDBC driver needs the corresponding traffic entry nodes and traffic allocation strategy. Through client configuration, you can synchronize the node information and load balancing strategy of an OBProxy cluster as an application to the client program. The client obtains the application configuration information for load balancing.
Add an application
Log on to the OceanBase Cloud Platform (OCP) console.
In the left-side navigation pane, click OBProxy.
In the OBProxy cluster list, click the target OBProxy cluster. Then, the Overview page of the OBProxy cluster appears.
In the left-side navigation pane, click Client Configuration. Then, the Client Configuration overview page appears.
Click Add Application in the upper-right corner and then enter application information in the right-side pane.
Parameter Description Application Name The name of the application. It must begin with a letter and can contain 4 to 32 letters, digits, and underscores (_). Notice
The application name is globally unique in OCP.Description Optional. The description of the application, which must be 0 to 256 characters in length. Load Balancer If multiple load balancing strategies are configured, the client program applies the load balancing configuration in polling mode based on the sequence of configured load balancing strategies.**** You must configure at least one load balancing strategy for the application. Strategy The load balancing strategy. Valid values: RANDOM, SERVERAFFINITY, and ROTATION. You cannot select a strategy repeatedly. - RANDOM: random
- SERVERAFFINITY: weighting
- ROTATION: polling
OBProxy The OBProxy list for the load balancing strategy in the IP address:Port number (weight)format. You can select multiple OBProxies. The weight is used only when the load balancing strategy is set to SERVERAFFINITY. The value range for weight is 1 to 10. A greater number indicates a higher weight.Global Configuration The global configuration information about the application. OBLB_RETRY_ALL_DOWNS Optional. The number of connection attempts to all nodes. When this threshold is exceeded, a connection exception is thrown. Node Blacklist Strategy The strategy for blacklisting a node, which is disabled by default. Valid values: NORMAL and RETRYTIMES. - NORMAL: the normal strategy. This is the default strategy. If a network exception is thrown for a connection attempt to a node, this node will be blacklisted and no other parameters are needed for judgment.
- RETRYTIMES: specifies to retry within the specified period. After the specified number of retry attempts to a node is exceeded, the node is blacklisted. The blacklisting judgment is made based on the RETRYTIMES and DURATION parameters.
DURATION The period for retry attempts. This parameter is displayed when Node Blacklist Strategy is set to RETRYTIMES. RETRYTIMES The period for retry attempts. This parameter is displayed when Node Blacklist Strategy is set to RETRYTIMES. Node Unblacklist Strategy If this strategy is enabled, a node will be removed from the blacklist when the specified timeout period expires. TIMEOUT The timeout period for blacklisting a node. A node will be removed from the blacklist when the timeout period expires. This parameter is displayed when Node Unblacklist Strategy is enabled. 
Click OK.
Modify an application
Log on to the OCP console.
In the left-side navigation pane, click OBProxy.
In the OBProxy cluster list, click the target OBProxy cluster. Then, the Overview page of the OBProxy cluster appears.
In the left-side navigation pane, click Client Configuration. Then, the Client Configuration overview page appears.
Select the application to edit and then click Edit in the upper-right corner.
In the dialog box that appears, modify related information and then click OK to save the modifications.
Delete an application
Log on to the OCP console.
In the left-side navigation pane, click OBProxy.
In the OBProxy cluster list, click the target OBProxy cluster. Then, the Overview page of the OBProxy cluster appears.
In the left-side navigation pane, click Client Configuration. Then, the Client Configuration overview page appears.
Select the application to delete and then click Delete in the upper-right corner.
In the dialog box that appears, click Yes.
Note
After you delete an application, the client program cannot reference this configuration instance for load balancing. Proceed with caution.