Reputation: 15002
suppose there are 100 users on the site at the same time,
What's the difference between the following settings
Which setting is more sensible/practical ?
workers Integer(ENV['WEB_CONCURRENCY'] || 10)
threads_count = Integer(10)
workers Integer(ENV['WEB_CONCURRENCY'] || 20)
threads_count = Integer(5)
workers Integer(ENV['WEB_CONCURRENCY'] || 5)
threads_count = Integer(20)
Upvotes: 0
Views: 572
Reputation: 5829
This is a difficult decision to make without knowing more about the characteristics of your application, and it takes a bit of tuning to get it right.
Naively, if you have a high proportion of long-running blocking requests (calls to an external API, something like that 100+ms or so) you want more threads so that your workers are not idle while that request is processed. If you have high throughput but all the requests are fast, you want more workers with fewer threads.
Upvotes: 1