OceanBase Database provides an enterprise-level native distributed architecture, which allows you to deploy OceanBase Database in distributed cluster mode. A distributed cluster provides financial-grade high availability and smooth scaling capabilities. It is highly compatible with Oracle and MySQL databases and is suitable for core business systems that demand high data security.
You can create distributed clusters in primary/standby mode based on your business needs.
Applicability
OceanBase Cloud Platform Community Edition only support create primary clusters.
Background information
- A cluster deployed on multiple hosts in a single zone can be scaled up only in terms of computing capabilities. The cluster does not support high availability and applies only to a development or test environment.
- A cluster with an even number of zones cannot meet the high availability requirements and has data security risks. We recommend that you adjust the configurations to ensure an odd number of zones or enable the arbitration service for the cluster or tenant.
Prerequisites
You have logged on to the OceanBase Cloud Platform (OCP) console with an account that has the permission to create clusters.
(Optional) If you are creating a multi-replica OceanBase cluster, you need to have an available OBProxy cluster in the current OCP. For information about how to create an OBProxy cluster, see the following topics:
You can create a standby cluster only for a primary cluster in the running state. The OceanBase Database version must be between V2.2.50 and V4.0.0.
Procedure
Log on to the OCP console.
If you do not have a manageable cluster, the system displays a message on the Clusters page, prompting you to create one. Click Create Cluster in the prompt.
If you already have a manageable cluster, go to the Clusters page, and then click Create Cluster in the upper-right corner.
On the Create Cluster page, select Distributed Cluster in the upper-right corner.
Set the basic information of the cluster.
Create a primary cluster

