Hi there, I am trying to configure an app that will run in several regions (ams, sjc, sin, scl). I am using the
[processes] feature with two processes,
I was able to add these regions to my
web process group. However, it appears they are broken.
fly regions list does not support passing a
--group flag, so I can’t really see what is wrong.
If I try to set the regions, it does tell me what seems like an accurate list of regions, but it also does not work (it should only be showing
sjc after a
% fly regions set sjc --group web -a myapp
At this point, Fly only schedules my app in
ams even though that doesn’t match any of the config values I can find. I believe the app is correctly configured to have
ams,scl,sin,sjc as the regions, but it never schedules it on more than one or two regions even with the scale set to 8. Any idea what’s wrong here?
Ah, I see this in the Rails-specific documentation:
[processes] directive currently only works within a single Fly region
Is this still true? If it is, I hope it can be better documented since I did not find it elsewhere. Without
[processes], it is a little hard to implement inside of my app image itself, as I was hoping Fly could provide the guarantee that only ~one worker container is running at a time while scaling the web processes across regions. I will have to figure out how to do that myself.
To be sure, flyctl cmd that didn’t work for you looked like this:
flyctl scale count worker=1 web=8 -a my-multi-proc-app
If so, that is surprising, as it is exactly the usecase multi-process Fly apps were built for.
I don’t think that is quite true. Can you link to the documentation? I ask because this forum post indicates multi-process Fly app should work with multi-region deploys just fine (in fact, we did use multi-process once ourselves and from what I recall, multi-region worked as expected with autoscaling disabled).