简体   繁体   English

如何在Puma中启用集群或混合模式,它们是什么?

[英]How to enable cluster or hybrid mode in Puma and what are they?

The readme at https://github.com/schneems/puma_worker_killer says Puma worker killer can only function if you have enabled cluster mode or hybrid mode (threads + worker cluster). If you are only using threads (and not workers) then puma worker killer cannot help keep your memory in control. https://github.com/schneems/puma_worker_killer上的自述文件说, Puma worker killer can only function if you have enabled cluster mode or hybrid mode (threads + worker cluster). If you are only using threads (and not workers) then puma worker killer cannot help keep your memory in control. Puma worker killer can only function if you have enabled cluster mode or hybrid mode (threads + worker cluster). If you are only using threads (and not workers) then puma worker killer cannot help keep your memory in control.

So if I'm using puma on heroku, how do I tell if cluster or hybrid mode is enabled, given that in the puma readme it only talks about clustered mode? 因此,如果我在heroku上使用puma ,我如何判断群集或混合模式是否已启用,因为在美洲狮自述文件中它只涉及群集模式?

How do I enable cluster mode? 如何启用群集模式? How do I enable hybrid mode? 如何启用混合模式?

Is that simply done by specifying the number of workers in config/puma.rb in your Rails app's config folder? 这是通过在Rails应用程序的配置文件夹中指定config / puma.rb中的worker数来完成的吗?

Hybrid mode or Cluster mode are the same. 混合模式或群集模式是相同的。 Yes you need to specify the number of worker. 是的,您需要指定工人数量。 You will need at least 2 workers to call it to be a cluster. 您将需要至少2名工作人员将其称为群集。 Generally the number of workers depend up on the number for core's your processor has. 通常,工作人员的数量取决于处理器核心数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM