I’ve got the usual web and worker process types in my fly.toml. For context, I am using sidekiq and I’d like to assign specific instances to consume specific queues.
I know this feature is preview and I’m super thankful for that. It seems that I should be falling back to the web/worker process types. I wonder whether there’s anyone out there who has successfully assigned instances to specific queues, since the config/sidekiq.yml would apply the same config to any instance of the worker type.
I’ve successfully deployed them, but it see a couple of issues:
They seem to spin up in a different region (DFW instead of LAX) - the app has LAX as a primary region, SEA and SJC in the backup region. This happened once, at least the first time I deployed the config change below.
Secrets aren’t being picked up (noticed because the sidekiq worker tried to connect to the default localhost:6379)
This leads to workers not spinning up obvs.
My config is something along the lines of this piece of my fly.toml.
I checked one of your apps and it appears secrets are set property on both process types. Are you missing a REDIS_URL in one? If you fly ssh console to a worker and check the env command, do you see what you expect?
The region issue looks like a bug converting from no process types to multiple process types. I went ahead and cleaned the app up, you should see what you expect now.
Thank you, @kurt for taking a look! Gonna double check my settings. So far I’ve reverted back to the two processes: workerand web.
quick question: when I do fly ssh console -a app-name, it loads the session for any of the process types or do I need to specify which process I want to load up?
So I can’t ssh into these new instances, since they error when spinning up sidekiq. Been checking my list of secrets for that app, and they are set. Did fiddle around setting them a few times to make sure they were picked up.
I can see now the instances being launched, same region as my redis service, trying to connect to it using the *.fly.dev:10000 public URL, unfortunately the connection times out now. I’m going to try enabling private network and use the *.internal DNS names.
Sweet, I think all of the instances land in the regions I set.
I can use several process types, not just web and worker.
After fiddling with setting secrets, although they looked already alright, the instances are picking them up.
The only issue: some of my instances land in regions I haven’t specified like MAA or SCL. After fiddling a bit more with fly regions they spin up in those that I want them to be. Mostly LAX/SCJ.
Ok this is super helpful. It seems like maybe secrets and regions aren’t getting picked up for new process types until you change them. We’ll look into that.