New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add resque dyno on Heroku. #917
Conversation
Nice. Note that even after we add The discussion on how we set worker counts makes me realize we'll have to rethink things -- currently we are saying to run (eg) 9 "regular" workers and 1 "on_demand_derivatives" worker on our single host for workers. But under heroku we want to run a smaller standard-2x dyno, but have more than one of them. So we could say each standard-2x can run 1 'regular' and 1 'on-demand' and then scale out to 4 of those -- but that's now 50/50 allocation, which isn't the same. We could have more than worker type -- "on_demand_derivatives_worker" which only runs workers on that queue, and there's only one dyno; and a "regular" worker which scales out. (Would have to change our resque_pool.yml -- probably have two of them, and use different ones in each type of dyno!) Or we could change our resque_pool setup to say run one worker which does only "regular", and another worker which does We can talk this out if it doesn't make sense. We'll have to think about it. Not necessarily a pre-req for this PR, may result in future work. |
One really good reason to have the on-demand stuff on its own queue is that those are the only bg jobs that could be requested 24/7. The others are used only by staff and thus could be turned off nights and weekends. |
It's really hard to find this in resque docs, but I think if you tell a resque worker to process queues So if we start a resque worker with Right now, we have a (single) worker started that works only "on_demand_derivatives", if there's nothing in that queue (and usually there isn't), it just sits there idle, even if there's plenty of "default" work to be done. So I don't think there's a downside of telling it to also work on default if there's no on_demand_derivatives work. The main difference would be the proportion of workers working on each when there is both kinds of work at once. Let's say we have a bunch of people asking for on-demand-derivatives AND a bunch of ingest happenign, right now. Currently, we'd have 9 jobs work on ingest, and 1 working on on-demand-derivatives. But if we imagine instead we have (eg) 5 dynos, each of which has one |
Yeah -- I would definitely assign the "worker counts and assigning workers to different queues" to a separate issue and PR. |
For now I might just set heroku config And we should set Do you want to go make this heroku config changes on our scihist-digicoll app? |
Done! |
Just adding a worker dyno in the procfile, per https://devcenter.heroku.com/articles/ruby-resque-pool.