You can call CapacityPlan to recommend the optimal configuration information for cluster capacity planning based on business scenarios, QPS, and log generation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request parameters

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

POST /openapi/assist/actions/capacity-plan HTTP/1.1

Request parameters

Parameter Type Location Required Example Description
body Struct Body No

The message body of the request.

dataInfo Array An array of node roles. { "type": "hot", "code": "totalRawData", "size": 50, "unit": "TB" }

The disk usage. For more information, see dataInfo field data structure.

metric Array An array of node roles. { "type": "common", "code": "write", "concurrent": 2, "throughput": 100 },

The metrics such as disk usage, search and write, and aggregate requests. For more information, see metric field data structure.

usageScenario String No general

The scenario. Valid values:

  • general: general scenarios.
  • analysisVisualization: data analysis scenarios.
  • dbAcceleration: database acceleration scenarios.
  • search: search scenarios.
  • log: the log scenario.
complexQueryAvailable Boolean No true

Indicates whether there is a requirement for complex aggregate queries. The values are as follows:

  • true: enables callbacks for recording status.
  • false: disables callbacks for recording status. This is the default value.

dataInfo field data structure description

Field

Type

Example

Required

The memory size consumed by each core. Automatically allocated.

code

String

totalRawData

Yes

The code of the disk data metric. Valid values: totalRawData (source data information), document (data document information, estimated number of documents), dailyIncrement (daily data growth), dailyIncrement (daily incremental documents), retentionTime (data retention period), and replica (replica settings).

size

int

100

No

The value of the disk usage metric.

type

String

hot

Yes

The data type of the disk. Valid values: hot data and warm data.

unit

String

KiB

No

Data unit /time unit. Data units: MiB, GiB, TB, and PB. Unit of time: DAYS, WEEKS, MONTHS, and YEARS.

totalCount

String

10000

No

The total number of entries returned.

metric field data structure description

Field

Type

Example

Required

The memory size consumed by each core. Automatically allocated.

code

String

write

Yes

Search for /write metric code. Valid values: write (write) and search (search).

concurrent

int

2

No

The number of concurrent threads.

throughput

int

100

No

The throughput. Unit: MB/S.

type

String

common

Yes

The search /write peak type. Valid values: common (regular) and peak (peak).

peakQps

int

30

No

Peak QPS.

averageQps

int

30

No

Average QPS.

responseTime

int

100

No

The expected average response time. Unit: milliseconds.

Response parameters

Parameter Type Example Description
RequestId String E91B7129-A669-4D9D-A743-F90A0FF1F5EF

The RequestId of the current request.

Result Struct

The response of the request.

ExtendConfigs Array of ExtendConfigs

The extension configuration information.

ConfigType String sharedDisk

The type of the configuration. Set the value to sharedDisk.

Note The extendConfigs attribute that may occur when the planned instance type is enhanced (advanced).
Disk Long 2048

The size of the disk. Unit: GiB.

DiskType String CPFS_PREMIUM

The type of the disk. Valid value: CPFS_PREMIUM.

Note The extendConfigs attribute that may occur when the planned instance type is enhanced (advanced).
InstanceCategory String advanced

The version type. Valid values:

  • advanced: enhanced edition.
  • x-pack: Commercial Edition.
  • community: the community version.
NodeConfigurations Array of NodeConfigurations

The node information.

Amount Long 10

The number of cores.

Cpu Long 1

The number of CPUs of the cloud desktop.

Disk Long 20

The size of the disk. Unit: GiB.

DiskType String cloud_ssd

The type of the hard disk. Valid values:

  • cloud_essd: enhanced SSD (ESSD)
  • cloud_ssd: standard SSD.
  • cloud_efficiency: ultra disk.
  • local_ssd: local SSD.
  • local_efficiency: local ultra disk.
Memory Long 2

The memory size of the current node role.

NodeType String WORKER

The type of the node. Supported types are as follows:

  • WORKER: the data node.
  • WORKER_WARM: the cold data node.
  • MASTER: dedicated master node.
  • KIBANA: the Kibana node.
  • COORDINATING: the coordination node.
  • ELASTIC_WORKER: an elastic node.
OversizedCluster Boolean true

The result calculated based on the capacity planning. No default value is available. The values are as follows:

  • true: indicates that the number of data nodes calculated by capacity planning exceeds the threshold of 50.
  • false: The number of data nodes calculated by capacity planning is less than 50.

Examples

Sample requests

POST /openapi/assist/actions/capacity-plan HTTP/1.1
similar to the following example: 
{
    "usageScenario": "general",
    "disasterRecoveryAvailable": true,
    "complexQueryAvailable": true,
    "dataInfo": [
      {
        "type": "hot",
        "code": "totalRawData",
        "size": 50,
        "unit": "TB"
      },
      {
        "type": "hot",
        "code": "document",
        "totalCount": 10000,
        "size": 10,
        "unit": "KiB"
      },
      {
        "type": "hot",
        "code": "dailyIncrement",
        "size": 10,
        "unit": "TB"
      },
      {
        "type": "hot",
        "code": "dailyIncrementDocument",
        "totalCount": 10000,
        "size": 10,
        "unit": "KiB"
      },
      {
        "type": "hot",
        "code": "retentionTime",
        "size": 30,
        "unit": "DAYS"
      },
      {
        "type": "hot",
        "code": "replica",
        "size": 1
      },
      {
        "type": "warm",
        "code": "dailyIncrement",
        "size": 10,
        "unit": "TB"
      },
      {
        "type": "warm",
        "code": "dailyIncrementDocument",
        "totalCount": 10000,
        "size": 10,
        "unit": "KiB"
      },
      {
        "type": "warm",
        "code": "retentionTime",
        "size": 30,
        "unit": "DAYS"
      },
      {
        "type": "warm",
        "code": "replica",
        "size": 1
      }
    ],
    "metric": [
      {
        "type": "common",
        "code": "write",
        "concurrent": 2,
        "throughput": 100
      },
      {
        "type": "common",
        "code": "search",
        "peakQps": 30,
        "averageQps": 30,
        "responseTime": 100
      },
      {
        "type": "peak",
        "code": "write",
        "concurrent": 2,
        "throughput": 100
      },
      {
        "type": "peak",
        "code": "search",
        "peakQps": 30,
        "averageQps": 30,
        "responseTime": 100
      }
    ]
  }

Sample success responses

JSON format

{
    "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, visit the API Error Center.