Fly v2 add/remove regions

Hi, I was wondering how to add/remove regions in app v2

fly scale count 3 --region yyz,ewr

Does the above add 3 more instances to yyz and ewr or is it set total of 3 instances?

I have 13 instances across 7 regions (jnb, syd, cdg, ewr, yyz, dfw, sea) and want to update to 13 instances across 13 regions (sin, cdg, jnb, iad, dfw, syd, nrt, ams, fra, lhr, ewr, yyz, sea). What should be the correct command here?

1 Like

First you want to create 6 new machines in the new regions:

fly scale count 6 --regions sin,iad,nrt,ams,fra,lhr

Then you want to scale down the extra instances:

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

I was confused at first too, the command is not very intuitive:

  • first asking for 6 which means “add 6 extra machines”, then for 13 which means “13 total machines”
  • we really want to say --min-per-region here, not max, but that flag doesn’t exist

You can use --regions to indicate which regions you want the command to apply to, and --max-per-region to guide the distribution of the final count among regions, in the same command.

So I think

fly scale count 13 --regions sin, cdg, jnb, iad, dfw, syd, nrt, ams, fra, lhr, ewr, yyz, sea --max-per-region 1

should do it. Happily, fly scale count will tell you what it’s about to do and ask you to confirm if that’s not what you’re after.

1 Like

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