Recommended concurrency limits for a Rails app using websockets

Hi all.

My Rails uses ActionCable for websockets and each Fly machine has 3 Puma workers with 5 threads each. Websockets are used a lot and and realtime features are among the most important features of the app. Each

What would be the recommended request concurrency limits for this configuration? Thanks!

Rails recommends standalone servers in production: Action Cable Overview — Ruby on Rails Guides

If you follow those recommendations, you can keep a low number of puma workers per rails server (note: Rails currently recommends three, not five, Why Did Rails' Puma Config Change?! gives an in-depth description of the reason for the change), and have a separate limit for websockets (I’ve run tests, and 500 doesn’t seem to be a problem).

1 Like

Thanks for your reply. In the meantime I switched to Hetzner with Kamal. It’s much cheaper and performance is much better.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.