Is there a way to restrict instance numbers per region? Such as limit max=1 min=1 for each selected region.
I have an app with 3 regions and scale=3, sometimes it will try to start 2 instances in the same region, causing some weird behaviors of my app. And the only work around I have is to scale to 0, then scale them back.
Right now, the most reliable way is to add a single volume to each target region and add a [[mounts]]
section to your fly.toml
.
Hmm, that sounds I have to pay 10GB for each region/instance to achieve that, even my app are stateless
There’s a way to solve this in the API, but it’s not yet exposed to flyctl
. It’s my current “side” project so I’ll see if I can get it into flyctl
this week.
1 Like
Hey Kurt, was the final solution to this the --max-per-region
flag?
Yep!
2 Likes