2016-02-29 44 views
2

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中啓用集羣或混合模式,它們是什麼?

所以,如果我用在Heroku puma,我怎麼告訴如果啓用羣集或混合模式,因爲在大約集羣模式puma readme只會談?

如何啓用集羣模式?我如何啓用混合模式?

這是通過在Rails應用程序的配置文件夾中指定config/puma.rb中的工作器數量來完成的嗎?

回答

2

混合模式或羣集模式相同。是的,您需要指定工作人員的人數。您至少需要2名工作人員將其稱爲羣集。一般來說,工作者的數量取決於你的處理器的核心數量。

相關問題