Detect when app moves to different region

Hmm, can’t get the max-per-region working

What I did, in order:

  • fly scale count 10 --max-per-region=1 to enable the max per region
  • fly scale show still shows Max Per Region: Not set :thinking:

Read some community post and seems you need to scale down and then up to get the max per region appear to be set in the CLI … not very clear. So:

  • fly scale count 9 --max-per-region=1
  • fly regions remove syd and this triggers Fly to do a (rolling) deploy to have the VM no longer in Sydney
  • fly scale count 10 --max-per-region=1
  • fly regions add syd and Fly deploys again and Sydney is back
  • fly scale show still shows Max Per Region: Not set :disappointed:

I’m stuck and have no idea now how to get Max Per Region working and know it’s working, with value set to 1

I have Autoscaling: Disabled

On more FYI: when I removed syd from regions pool, the CLI showed a backup region:

Region Pool: 
cdg
gru
hkg
iad
lhr
maa
mia
nrt
sjc
Backup Region: 
iad

The backup region also showed later when adding syd to the pool.
However, fly regions list does not list any backup region, just Backup Region:

1 Like