This API is used to add an OBServer node to an initialized OceanBase cluster.
Call description
Limitations
If you set a password in the request, you must specify the X-OCS-Auth field in the header for authentication. For more information, see Authentication based on public-key encryption.
Request path
POST /api/v1/ob/scale_out
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| agentInfo | Object | Yes | For more information, see AddNodeBeforeClusterInitialization | The agent information of the OBServer node that you want to add to the cluster. |
| obConfigs | Map[String]String | Yes | { "memory_limit": "16G", "system_memory": "8G" } |
The configuration information of the OBServer node that you want to add to the cluster. |
| zone | String | Yes | "zone1" | The zone to which the OBServer node belongs. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. |
| data | Object | The information about the asynchronous task. For more information, see GetDagDetails. |
| error | Object | The information about the error that occurred. |
Examples
Sample request
POST xxx.xxx.1:2886/api/v1/ob/scale_out
{
"agentInfo": {
"ip": "xxx.xxx.1",
"port": 2886
},
"obConfigs": {
"mysql_port": "2881",
"rpc_port": "2882",
"memory_limit": "16G",
"system_memory": "8G",
"log_disk_size": "24G",
"datafile_size": "24G"
},
"zone": "zone2"
}
Sample response
{
"successful": true,
"timestamp": "2024-01-09T20:40:00.86290666+08:00",
"duration": 51,
"status": 200,
"traceId": "29b9c2717c65d7bc",
"data": {
"id": "11",
"dag_id": 1,
"name": "Cluster scale out",
"stage": 1,
"max_stage": 9,
"state": "READY",
"operator": "RUN",
"start_time": "0001-01-01T00:00:00Z",
"end_time": "0001-01-01T00:00:00Z",
"additional_data": null,
"nodes": null
}
}