Horizontal Pod Autoscaling (HPA) governs the spinning up and deletion of additional pods when the existing resources (CPU and Memory) of the microservice are exhausted. In Adeptia Connect, Autoscaling is by default disabled. You can enable HPA in Adeptia Connect by setting the required parameters in the global values.yaml file.
To enable HPA, you need to set the parameters as described below for each of the microservices individually.
The following screenshot illustrates the autoscaling parameters for webrunner microservice.
# Autoscaling[HPA] Values for Webrunner can be defined here
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 1
targetCPUUtilizationPercentage: 400
targetMemoryUtilizationPercentage: 400
behavior:
scaleUp:
stabilizationWindowSeconds: 300
maxPodToScaleUp: 1
periodSeconds: 60
scaleDown:
stabilizationWindowSeconds: 300
maxPodToScaleDown: 1
periodSeconds: 60
Parameter | Description |
---|---|
enabled | Parameter to enable HPA by setting its value to true. |
minReplicas | Minimum number of pods for a microservice. |
maxReplicas | The maximum number of pods a microservice can scale up to. |
targetCPUUtilizationPercentage | The percentage value of CPU utilization at which the autoscaler spins up a new pod. |
targetmemoryUtilizationPercentage | The percentage value of memory utilization at which the autoscaler spins up a new pod. |
Configuring HPA for runtime microservice
The parameters for configuring the runtime microservice for autoscaling slightly differ from those for the rest of the microservices.
The following screenshot illustrates the autoscaling parameters for runtime microservice.
RUNTIME_AUTOSCALING_ENABLED: true
RUNTIME_MIN_POD: 1
RUNTIME_MAX_POD: 1
RUNTIME_AUTOSCALING_TARGETCPUUTILIZATIONPERCENTAGE: 400
RUNTIME_AUTOSCALING_TARGETMEMORYUTILIZATIONPERCENTAGE: 400
RUNTIME_SCALE_UP_STABILIZATION_WINDOW_SECONDS: 300
RUNTIME_MAX_POD_TO_SCALE_UP: 1
RUNTIME_SCALE_UP_PERIOD_SECONDS: 60
RUNTIME_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS: 300
RUNTIME_MAX_POD_TO_SCALE_DOWN: 1
RUNTIME_SCALE_DOWN_PERIOD_SECONDS: 60