tim_xyz
tim_xyz

Reputation: 13491

Is Puma WEB_CONCURRENCY on a per Dyno basis for Heroku?

I'm using Puma web server on Heroku, and currently have 3 of the standard 2x dynos. The app is Ruby on Rails.

My understanding is that by increasing WEB_CONCURRENCY in /config/puma.rb it increases the number of puma workers, at the expense of additional RAM usage.

Current Setup:

workers ENV.fetch("WEB_CONCURRENCY") { 5 }

Question:

Is the 5 concurrent workers on a per dyno basis, or overall? If I have 3 dynos, does this mean I have 15 workers, or only 5?

I was previously looking for a way to check the current number of existing workers, but couldn't find any commands to do this on Heroku.

Upvotes: 2

Views: 1658

Answers (1)

Damien MATHIEU
Damien MATHIEU

Reputation: 32629

Yes, the web concurrency is on a per-dyno basis.
Each dyno is an independent container, running on a different server. So you should see each dyno as an independent server.

Upvotes: 5

Related Questions