Autoscaling & scale to zero
Every 3s Aloof looks at in-flight requests per instance (and optionally CPU %), and scales between min and max. Scale-down waits 15s.
aloof autoscale api --min 1 --max 6 --concurrency 20 --cpu 70 aloof autoscale preview --min 0 --max 2 --idle 120 # scale to zero after 2 idle minutes
With min 0, the first request after idle is held at the edge while an instance starts (about 1s for a small CPU app).