Configurable Horizontal
Pod Autoscaler
Ivan Glushkov, Staff Software Engineer
Kubernetes is not a rocket science
- Kubernetes building blocks: Pod, Deployment
- Horizontal Pod Autoscaler
- Simplicity, Idempotence,
Infrastructure-as-code, Development Velocity
HPA under the microscope
- Configuration:
- maxReplicas
- minReplicas
- metrics
- stabilizationWindow
- Hardcoded Constants:
- scaleUpLimitFactor = 2
- scaleUpLimitMinimum = 4
Use Case: business-critical web traffic
Use Case: data events
HPA Problems
- Cannot scale slower/faster
- Cannot delay the next scale
- All the configurations are hardcoded/cluster-wide
CHPA
- CRD + Controller
- Configuration (per deployment)
- ScaleUpLimitFactor
- ScaleUpLimitMinimum
- UpscaleForbiddenWindowSeconds
- DownscaleForbiddenWindowSeconds.
CHPA
- CRD + Controller
- Configuration
- ScaleUpLimitFactor
- ScaleUpLimitMinimum
- UpscaleForbiddenWindowSeconds
- DownscaleForbiddenWindowSeconds
How fast it can scale pods
How long to wait until next scale
CHPA: business-critical web traffic
CHPA: data events
General Solution
- Kubernetes Enhancement Proposal (KEP) “Configurable scale up/down
velocity for HPA”
- Kubernetes PR #74525
- Stay tuned
Questions

Configurable horizontal pod autoscaler

  • 1.
    Configurable Horizontal Pod Autoscaler IvanGlushkov, Staff Software Engineer
  • 2.
    Kubernetes is nota rocket science - Kubernetes building blocks: Pod, Deployment - Horizontal Pod Autoscaler - Simplicity, Idempotence, Infrastructure-as-code, Development Velocity
  • 3.
    HPA under themicroscope - Configuration: - maxReplicas - minReplicas - metrics - stabilizationWindow - Hardcoded Constants: - scaleUpLimitFactor = 2 - scaleUpLimitMinimum = 4
  • 4.
  • 5.
  • 6.
    HPA Problems - Cannotscale slower/faster - Cannot delay the next scale - All the configurations are hardcoded/cluster-wide
  • 7.
    CHPA - CRD +Controller - Configuration (per deployment) - ScaleUpLimitFactor - ScaleUpLimitMinimum - UpscaleForbiddenWindowSeconds - DownscaleForbiddenWindowSeconds.
  • 8.
    CHPA - CRD +Controller - Configuration - ScaleUpLimitFactor - ScaleUpLimitMinimum - UpscaleForbiddenWindowSeconds - DownscaleForbiddenWindowSeconds How fast it can scale pods How long to wait until next scale
  • 9.
  • 10.
  • 11.
    General Solution - KubernetesEnhancement Proposal (KEP) “Configurable scale up/down velocity for HPA” - Kubernetes PR #74525 - Stay tuned
  • 12.