OceanBase Database Proxy (ODP), also known as OBProxy, is a database proxy middleware provided by OceanBase. ODP supports connection pool management, load balancing, and failovers. ODP is an optional component. You can determine whether to deploy it based on your application requirements and scenarios.
This topic describes how to create an ODP cluster in OceanBase Cloud Platform (OCP).
Note
- This topic uses OCP V4.1.0 as an example. The GUI varies with the OCP version.
- After you deploy ODP on a server, ODP provides the proxy service of OceanBase Database by exposing a socket in the format of
IP address:port. You can access OceanBase Database through the socket in the same way you access MySQL Database. We recommend that you deploy ODP on an OBServer node. - We recommend that you deploy only one ODP on a server and use port
2883. If you deploy two or more ODPs on the same server, you must specify different ports.
Prerequisites
- You have deployed OCP. For more information, see Deploy OCP.
- You have the
OBPROXY_MANAGERrole or the permissions to manage ODP. For more information, see Role overview and Default OCP roles. - You have obtained the RPM package of ODP. For more information, see Prepare installation packages.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click OBProxy to go to the OBProxy page.
On the OBProxy page, click Create OBProxy Cluster in the upper-right corner.
On the Create OBProxy Cluster page, specify parameters in the Basic Settings section.
Parameter Description Cluster Name You can customize the cluster name. The value must start with a letter and can contain letters, digits, and underscores (_). Enter the password of the proxyro user The proxyro user is used to access an OceanBase cluster from an ODP. If no password is specified, the default password of the proxyro user is used. The password must meet the following requirements: - Be 8 to 32 characters in length.
- Contain only letters, digits, and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + = ` | ( ) { } [ ] : ; ' , . ? / - Contain at least two uppercase letters, two lowercase letters, two digits, and two special characters.
Manage Load Balancer By default, this parameter is disabled.
- If this parameter is disabled, you must specify the following information:
- Access URL: the access URL of the ODP cluster. It is only used to generate a connection string of the tenant and does not affect actual use. For a virtual IP (VIP) address, you must apply for the VIP and bind it to the ODP server.
- Access Port: the default access port is 2883. You can change the access port.
- If this parameter is enabled, you must specify the following information:
- Load Balancer: the default value is
OBLB. The Server Load Balancer (SLB) service of Alibaba Cloud applies only to the Apsara Stack environment. We recommend that you contact OceanBase Technical Support for assistance. - OBLB Service: You can select an OBLB service that is deployed when you deploy OCP, or click Add OBLB Service and create an OBLB service in the right-side panel.
- VIP: the virtual IP address of the OBLB service.
- Access Port: the default access port is 2883. You can change the access port.
- Domain Name Configuration (optional): the configuration that points to the VIP and port. The platform does not provide the mappings between VIPs and domain names. You must configure the domain name resolution service.
- Load Balancer: the default value is
Startup Method The startup method of the ODP cluster. Valid values: - ConfigUrl: specifies the multicluster startup method, where the ODP cluster can access multiple OceanBase clusters.
- RsList: specifies the single cluster startup method. The OBProxy cluster can only access the OceanBase cluster specified when the OBProxy cluster is created. After an OBProxy cluster is created, no more connectable OceanBase clusters can be added.
(Optional) On the Create OBProxy Cluster page, turn on Deploy OBProxy and specify the parameters.
If you want to deploy the ODP when you create an ODP cluster, you can skip this step. After the cluster is created, you can add an ODP to the cluster by taking the following actions: take over an ODP or add an ODP.
Toggle on the Deploy OBProxy section, and refer to the following table to specify the parameters.
Parameter Description SQL Port Number The default port is 2883. Exporter Port Number The default port is 2884. Software Version Select the version of ODP to install. Note
If a cluster of OceanBase Database V4.0.0 or later exists in the connectable OceanBase clusters, you can select only an ODP package whose version is V4.0.0 or later.
Parameters about ODP hosts Specify the information of the host for deploying ODP, including the IDC, host type, and host IP address.
By default, the system provides two host options for configuring only two ODPs. To deploy more ODPs, click Add OBProxy to add more hosts. If you need to deploy only one ODP, click the Delete icon next to a host option to delete the host.(Optional) On the Create OBProxy Cluster page, specify the cluster parameters.
Enable Parameter Settings, and add or modify the startup parameters and other parameters.
Click Submit in the lower-right corner.