问题描述
我只是好奇乘客是否能够或能够利用像Mongrel一样的集群.如果是这样,我该如何专门运行带有集群的Passenger?我正在使用nginx.如果没有的话,它的表现如何比Mongrel好?
I'm just curious if Passenger does or can utilize clusters like Mongrel can. If so, how can I specifically run Passenger with clusters? I'm using nginx. And if not, how does it outperform Mongrel so well?
推荐答案
Mongrel集群仅运行指定数量的Mongrel进程,并使用Apache的 mod_proxy_balancer 模块,它充当反向代理并执行负载平衡.
Mongrel Cluster just runs a specified number of Mongrel processes and assigns incoming HTTP requests to them using Apache's mod_proxy_balancer module which acts as a reverse proxy and performs load balancing.
乘客生成器(Ruby)进程使用三种不同且可配置的策略.当使用Passenger的 smart 生成方法时,它可以缓存Ruby on Rails框架代码,从而大大减少了生成时间.乘客还可以重新使用已经加载的Ruby解释器,而不必为每个过程都加载一个新的解释器.
Passenger spawns worker (Ruby) processes to handle HTTP requests using one of three different and configurable strategies. When Passenger's smart spawning method is used it is able to cache the Ruby on Rails framework code, which significantly decreases spawn time. Passenger is also able to re-use the already loaded Ruby interpreter, rather than loading a new one for each process.
这篇关于乘客是否可以使用像Mongrel这样的集群?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!