The following table describes the parameters in the Basic Settings section when you select Primary Cluster for Cluster Type.
Parameter Description Cluster Type Select Primary Cluster. Cluster Name The name of the cluster to be created. The cluster name must be 2 to 48 characters in length and can contain uppercase and lowercase letters, digits, and underscores (_). The cluster name must start with letters. Root@sys Password This password can be customized or randomly generated. The password must meet the following complexity requirements: - The length is 8 to 32 characters.
- The password contains at least three of the following character types: digits(0~9), uppercase letters(A~Z), lowercase letters(a~z), and special characters (ie:
~!@#%^&*_-+=|(){}[]:;,.?/).
OceanBase Database Version You can select an OceanBase Database version from the drop-down list or click Add Version at the bottom of the list to upload an OceanBase Database version. Associate OBProxy Cluster You can associate the cluster with an OBProxy cluster. If you want to create a multi-replica OceanBase cluster, we recommend that you enable this option and select an existing OBProxy cluster to associate with the OceanBase cluster. After the association, the SQL requests of your business will be accurately forwarded to a replica.
1. The proxyro user is used for association by default. You do not need to enter a username or password.
2. Select the target OBProxy cluster from the drop-down list. If no OBProxy cluster is available, create one by referring to Prerequisites.Notice
If OceanBase Version was set to V4.0 or later, only the OBProxy cluster of V4.0.0 or later versions can be associated.Create a standby cluster

The following table describes the parameters in the Basic Settings section when you select Standby Cluster for Cluster Type.
Parameter Description Cluster Type Select Standby Cluster. OCP to Which Leader Cluster Belongs This parameter is required for OCP in multi-cluster mode. For information about multi-cluster mode, see OCP multi-cluster mode overview. Primary Cluster Select the primary cluster. The system will create a standby cluster for the selected primary cluster. Backup cluster OceanBase version Select the same OceanBase version as the primary cluster. - If the version is available in the drop-down list, select it directly from the list.
- Otherwise, click Add Version at the bottom of the list to upload the version.
Set the deployment mode of the cluster.
Three zones are added for a cluster by default. To deploy more than three zones for the cluster, click NewZone. To deploy less than three zones for the cluster, click the
icon.
The following table describes the settings for each zone.
Parameter Description Zone Name Can be kept as default or customized. The zone name must be 2 to 48 characters long and supports uppercase and lowercase letters, digits, and underscores (_). It must start with a letter. In a multi-zone OceanBase cluster, one zone must share the same region as the primary zone. IDC The IDC of the zone. A zone can only exist in one IDC. Model Optional. If a host model is selected, the host list will be filtered based on the host model. CPU Architecture If multiple installation packages with different architectures are available in the selected OceanBase version, you must select a host hardware architecture that matches the target installation package. Notice
- The default architecture type is the architecture type of the first installation package, but it can be changed. After changing to a specified architecture, the Host drop-down list will show the hosts of that architecture.
- If different architectures are set for different zones, there may be stability and performance issues with mixed architecture deployment mode. Please proceed with caution.
Host You can select or add hosts. Root Service Select an IP address as the host for the RootService. In a multi-replica OceanBase cluster, you must specify a Root Server for each zone. Zone Priority Rankings (Not required when creating a standby cluster) Whether to specify priorities for the zones in which the leader and follower replicas of the sys tenant in the cluster are located. - If you specify the priorities, the zone with the first priority is regarded as the only primary zone. Perform the following steps to specify zone priorities:
1. Select one or more zones from the left-side list, which shows all zones available in the cluster.
2. Click the
button in the middle. The selected zones are added to the Priority Rankings list on the right. The zones that are selected at the same time have the same priority.
3. Repeat the preceding two steps to add zones of a lower priority.
4. You can drag the zones in the Priority Rankings list to adjust their priorities. The priority decreases from top to bottom in the list. - If not specified, the first zone will be considered as the first priority.
Add Arbitration Service Whether to add an arbitration service for the cluster. You can select a service from the drop-down list or click Create Service to create one. For more information, see Add an arbitration service. Note
An arbitration service can be added only for the primary cluster of OceanBase V4.1.0 or later.Enable Parameter Settings and specify cluster parameters.
You can click the button in section ① of the following figure to add startup parameters one by one and set their values.
You can also click Select Parameter Template as shown in section ② of the following figure and select a parameter template. The system will automatically fill in the parameters and configurations from the template into this field.
Note
- If you use OceanBase Database V2.2.77, we recommend that you use the built-in 2.2.77 Version Parameter Template. This template includes commonly used parameter settings for OceanBase Database V2.2.77. You can directly apply this template for the initialization settings of the cluster.
- If no cluster parameter template is available, you can click Create Cluster Parameter Template to create one. For more information, see Manage cluster parameter templates.

Enable Custom Settings and configure the OS user, paths, and ports.
Configure the OS user:
The OS user is used to install, configure, and run the OBServer node, and cannot be edited after being set. You can change the default value of the
ocp.operation.default.os.userparameter to set this user. For more information, see Modify system parameters.Note
The modification of theocp.operation.default.os.userparameter takes effect only when you create a distributed cluster, create an OBProxy cluster, or create an arbitration service, and does not affect other configurations of existing clusters.
Configure the paths:
Parameter Description Software Installation Path - If the OS user is admin, the default software installation path is
/home/admin/oceanbase. The path can be customized. - If the OS user is not admin, the default software installation path is
/opt/oceanbase/oceanbase. The path can be customized.
Data Disk Path The default value is /data/1. The path can be customized.Log Disk Path The default value is /data/log1. The path can be customized.Click Test to check whether the paths can be used. If a path cannot be used, you can perform troubleshooting based on the test results, or use another path.

- If the OS user is admin, the default software installation path is
Configure the ports:
Parameter Description SQL Port The default value is 2881. The port can be customized.RPC Port The default value is 2882. The port can be customized.Click Test to check whether the ports are occupied. If a port is occupied, you must use another port.
After the test succeeds, click Submit.
In the Confirm Information dialog box, confirm the information and then click OK.
You can also choose System Management > Tasks to view the progress of the task.