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

V4.3.0Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quick deployment of OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment commands
    • Cluster commands
    • Command groups
    • Image and repository commands
    • Test command groups
    • Tool commands
    • obdiag commands
    • Binlog service commands
    • Hardware commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Usage overview
    • Deploy through GUI
      • Overview
      • Pattern configuration rules
      • Deploy an OceanBase cluster
      • Deploy OCP
      • Deploy OMS
      • Change components
      • Upgrade OCP
      • Upgrade OMS
    • Deploy through CLI
      • Configuration file
      • Component deployment
        • Deploy an OceanBase cluster
        • Deploy seekdb
        • Deploy obconfigserver
        • Deploy OMS
        • Deploy OCP
        • Deploy Alertmanager
        • Deploy obbinlog
        • Deploy oblogproxy
      • Cluster management
        • Physical Standby Database
          • Create a standby tenant
          • Role switching and decoupling
          • Switch the synchronization mode between primary and standby tenants
        • seekdb primary/standby instance
          • Create a standby instance
          • Role switching and decoupling
        • Scale out and component changes
        • Performance test
        • Diagnose a cluster
        • Backup and restore
        • Add a GUI monitoring system to an existing cluster
      • Cluster management
        • Use OCP to take over an OceanBase cluster deployed by obd
        • Take over an OceanBase cluster
      • Component upgrade
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OMS
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V4.3
      • OceanBase Deploy V4.3.0
    • V4.2
      • OceanBase Deployment Tool V4.2.0
    • V4.1
      • OceanBase Deployer V4.1.0
    • V4.0
      • OceanBase Deployer V4.0.0
    • V3.6
      • OceanBase Deployer V3.6.0
    • V3.5
      • OceanBase Deployer V3.5.0
    • V3.4
      • OceanBase Deployer V3.4.0
    • V3.3
      • OceanBase Deployer V3.3.0
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • 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 Deployment Tool V2.8.0
    • V2.7
      • OceanBase Deployment Tool V2.7.0
    • V2.6
      • OceanBase Deployment Tool V2.6.2
      • OceanBase Deployment Tool V2.6.1
      • OceanBase Deployment Tool V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployment Tool V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployment Tool V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployment Tool V2.1.0
    • V2.0
      • OceanBase Deployment Tool V2.0.1
      • OceanBase Deployment Tool 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
  • Interactive deployment of OceanBase Database Community Edition
  • Deploy a Community Edition cluster using the obd graphical interface
  • Deploy a Community Edition cluster by using an obd configuration file

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V4.3.0

Scale out and component changes

Last Updated:2026-09-04 08:21:29

Prerequisites
Scale out a cluster
Add a component
Delete component
Related Documents

This section describes how to scale out an OB cluster managed by OBD, add or remove components.

Prerequisites

Before you start, make sure that you meet the following conditions:

  • The cluster involved in the operation is in the running state.

  • obd V2.5.0 or later is installed in the environment.

  • OBClient is installed in the environment.

Scale out a cluster

You can scale out any component other than oblogproxy and obbinlog-ce in the cluster. Assume that the cluster to be scaled out is named test. This example shows how to scale out the oceanbase-ce component in the cluster.

  1. Create a configuration file for the new node.

    [admin@test ~]$ vim scale_out.yaml
    

    In this example, the configuration file is named scale_out.yaml. You can define the file name as needed. The content of the configuration file is as follows:

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

    You can only configure the information of the new node in the newly created configuration file. You cannot modify the depends, global, or other server parameters in the original cluster configuration in this file. For more information about the configuration file format and parameters, see Configuration file description.

  2. Run the scale-out command.

    [admin@test ~]$ obd cluster scale_out test -c scale_out.yaml
    

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

    If the command is executed successfully, the following information is returned:

    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.

    Copy and execute the obd cluster display command in the command-line output. The output shows the status of the cluster, as shown in the following example:

    +----------------------------------------------+
    |              oceanbase-ce                    |
    +------------+---------+------+-------+--------+
    | 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 copy and execute the obclient command in the preceding output to log in to OceanBase Database and execute the select svr_ip,id,zone,status from __all_server; command to view the information about the nodes in the cluster. The output is as follows:

    +------------+----+-------+--------+
    | svr_ip     | id | zone  | status |
    +------------+----+-------+--------+
    | 10.10.10.1 |  1 | zone1 | ACTIVE |
    | 10.10.10.2 |  2 | zone2 | ACTIVE |
    +------------+----+-------+--------+
    
  4. Scale out resources in a tenant

    After the OceanBase cluster is scaled out, you can scale out resources in a tenant.

