乘客可以像杂种狗一样使用集群吗?

时间:2021-05-24 23:30:26

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这样的集群。如果是的话,我怎么能特别的用集群来运行乘客呢?我使用nginx。如果没有,它怎么能跑得这么好呢?

1 个解决方案

#1


3  

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.

Mongrel集群只运行指定数量的Mongrel进程,并使用Apache的mod_proxy_balancer模块为它们分配传入的HTTP请求,该模块充当反向代理并执行负载平衡。

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.

通过使用三种不同且可配置的策略中的一种来处理HTTP请求。当使用Passenger的智能生成方法时,它可以缓存Ruby on Rails框架代码,这大大减少了生成时间。Passenger还可以重用已经加载的Ruby解释器,而不是为每个进程加载一个新的。

#1


3  

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.

Mongrel集群只运行指定数量的Mongrel进程,并使用Apache的mod_proxy_balancer模块为它们分配传入的HTTP请求,该模块充当反向代理并执行负载平衡。

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.

通过使用三种不同且可配置的策略中的一种来处理HTTP请求。当使用Passenger的智能生成方法时,它可以缓存Ruby on Rails框架代码,这大大减少了生成时间。Passenger还可以重用已经加载的Ruby解释器,而不是为每个进程加载一个新的。