This section will guide you on how to scale a standalone system to a distributed cluster.
Background information
- When you scale out a standalone cluster to a multi-host cluster in a single zone, only the computing power of OceanBase Database is enhanced. The cluster does not support multi-replica high availability. This mode is suitable for development and test environments.
- When you scale out a standalone cluster to an even number of zones, the cluster cannot meet the high availability requirements and may cause data security risks. We recommend that you modify the configuration to ensure that an odd number of zones is used, or enable the arbitration service for the cluster or tenant.
Prerequisites
Make sure that the user who logs in to OCP has the following permissions:
- The resource permission of OCP:ClusterMaintenance.
- The permission of the Overview menu of the cluster.
The standalone cluster to be scaled out is in the RUNNING state.
Before you scale out the standalone cluster, make sure that the distributed OceanBase Database software package meets the following requirements:
- The package name does not contain the
standaloneidentifier. - The package version is the same as the version of the standalone cluster. For example, both the standalone and distributed OceanBase Database are V4.2.5.4.
- The system architecture of the package is the same as that of the standalone cluster.
- The package name does not contain the
Considerations
- The operation of scaling out a standalone cluster to a distributed cluster is high-risk and will interrupt business access. We recommend that you perform this operation under the technical guidance of OceanBase Database engineers.
- Before you proceed, read through the official documentation Considerations when you scale out a standalone cluster to a distributed cluster carefully to confirm whether the current database version supports the scaling out to a distributed cluster. If you proceed without confirmation, the cluster may become unavailable.
Considerations
If the cluster has the cgroup enabled, and the version of the operating system kernel of the host selected for scaling out is earlier than 5.1.0, we recommend that you disable the cgroup of the cluster. Otherwise, the system performance may drop or become unstable.
Procedure
Log in to the OCP console.
In the left-side navigation pane, click Cluster. The Clusters page automatically appears.
On the Clusters page, find the target cluster and click its name.
On the Overview page of the cluster, click Extended Distributed Cluster.
In the dialog box that appears, understand the operation risks. If you still want to proceed, click Scale Out.
In the panel that appears on the right, configure the following information.
Select the software package type. By default, it is the same as the standalone edition. If the system cannot identify the software package type of the standalone edition, you need to manually select an appropriate package based on the operating system version.
Configure the relevant information for scaling out.
By default, the system scales out the cluster in Create Zone mode. You can click the Add OBServer Node tab to scale out the cluster to multi-host single-zone mode. In Create Zone mode, you can click Create Zone to add multiple zones.
Configuration Description Zone Name The name of the zone. When you scale out the cluster in Add OBServer Node mode, you cannot edit the zone name. IDC The IDC where the zone is located. When you scale out the cluster in Add OBServer Node mode, you cannot edit the IDC. Host Type Optional. If you select a host type, the host list will be filtered based on the host type. CPU Architecture The CPU architecture of the zone must be the same as that of the cluster. - When you scale out the cluster in Add OBServer Node mode, you cannot edit the CPU architecture.
- When you scale out the cluster in Create Zone mode, after you select an architecture, the system checks whether an installation package is available for the CPU architecture of the standalone edition. If no installation package is available for the specified architecture, the zone cannot be added.
Host When you scale out the cluster in Create Zone mode, you can select only one host as an OBServer and a RootServer. When you scale out the cluster in Add OBServer Node mode, you can select multiple hosts. - If no host is available in the drop-down list, you can perform Add Host.
- In a production environment, OceanBase Database recommends that the log disk space be at least three times the host memory space. To avoid performance issues, we recommend that you do not mount the data directory and log directory to the same disk.
Tenant Configuration When you scale out the cluster in Create Zone mode, you can configure the replica information for all tenants in the cluster at a time. - The replica information to be configured includes: replica type, unit specification, and unit quantity.
- One row of information is for one tenant. If you need to configure multiple tenants, click Add Tenant to add more rows.
- The unit quantity is automatically filled in based on the selected tenant and cannot be edited.
Perform custom settings to configure the OS user, path, and port of the OBServer node. For more information, see Custom configuration in Create a distributed cluster.
Configure the startup parameters of the OBServer. For more information, see OceanBase parameters.
Click OK.
In the dialog box that appears, you can click View Tasks to view the task progress. You can also view the task progress in Task Center.