OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Deployer

V3.2.0Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quickly deploy OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Binlog commands
    • Host commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Overview
    • Deploy through GUI
      • GUI operation overview
      • Mode configuration rules
      • Deploy an OceanBase cluster on the GUI
      • Deploy OCP through the GUI
      • Modify components on the GUI
      • Upgrade OCP on the GUI
    • Deploy through CLI
      • Configuration files
      • Deploy Component
        • Deploy OceanBase Database on a single OBServer node
        • Deploy OCP Express by using commands
        • Deploy and use obconfigserver
        • Deploy the obbinlog
        • Deploy oblogproxy by using the CLI
        • Deploy OCP by using commands
      • Manage Cluster
        • Physical Standby Database
          • Deploy primary and standby tenants by using obd
          • Switch the roles of tenants and decouple a standby tenant from the primary tenant
        • Scale out a cluster and change cluster components
        • Performance test
        • Cluster diagnotistics
        • Add GUI-based monitoring for an existing cluster
      • Takeover Cluster
        • Use OCP to take over a cluster deployed by obd
        • Use obd to take over a cluster
      • Upgrade Component
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OCP Express
      • Backup and restore
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V3.2
      • OceanBase Deployer V3.2.0
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployer V2.8.0
    • V2.7
      • OceanBase Deployer V2.7.0
    • V2.6
      • OceanBase Deployer V2.6.2
      • OceanBase Deployer V2.6.1
      • OceanBase Deployer V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployer V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployer V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployer V2.1.0
    • V2.0
      • OceanBase Deployer V2.0.1
      • OceanBase Deployer V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V3.2.0

Scale out a cluster and change cluster components

Last Updated:2026-10-09 07:44:06

Prerequisites
Scale out a cluster
Add a component
Delete a component
References

This topic describes how to scale out an OceanBase cluster managed by OceanBase Deployer (obd) and how to add a component to or delete a component from the cluster.

Prerequisites

Make sure that the following conditions are met:

  • The cluster is in the running state.

  • You have installed obd V2.5.0 or later in the environment.

  • You have installed OBClient in the environment.

Scale out a cluster

You can scale out all components of an OceanBase cluster except oblogproxy and obbinlog-ce. The following example describes how to scale out OceanBase Database Community Edition of an OceanBase cluster named test.

  1. The following sample code shows the information of the node to be added in a configuration file named scale_out.yaml:

    oceanbase-ce:
      servers:
        - name: server2
          ip: 10.10.10.2
      server2:
        mysql_port: 2881 # The external port for OceanBase Database. Default value: 2881.
        rpc_port: 2882 # The internal port for OceanBase Database. Default value: 2882.
        home_path: /home/admin/observer
        zone: zone2
    

    You can specify the information of the new node in a new configuration file, and you cannot modify the parameters such as those in the depends, global, or servers section in the configuration files of obd.

  2. Run the scale-out command. Here is an example:

    obd cluster scale_out test -c scale_out.yaml
    

    For more information about the obd cluster scale_out command, see Cluster commands.

    After the command is executed successfully, as shown below:

    Execute ` obd cluster display test ` to view the cluster status
    Trace ID: 3777cea4-dd1a-11ee-b38d-00163e0808cc
    If you want to view detailed obd logs, please run: obd display-trace 3777cea4-dd1a-11ee-b38d-00163e0808cc
    
  3. Verify the scale-out result.

    You can copy and run the obd cluster display command to view the status of the cluster. Here is an example of command output:

    +----------------------------------------------+
    |                  observer                    |
    +------------+---------+------+-------+--------+
    | ip         | version | port | zone  | status |
    +------------+---------+------+-------+--------+
    | 10.10.10.1 | 4.2.1.2 | 2881 | zone1 | ACTIVE |
    | 10.10.10.2 | 4.2.1.2 | 2881 | zone2 | ACTIVE |
    +------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    

    You can also copy the obclient command in the output and run the command to log on to the OceanBase cluster, and then run the select svr_ip,id,zone,status from __all_server; command to view information about nodes in the cluster. Here is an example of command output:

    +------------+----+-------+--------+
    | svr_ip     | id | zone  | status |
    +------------+----+-------+--------+
    | 10.10.10.1 |  1 | zone1 | ACTIVE |
    | 10.10.10.2 |  2 | zone2 | ACTIVE |
    +------------+----+-------+--------+
    

Add a component

You can add a component to a running cluster. All components that can be deployed by using obd, except obbinlog-ce, can be added. Note that you can add only a component that does not exist in the cluster.

