Confusion about regions

I’m confused about how regions work for one of my apps. I had initially set the region to iad, but checked in on our usage and noticed we have outbound from all over the world. There was a weird event that occurred where I accidentally tried to deploy another app’s code to this app and all the environment variables got wiped out, so maybe that included the FLY_REGION variable?

Currently, I do not have FLY_REGION manually set (is this something I can do?), and when I run fly regions list I see the following:

Region Pool:
Backup Region:

However, when I run fly status I see:

  Name     = APP_NAME
  Owner    = OWNER
  Version  = 60
  Status   = running
  Hostname =

1b4a7627 web     60      mad    run     running 2 total, 2 passing 4        2021-10-06T19:11:18Z
2bc2789c web     60      sin    run     running 2 total, 2 passing 0        2021-10-06T19:09:57Z
82adf777 sidekiq 60      gru    run     running                    0        2021-10-06T19:09:57Z

Similarly, when I run fly ssh console and inspect the FLY_REGION env var, it returns sin. So, I’m a little confused how region scaling stuff works. Additionally, I’ve been trying to understand why uncached responses are taking a long time, and now it makes sense because our database is running in us-east-1.

I’ve read the docs on regions but would really appreciate anything that clearly explains how region scaling works. Thanks.

Update: I was able to override this using anchor scaling by creating a volume in the desired region.

I think this is a case of our regions command not knowing about process groups. The good news is, you can do what you want without volumes:

fly regions set iad --group web
fly regions set iad --group sidekiq

I’ve filed a bug about regions list: fly regions does not show process group regions · Issue #561 · superfly/flyctl · GitHub

Thanks. Also, possibly related to environment variables getting wiped out when I overwrote the app, the FLY_REDIS_CACHE_URL does not exist in the environment. Any ideas on that?