WEB_CONCURRENCY 只适用于 Worker Dynos 吗?
does WEB_CONCURRENCY only apply to Worker Dynos?
在 Rails 4 使用 Heroku 和 Puma 网络服务器
我想了解 WEB_CONCURRENCY 与我的测功机的关系。
目前,我 运行 使用一台标准的 2x 测功机。我没有使用任何 worker dynos,因为我所做的一切都不需要在后台处理。根据 Heroku 的文档,默认并发数为 4:2X dynos: WEB_CONCURRENCY=4
我的问题是 并发是否严格与 worker dynos 有关?由于我没有使用任何 worker dynos,我应该将 WEB_CONCURRENCY 设置为零吗?
如果有任何文档可以简单地回答我的问题,请link解决。我很难理解并发性以及根据我使用的测功机将其设置为什么。
谢谢!
Puma forks multiple OS processes within each dyno to allow a Rails app to support multiple concurrent requests. In Puma terminology these are referred to as worker processes (not to be confused with Heroku worker processes which run in their own dynos). Worker processes are isolated from one another at the OS level, therefore not needing to be thread safe.
读这个:https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
在 Rails 4 使用 Heroku 和 Puma 网络服务器
我想了解 WEB_CONCURRENCY 与我的测功机的关系。
目前,我 运行 使用一台标准的 2x 测功机。我没有使用任何 worker dynos,因为我所做的一切都不需要在后台处理。根据 Heroku 的文档,默认并发数为 4:2X dynos: WEB_CONCURRENCY=4
我的问题是 并发是否严格与 worker dynos 有关?由于我没有使用任何 worker dynos,我应该将 WEB_CONCURRENCY 设置为零吗?
如果有任何文档可以简单地回答我的问题,请link解决。我很难理解并发性以及根据我使用的测功机将其设置为什么。
谢谢!
Puma forks multiple OS processes within each dyno to allow a Rails app to support multiple concurrent requests. In Puma terminology these are referred to as worker processes (not to be confused with Heroku worker processes which run in their own dynos). Worker processes are isolated from one another at the OS level, therefore not needing to be thread safe.
读这个:https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server