The following example describes how to add OBAgent to an OceanBase cluster named test.

  1. View the component information.

    obd cluster edit-config test
    

    The following output indicates that only OceanBase Database Community Edition and ODP Community Edition exist in the cluster.

    ##Only need to configure when remote login is required
    user:
      username: admin
      key_file: /home/admin/.ssh/id_rsa
    oceanbase-ce:
      servers:
        - name: server1
          ip: 10.10.10.1
        - name: server2
          ip: 10.10.10.2
        - name: server3
          ip: 10.10.10.3
      global:
        cluster_id: 1
        mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
        rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
        home_path: /home/admin/observer
        # Some parameters are omitted here.
      server1:
        zone: zone1
      server2:
        zone: zone2
      server3:
        zone: zone3
    obproxy-ce:
      depends:
        - oceanbase-ce
      servers:
        - 10.10.10.1
      global:
        listen_port: 2883 # External port. The default value is 2883.
        prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
        home_path: /home/admin/obproxy
        enable_cluster_checkout: false
        skip_proxy_sys_private_check: true
        enable_strict_kernel_release: false
        obproxy_sys_password: ******** # obproxy sys user password, can be empty. When a depends exists, obd gets this value from the oceanbase-ce of the depends.
    
  2. Create a configuration file named addtional_component.yaml to add OBAgent. Here is an example:

    obagent:
      depends:
        - oceanbase-ce
      servers:
        - name: server1
          ip: 10.10.10.1
        - name: server2
          ip: 10.10.10.2
        - name: server3
          ip: 10.10.10.3
      global:
        home_path: /home/admin/obagent
    

    Notice

    Parameters in the servers section in the configuration file of OBAgent must be identical to those of OceanBase Database Community Edition.

  3. Run the following command to add the component:

    [admin@test ~]$ obd cluster component add test -c addtional_component.yaml
    

    For more information about the obd cluster component add command, see Cluster commands.

  4. Verify the result.

    After the command is executed, you can run the obd cluster display command to view the status of the cluster:

    [admin@test ~]$ obd cluster display test
    

    The following output indicates the information of OBAgent, which means that the component already exists in the cluster:

    +----------------------------------------------+
    |                  observer                    |
    +------------+---------+------+-------+--------+
    | ip         | version | port | zone  | status |
    +------------+---------+------+-------+--------+
    | 10.10.10.1 | 4.2.1.2 | 2881 | zone1 | ACTIVE |
    | 10.10.10.2 | 4.2.1.2 | 2881 | zone2 | ACTIVE |
    | 10.10.10.3 | 4.2.1.2 | 2881 | zone3 | ACTIVE |
    +------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    
    Connect to obproxy ok
    +----------------------------------------------+
    |                  obproxy                     |
    +------------+------+-----------------+--------+
    | ip         | port | prometheus_port | status |
    +------------+------+-----------------+--------+
    | 10.10.10.1 | 2883 | 2884            | active |
    +------------+------+-----------------+--------+
    obclient -h10.10.10.1 -P2883 -uroot -p'********' -Doceanbase -A
    Connect to Obagent ok
    +---------------------------------------------------------------+
    |                          obagent                              |
    +------------+--------------------+--------------------+--------+
    | ip         | mgragent_http_port | monagent_http_port | status |
    +------------+--------------------+--------------------+--------+
    | 10.10.10.1 | 8089               | 8088               | active |
    +------------+--------------------+--------------------+--------+
    

Delete a component

You can delete a component from an OceanBase cluster in the running state. Before you delete a component, make sure that the component exists in the cluster.

The following example describes how to delete OBAgent and ODP Community Edition from an OceanBase cluster named test.

  1. View the component information.

    obd cluster edit-config test
    

    The following output indicates that OceanBase Database Community Edition, ODP Community Edition, and OBAgent exist in the cluster.

    ##Only need to configure when remote login is required
    user:
      username: admin
      key_file: /home/admin/.ssh/id_rsa
    oceanbase-ce:
      servers:
        - name: server1
          ip: 10.10.10.1
        - name: server2
          ip: 10.10.10.2
        - name: server3
          ip: 10.10.10.3
      global:
        cluster_id: 1
        mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
        rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
        home_path: /home/admin/observer
        # Some parameters are omitted here.
      server1: 
        zone: zone1
      server2:
        zone: zone2
      server3:
        zone: zone3
    obproxy-ce:
      depends:
        - oceanbase-ce
      servers:
        - 10.10.10.1
      global:
        listen_port: 2883 # External port. The default value is 2883.
        prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
        home_path: /home/admin/obproxy
        enable_cluster_checkout: false
        skip_proxy_sys_private_check: true
        enable_strict_kernel_release: false
        obproxy_sys_password: ******** # obproxy sys user password, can be empty. When a depends exists, obd gets this value from the oceanbase-ce of the depends.
    obagent:
      depends:
        - oceanbase-ce
      servers:
        - name: server1
          ip: 10.10.10.1
        - name: server2
          ip: 10.10.10.2
        - name: server3
          ip: 10.10.10.3
      global:
        home_path: /home/admin/obagent
    
  2. Run the following command to delete components:

    [admin@test ~]$ obd cluster component del test obagent obproxy-ce
    

    For more information about the obd cluster component del command, see Cluster commands.

  3. Verify the result.

    After the command is executed, you can run the obd cluster display command to view the status of the cluster:

    [admin@test ~]$ obd cluster display test
    

    The following output indicates that ODP Community Edition and OBAgent no longer exist in the cluster:

    +----------------------------------------------+
    |                  observer                    |
    +------------+---------+------+-------+--------+
    | ip         | version | port | zone  | status |
    +------------+---------+------+-------+--------+
    | 10.10.10.1 | 4.2.1.2 | 2881 | zone1 | ACTIVE |
    | 10.10.10.2 | 4.2.1.2 | 2881 | zone2 | ACTIVE |
    | 10.10.10.3 | 4.2.1.2 | 2881 | zone3 | ACTIVE |
    +------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    

References

  • For more information about obd commands used in this topic, see Cluster commands.

  • After you scale out OceanBase Database Community Edition, you can also scale out a tenant or resource pool of the cluster. For more information, see Horizontal scaling of tenant resources in the OceanBase Database documentation.

  • For more information about how to log on to OceanBase Database by using OBClient, see Connect to an OceanBase Database tenant by using OBClient in the OceanBase Database documentation.

Previous topic

Switch the roles of tenants and decouple a standby tenant from the primary tenant
Last

Next topic

Performance test
Next
on this page
Prerequisites
Scale out a cluster
Add a component
Delete a component
References