Skip to content

Build go.dev Go Report Card Documentation Status License

Predictive Horizontal Pod Autoscaler

Visit the GitHub repository at https://www.github.com/jthomperoo/predictive-horizontal-pod-autoscaler to see examples, raise issues, and to contribute to the project.

What is it?

This is a Custom Pod Autoscaler; aiming to have identical functionality to the Horizontal Pod Autoscaler, however with added predictive elements using statistical models.

Why would I use it?

This autoscaler lets you choose models and fine tune them in order to predict how many replicas a resource should have, preempting events such as regular, repeated high load.

What systems would need it?

Systems that have predictable changes in load, for example; if over a 24 hour period the load on a resource is generally higher between 3pm and 5pm - with enough data and use of correct models and tuning the autoscaler could predict this and preempt the load, increasing responsiveness of the system to changes in load. This could be useful for handling different userbases across different timezones, or understanding that if a load is rapidly increasing we can prempt the load by predicting replica counts.

Features

  • Functionally identical to Horizontal Pod Autoscaler for calculating replica counts without prediction.
  • Choice of statistical models to apply over Horizontal Pod Autoscaler replica counting logic. * Holt-Winters Smoothing * Linear Regression
  • Allows customisation of Kubernetes autoscaling options without master node access. Can therefore work on managed solutions such as EKS or GCP. * CPU Initialization Period. * Downscale Stabilization. * Sync Period. * Initial Readiness Delay.
  • Runs in Kubernetes as a standard Pod.