I have a ruby app on Heroku that needs to do some background processing with worker threads. I haven't decided between Delayed Job and Resque yet, but the answer to this question could sway me. The background jobs will be mostly waiting on external APIs (facebook, twitter, etc) so they will be making very low utilization of CPU.
Is there some way to get multiple threads with each worker dyno on heroku? Is this standard or available with a plugin for DJ
or Resque
? Or a foreman
config to pre-fork or something? Otherwise I'm going to be wasting a lot of money on worker dynos that are 95% sitting idle waiting for an external API.
You might try sidekiq, which works similar to resque, but uses threads to process tasks concurrently. You can also use resque and sidekiq together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With