Skip to content

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

License

Notifications You must be signed in to change notification settings

buildbarn/bb-autoscaler

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages