GIS Cloud Suite
scale
URI
http://{server}:{port}/manager/web/api/service/nodes/{nodeName}/scale
Supported Method
POST
Parent Resource
nodes
Introduction
Scaling the service node by API.
Supported Interchange Format: JSON
HTTP Request Method
Execute HTTP request to the URI below. In the URI below, {server} is the server of gateway, replace it by the actual gateway server IP. {port} is the port of gateway, replace it by the actual gateway port. {nodeName} is the name of service node, replace it by the actual name.
http://{server}:{port}/manager/web/api/service/nodes/{nodeName}/scale
POST Request
Scaling the service node.
The Format of Headers
content-type: application/json
authorization: Bearer {access_token}Request Params
The necessary parameters to scaling the service node:
| Name | Type | Explanation | |
|---|---|---|---|
| isAuto | String | Whether the scaling mode is automatic. True means automatic scaling, false means manual scaling. | |
| autoScale | |||
| metricType | String | The type of the monitor object of automatic scaling | |
| threshold | Integer | Threshold | |
| minReplicas | Integer | The minimum number of nodes | |
| maxReplicas | Integer | The maximum number of nodes | |
| manualScale | |||
| desiredReplicas | Integer | The desired number of nodes after scaling | |
Response Structure
The returned response would tell whether scaled successful, and provide the error information if failed.
| Field | Type | Explanation |
|---|---|---|
| isSucceed | Boolean | The result of the request. True means succeed, false means failed |
| msg | String | If the execution failed, the result would return the error information. The result would be empty if succeed. |
Response Case
Execute POST request for http://192.168.17.139:32507/manager/web/api/service/nodes/ExampleNode/scale, use manual scaling mode and scaling the number of service nodes to 3.
{
"isAuto": "false",
"manualScale": {
"desiredReplicas": 3
}
}The returned response in json format:
{
"isSucceed": true,
"msg": ""
}Execute POST request for http://192.168.17.139:32507/manager/web/api/service/nodes/ExampleNode/scale, the scale mode is automatic scale, the type of monitor object is CPU, the threshold is 50%, the minimum service node is 1, and the maxmimum service node is 5.
{
"isAuto": true,
"autoScale": {
"metricType": "cpu",
"threshold": "50",
"minReplicas": "1",
"maxReplicas": "5"
}
}The returned response in json format:
{
"isSucceed": true,
"msg": ""
}