Multithreaded rubies on a hero

I have a ruby โ€‹โ€‹application on Heroku that should do some background processing with workflows. I haven't decided between Delayed Job and Resque yet, but the answer to this question may affect me. Background jobs will be mostly expected from external APIs (facebook, twitter, etc.), so they will use very little CPU.

Is there a way to get multiple threads with every working dyno on heroku? Is this standard or is it available with a plugin for DJ or Resque ? Or a foreman config to pre-fork or something else? Otherwise, I'm going to spend a lot of money on working dinosaurs, which are 95% sitting without waiting, waiting for an external API.

+4
source share
1 answer

You can try sidekiq , which works similarly to resque, but uses threads to handle tasks simultaneously. You can also use resque and sidekiq together.

+5
source

Source: https://habr.com/ru/post/1415195/


All Articles