brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.64k stars 114 forks source link

Job pool size and Unicorn workers #108

Closed openface closed 9 years ago

openface commented 9 years ago

I'm pretty sure that this question has been asked before, but I wanted to ask in specific terms to confirm my understanding.

  1. Unicorn as the application server with 4 workers
  2. SuckerPunch job defines workers 2

Does this mean that the maximum number of workers executed simultaneously will be 2 across all workers (4 unicorn workers share a common pool size of 2)?

Or, does it mean that each unicorn worker each have an individual pool size of 2, thus providing a maximum of 8 jobs that could run simultaneously (4 * 2)?

Thanks for the clarification, and thanks for this awesome gem!

brandonhilkert commented 9 years ago

Each unicorn worker will have a separate pool. Each pool will have a max of 2 workers. So there will be 8 threads working on your jobs. Hope this helps!