Add a component

You can add a component to a running cluster. All components except obbinlog-ce deployed by using obd support being added to a cluster. Before you add a component, make sure that the component does not exist in the cluster.

Assume that there is a cluster named test with a deployed cluster name of test, and the example will explain how to add the obagent component to this cluster.

  1. View cluster component information.

    [admin@test ~]$ obd cluster edit-config test
    

    The following output shows that only the oceanbase-ce and obproxy components 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
        ······ # Omitted configuration items
      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.
        rpc_listen_port: 2885
        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 for the new obagent component.

    [admin@test ~]$ vim addtional_component.yaml
    

    Here is an example configuration file named addtional_component.yaml. You can define the name of the configuration file as needed. The content of the configuration file is as follows:

    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
    

    The format and parameters of the configuration file are described in Configure the parameter files.

    Note

    The servers section of the obagent component configuration file must be consistent with the servers section of the oceanbase-ce component configuration file. Specifically, use the same name and ip for configuration.

  3. Run the 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.

    The command is executed and the following information is returned:

    +---------------------------------------------------------------+
    |                          obagent                              |
    +------------+--------------------+--------------------+--------+
    | ip         | mgragent_http_port | monagent_http_port | status |
    +------------+--------------------+--------------------+--------+
    | 10.10.10.1 | 8089               | 8088               | active |
    | 10.10.10.2 | 8089               | 8088               | active |
    | 10.10.10.3 | 8089               | 8088               | active |
    +------------+--------------------+--------------------+--------+
    test running
    Trace ID: ae0122ea-ddd9-11ee-9b38-00163e0808cc
    If you want to view detailed obd logs, please run: obd display-trace ae0122ea-ddd9-11ee-9b38-00163e0808cc
    
  4. Verification.

    After the new component command is executed, run the obd cluster display command to view the cluster status. The following example shows the result of the obd cluster display command:

    [admin@test ~]$ obd cluster display test
    

    The following information is returned, indicating that the obagent component exists in the cluster:

    +----------------------------------------------+
    |              oceanbase-ce                    |
    +------------+---------+------+-------+--------+
    | 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-ce                 |
    +------------+------+-----------------+--------+
    | ip         | port | prometheus_port | status |
    +------------+------+-----------------+--------+
    | 10.10.10.1 | 2883 | 2884            | active |
    +------------+------+-----------------+--------+
    obclient -h10.10.10.1 -P2883 -uroot@proxysys -p'********' -Doceanbase -A
    Connect to Obagent ok
    +---------------------------------------------------------------+
    |                          obagent                              |
    +------------+--------------------+--------------------+--------+
    | ip         | mgragent_http_port | monagent_http_port | status |
    +------------+--------------------+--------------------+--------+
    | 10.10.10.1 | 8089               | 8088               | active |
    | 10.10.10.2 | 8089               | 8088               | active |
    | 10.10.10.3 | 8089               | 8088               | active |
    +------------+--------------------+--------------------+--------+
    

Delete component

You can delete the component in a running cluster. Before you do so, make sure the component exists in the cluster.

Assume there is a cluster named test with a deployment name of test and that you want to delete the obagent and obproxy-ce components in the cluster. Here is how you can proceed.

  1. View the information about the cluster components.

    [admin@test ~]$ obd cluster edit-config test
    

    The following output appears, indicating that the oceanbase-ce, obproxy-ce, and obagent components are installed 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
        ······ # The following is an example for illustration only.
      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.
        rpc_listen_port: 2885
        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. Execute the Delete component command.

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

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

  3. Validate results.

    After the component deletion command is executed, you can execute the obd cluster display command to view the status of the cluster.

    [admin@test ~]$ obd cluster display test
    

    The output is as follows. The ODP and OBAgent components are removed from the cluster.

    +----------------------------------------------+
    |                oceanbase-ce                  |
    +------------+---------+------+-------+--------+
    | 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
    

Related Documents

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

  • For more information about the configurations in the operation steps, see Configuration file description.

  • After you expand the oceanbase-ce component of the cluster, you can also expand the resource quota of the resource pool or the tenant.

  • Use the OBClient to connect to an OceanBase database.

Previous topic

Role switching and decoupling
Last

Next topic

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