Queries the configurations that are recommended by the system for capacity planning of a cluster based on the business scenarios, queries per second, and number of logs for the cluster.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request syntax
POST /openapi/assist/actions/capacity-plan HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
Object | Body | No | request parameters information. |
||
complexQueryAvailable | Boolean | Body | No | true | Whether complex aggregate queries are required. Valid values:
|
dataInfo | Array | Body | No | Disk usage data. |
|
code | String | Body | No | totalRawData | The code of the disk data metric. Valid values:
|
size | Long | Body | No | 100 | The value of the disk usage metric. |
type | String | Body | No | hot | The data type of the disk. Optional values:
|
unit | String | Body | No | MiB | Data unit or time unit. Optional values:
|
totalCount | Integer | Body | No | 10000 | The total number of entries returned. |
metric | Array | Body | No | Metrics such as disk usage, search and write status, and aggregate requests. |
|
code | String | Body | No | write | Search for or write the indicator code. Valid values:
|
concurrent | Long | Body | No | 2 | The number of concurrent threads. |
throughput | Long | Body | No | 100 | The throughput. Unit: MB /s. |
type | String | Body | No | common | The type of the search /write peak. Valid values:
|
peakQps | Integer | Body | No | 30 | The peak QPS. |
averageQps | Integer | Body | No | 30 | The average QPS. |
responseTime | Integer | Body | No | 100 | The expected average response time. Unit: milliseconds. |
usageScenario | String | Body | No | general | The scenario. Optional values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | E91B7129-A669-4D9D-A743-F90A0FF1F5EF | The ID of the request. |
Result | Object | The data returned. |
|
ExtendConfigs | Array of ExtendConfigs | The configuration information of the extension. |
|
ConfigType | String | sharedDisk | The configuration type. Set the value to sharedDisk. Note The extendConfigs attribute that may appear when the planned instance type is advanced. |
Disk | Long | 2048 | The size of the disk. Unit: GiB. |
DiskType | String | CPFS_PREMIUM | The type of the disk. Set the value to CPFS_PREMIUM. Note The extendConfigs attribute that may appear when the planned instance type is advanced. |
InstanceCategory | String | advanced | version type. Valid values:
|
NodeConfigurations | Array of NodeConfigurations | The node information. |
|
Amount | Long | 10 | The number of cores. |
Cpu | Long | 1 | The number of vCPUs. |
Disk | Long | 20 | The size of the disk. Unit: GiB. |
DiskType | String | cloud_ssd | The type of the hard disk. Valid values:
|
Memory | Long | 2 | The memory size of the current node role. Unit: GB. |
NodeType | String | WORKER | The type of the node. The following types are supported:
|
OversizedCluster | Boolean | true | The result calculated based on capacity planning. No default value is available. Valid values:
|
Examples
Sample requests
POST /openapi/assist/actions/capacity-plan HTTP/1.1
Content-Type:application/json
{
"complexQueryAvailable" : true,
"dataInfo" : [ {
"code" : "totalRawData",
"size" : 100,
"type" : "hot",
"unit" : "MiB",
"totalCount" : 10000
} ],
"metric" : [ {
"code" : "write",
"concurrent" : 2,
"throughput" : 100,
"type" : "common",
"peakQps" : 30,
"averageQps" : 30,
"responseTime" : 100
} ],
"usageScenario" : "general"
}
Sample success response
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "E91B7129-A669-4D9D-A743-F90A0FF1F5EF",
"Result" : {
"instanceCategory" : "advanced",
"oversizedCluster" : true,
"nodeConfigurations" : [ {
"amount" : 3943,
"diskType" : "cloud_ssd",
"disk" : 20,
"nodeType" : "WORKER",
"cpu" : 32,
"memory" : 128
}, {
"amount" : 3,
"diskType" : "cloud_ssd",
"disk" : 20,
"nodeType" : "MASTER",
"cpu" : 2,
"memory" : 8
}, {
"amount" : 3,
"diskType" : "cloud_efficiency",
"disk" : 20,
"nodeType" : "COORDINATING",
"cpu" : 2,
"memory" : 8
}, {
"amount" : 7,
"diskType" : "cloud_efficiency",
"nodeType" : "WORKER_WARM",
"cpu" : 4,
"memory" : 32
}, {
"amount" : 1,
"nodeType" : "KIBANA",
"cpu" : 1,
"memory" : 2
} ],
"extendConfigs" : [ {
"configType" : "sharedDisk",
"diskType" : "CPFS_PREMIUM",
"disk" : 3943000
} ]
}
}
Error codes
For a list of error codes, see Service error codes.