Predictive Horizontal Pod Autoscaler
This is a Custom Pod Autoscaler; aiming to have identical functionality to the Horizontal Pod Autoscaler, however with added predictive elements.
This uses the Horizontal Pod Autoscaler Custom Pod Autoscaler extensively to provide most functionality for the Horizontal Pod Autoscaler parts.
How does it work?
This project works by calculating the number of replicas a resource should have, then storing these
values and using statistical models against them to produce predictions for the future.
These predictions are compared and can be used instead of the raw replica count calculated by the Horizontal Pod Autoscaler logic.
- Functionally identical to Horizontal Pod Autoscaler for calculating replica counts without prediction.
- Choice of statistical models to apply over Horizontal Pod Autoscaler replica
- 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 Deployment.
Developing this project
Developing this project requires these dependencies:
To view docs locally, requires:
make- builds the Predictive HPA binary.
make docker- builds the Predictive HPA image.
make lint- lints the code.
make unittest- runs the unit tests
make vendor- generates a vendor folder.
make doc- hosts the documentation locally, at