How to guarantee even distribution of VMs across regions?

I configured 3 regions for my app:

> fly regions list
Region Pool: 
iad
ord
sjc

But I cannot get 3 VMs even distributed across the regions. I tried:

  • fly scale count 3
  • fly autoscale standard min=3 max=6
  • fly autoscale balanced min=3 max=6

But I always end up with a distribution of 2/1/0, when I’d like 1/1/1. Also, the load on the VMs is negligible currently (< 5 connections per VM).

1 Like

Looks like this is a problem when scaling from non-0 initial count. Am able to reproduce when scaling from count 1 → 3 but not from 0 → 3.

Hi,

Assuming you are not using autoscaling, I believe this should work:

fly scale count 3 --max-per-region 1

Give it a minute and then check to see where the vms are. I guess a vm still may not be created in a chosen region (like if the region is having issues, capacity etc). But if all is well, it should be.

If you are using autoscaling, it’s a bit more complicated because of how the innards work. This thread details some of the complexity with autoscaling and distribution: