So far so good! But I want the app to run across ams and syd, with Sidekiq just running in syd (writeable region). So I do:
fly regions set syd ams --group app
Region Pool:
ams
syd
Backup Region:
and then
› fly regions set syd -a eme-prod --group sidekiq
Region Pool:
syd
Backup Region:
But now when I try to list the regions, I’m not getting ams back at all. And my new machines aren’t booting there no matter what I do What am I doing wrong?
› fly regions list
Regions [app]: syd
Regions [sidekiq]: syd
The only fly regions command that works for V2 apps is fly regions list.
For v2, you add a region just by creating or cloning a machine there. For the scenario you describe, if you only want 2 total machines in your app process, with one in syd and one in ams, then you would specify the regions when you use the fly scale count command:
Just wanted to add that the primary_region setting in your fly.toml will be the region used whenever you create a new Machine without specifying another region.
Was testing this and it might not be the case. Looks like fly scale just creates Machines in existing regions if you don’t specify.
It does seem to want to place 2 instances in syd rather than spread them evenly across regions - I wonder if this is due to fly recommending 2 machines minimum per region?
It’s OK though, I can wait for it to scale the machines and then manually delete the ones I don’t want