kormide / bb-autoscaler

Automatically scale the number of workers in a Buildbarn cluster based on load

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Buildbarn Autoscaler Build status PkgGoDev Go Report Card

This repository provides a utility named bb_autoscaler that can be used in combination with Buildbarn Remote Execution to automatically adjust the size of Amazon EC2 Auto Scaling Groups (ASGs), EKS Managed Node Groups, or Kubernetes deployments of Buildbarn workers based on load. Load metrics are obtained by querying Prometheus, which in its turn extracts metrics from bb_scheduler. It relies on Prometheus to normalize the load metrics into a desired number of workers (e.g., by using quantile_over_time()).

Furthermore, this repository provides a tool named bb_asg_lifecycle_hook, which may be used to gracefully downscale workers running on plain EC2 instances, using EC2 ASG lifecycle hooks.

Note that it may not always be necessary to use utilities like these. When using Kubernetes, it may be sufficient to create a Horizontal Pod Autoscaler that uses the Custom Metrics API. Using these tools may still be preferable if it is undesirable to reconfigure your cluster to use the Custom Metrics API.

About

Automatically scale the number of workers in a Buildbarn cluster based on load

License:Apache License 2.0


Languages

Language:Go 71.5%Language:Starlark 27.6%Language:Jsonnet 0.5%Language:Shell 0.4%