First of all, you should look for ways in which you can improve the productivity of the work itself. You may be able to get it in less than ten seconds by caching a low-level model or by optimizing your algorithm.
From the point of view of developing the number of workers that you will need, you will need to complete the number of runs per minute (20) times the number of seconds that it takes to start (10) times the number of users (10). This will give you the number of seconds per minute that it will take to work for one employee. 20 * 10 * 10 = 2000 . Divide this by 60 and you have the number of minutes per minute, 33.3 . So if you had 34 workers, and these numbers would be consistent, they should have been able to prevail over things.
However, you should not be in a position where you need to run 36 or more speakers for a total of 10 concurrent users for the ranking algorithm. It will be very expensive.
Optimize your algorithm, try adding more caching and try Sidekiq. In my experience, Sidekiq can process a queue 10 times faster than Resque. It depends on what your work does and how you use each tool, but it's worth checking. See Sidekiq vs Resque .
Joel drapper
source share