- URL:
- https://<root>/services/<ServiceName>.<ServiceType>/scaling/edit
- Methods:
POST
- Required Capability:
- Access allowed with either the "Update", "Delete", or "Security and infrastructure" privileges, or the Publisher role
- Version Introduced:
- 10.9
Description
The edit
operation updates the scaling (replicas
, min
, and max
) and resource allocation (cpu
, cpu
, memory
, and memory
) for an individual service. Changes made using this operation will be reflected in the deployment resource for the GIS service microservice.
Scaling in ArcGIS Enterprise on Kubernetes
Either manual scaling or autoscaling can be set for a GIS service microservice using the service
parameter. Introduced at ArcGIS Enterprise on Kubernetes 10.9.1, autoscaling allows administrators to configure and deploy systems that respond to unexpected performance demands with minimal intervention and overhead. The ArcGIS Enterprise on Kubernetes autoscaling feature uses horizontal pod autoscaling, which, in response to an increase in resource usage, deploys more pods according to the values set by the administrator.
When a specific CPU utilization threshold (average
) is crossed, ArcGIS Enterprise on Kubernetes scales the number of pods up to the maximum (max
) values set in the replicas
JSON object. When utilization drops, and the additional resources are no longer needed, the system scales itself back down to no lower than the minimum (min
) value set in the replicas
JSON object. For more information on how to enable autoscaling, see the Editable properties section below.
Though scaling properties can be updated using the Edit default properties and Edit deployment operation, to reduce risk of errors it is recommended that changes to scaling information is performed using this operation.
Request parameters
Parameter | Details |
---|---|
(Required) | The service scaling properties, represented as a JSON object. Example
|
(Optional) | Introduced at 10.9.1. This parameter specifies whether the operation will run synchronously or asynchronously. If Values: |
| The response format. The default format is Values: |
Scaling properties
The following example demonstrates the scaling
JSON object of a GIS service microservice:
{
"scalingSpec": [
{
"deploymentType": "MapServer",
"replicas": {
"min": 3,
"max": 3,
"scalingMode": "manual"
},
"deploymentId": "knftr3em9ezf1rb7tvpym",
"resources": {
"memoryMin": "500Mi",
"memoryMax": "2Gi",
"cpuMin": "0.125",
"cpuMax": "2"
}
}
]
}
The following sections outline the individual properties included in the scaling
JSON object that can, and cannot, be updated using this operation.
Editable properties
The following properties can be updated using the edit
operation:
Property | Details |
---|---|
| The number of replicas for the service. The default value for Example
For organizations using ArcGIS Enterprise 11.2 on Kubernetes or later versions, version 2 (v2) of the autoscaling feature can be enabled by passing in the JSON object below and modifying the Autoscaling can be enabled by adjusting the Advanced scaling settings for version 2 of autoscaling, such as scaling behaviors, can also be set with this operation. Example
Organizations using ArcGIS Enterprise on Kubernetes 10.9.1 can enable version 1 of the autoscaling feature by passing in the JSON object below and modifying the Example
|
| The minimum and maximum resource allocations for the microservice, including the minimum memory ( Example
|
Uneditable properties
The following properties cannot be edited but are required to be passed through in the service
object:
Property | Details |
---|---|
| The GIS service microservice type. Values: |
| The microservice ID. |
Example usage
The following is a sample POST request for the edit
operation that demonstrates autoscaling, formatted for readability:
POST /context/admin/services/MyService.MapServer/scaling/edit HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
serviceScalingSpec={
"scalingSpec": [
{
"deploymentType": "MapServer",
"replicas": {
"min": 1,
"max": 4,
"scalingMode": "auto",
"autoscaling": {
"hpaSpec": {
"metrics": [
{
"resource": {
"name": "cpu",
"target": {
"averageUtilization": "50",
"type": "Utilization"
}
},
"type": "Resource"
}
],
"hpaVersion": "autoscaling/v2"
}
}
},
"deploymentId": "kui6zmtqzkjrsihh6tegq",
"resources": {
"memoryMin": "500Mi",
"memoryMax": "2Gi",
"cpuMin": "0.125",
"cpuMax": "2"
}
}
]
}&async=false&f=pjson&token=_2AKqbDf5yQyOBrCXyfoMx3vHLY3z7Hp-ZQ27GJXN9Vqz5og2NnjAZjbHiB6YUnLg3gslmfCkDWgqEtsPmLIXB3gnhkmYD3VzM698NLJnoN4gOlXdn3EXX3UUJGXO4s19-fh8_stvig0ldDffzz6AuAbOWLPlTf0hOmyhxNJi8WckhJMV_VZ1SHNAGrcwdF6hPKoUQHTqcoAqNdsBUglm1VqH2nG8oq1a9JjESkTtDR12Yc-4dlttQPyiDsRVwZu
JSON Response example
If async
is false
, the following response is returned once a service's scaling is edited successfully:
{"status": "success"}
If async
is true
, the following response is returned. The value returned for jobs
can be used to access the job resource to track a job's status after it has been submitted. For more information, see the Job resource topic.
{
"jobsUrl": "https://organization.domain.com/context/admin/jobs/ja2ca1a35-881c-400c-a49a-b26883002d6c",
"jobID": "ja2ca1a35-881c-400c-a49a-b26883002d6c",
"jobStatus": "SUBMITTED"
}