fly-autoscaler v0.2.1: Scaling via create/destroy, multi-region support

We’ve been continuing work on the metrics-based fly-autoscaler and have added the ability to scale applications via machine creation & destruction rather than simply starting & stopping existing machines. This feature allows you to autoscale without creating a pool of machines beforehand and it allows you to avoid any charges for unused stopped machines.

You can find additional notes in the fly-autoscaler v0.2.1 release.

How it works

Previously, you would set the FAS_STARTED_MACHINE_COUNT environment variable to an expression that would compute the number of machines you wanted to be running at a given time. Now, you can simply change that to use the FAS_CREATED_MACHINE_COUNT to manage the number of created machines.

FAS_CREATED_MACHINE_COUNT="queue_depth / 10"

One difference with the new created machine count is that fly-autoscaler will always retain at least one machine in the application. This is needed because the autoscaler scales up by cloning existing machines and we need at least one to clone.

The new count also supports a range so that you can avoid flapping metrics that cause frequent create/destroys:

FAS_MIN_CREATED_MACHINE_COUNT="queue_depth / 10 - 1"
FAS_MAX_CREATED_MACHINE_COUNT="queue_depth / 10 + 1"

Multi-region support

We’ve also added the ability to clone the newly created machines to a set of regions by setting the FAS_REGIONS variable to a comma-delimited list of region codes:


The autoscaler will then choose the next region via round robin.

Upcoming changes

Looking forward, we’re going to be adding support for scaling multiple applications with a single fly-autoscaler instance. We’re seeing more folks implementing an app-per-tenant approach for isolation and it makes sense to be able to scale many of those with a single autoscaler.

We’re also going to be expanding our collection plugins by adding a Kafka collector & a Temporal collector.

If you have features you’d like to see added, please let us know!


From General to Fresh Produce

Added autoscaling

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.