本文介绍了与“杂种"集群相比,使用“乘客"有什么优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是当今最愚蠢的问题,但是...

This is probably the silliest question today but...

Rails团队&许多其他人建议使用旅客而不是杂种机,但我找不到明确的确切好处/优点或潜在隐患的清单.只是想知道是否有人可以帮助解释这一点?

The Rails team & many others recommend using passenger instead of a mongrel cluster, but I cannot find a clear list of exact benefits / advantages of this or what the potential pitfall are. Just wondering if anyone can help explain this?

乘客还是自己的服务器,还是在后台使用杂种动物?

Also is passenger its own server or does it use mongrel under the hood?

谢谢!

推荐答案

在乘客之前,Mongrel是必经之路,但是Mongrel群集可能会妨碍您进行适当的调整.随着应用程序复杂性的增加,每个Mongrel实例的内存占用量都会扩大,这会吞噬可用的磁盘缓存并降低性能,因此您必须密切注意部署中的内存分配平衡.您不时需要对其进行调整,以添加或删除Mongrels.

Before Passenger, Mongrel was the way to go, but a Mongrel cluster can be a nuisance to keep properly tuned. As your application grows in complexity, the memory footprint of each Mongrel instance will expand, and this can eat into available disk cache and degrade performance, so you'll have to pay close attention to the memory allocation balance on your deployments. From time to time you'll have to tweak it to add or remove Mongrels.

另一个缺点是,您需要使用某种启动器(例如monit)来管理这些Mongrel进程,这可能很麻烦并且很困难. Mongrel没有自带的流程管理器.

The other downside is you'll need to manage these Mongrel processes using some kind of launcher like monit and these can be fussy and difficult. Mongrel does not come with its own process manager.

另一个严重的问题是,每个Mongrel都锁定在一个特定的应用程序上,并且很难在一个应用程序与另一个应用程序之间转移负载.

Another serious problem is that each Mongrel is locked to a particular application and shifting loads between one app and another is very difficult to manage.

杂种还依赖于必须自行配置的外部负载均衡器.

Mongrel is also dependent on an external load-balancer that you must configure yourself.

Passenger将处理所有Rails引擎进程的启动,并将尽最大努力有效地分配内存.如果您有许多优先级相互冲突的站点,那么Passenger会很好地按需启动服务器,并在不使用服务器时将其删除.

Passenger will handle launching all the Rails engine processes and will do its best to allocate memory efficiently. If you have a number of sites with conflicting priorities, Passenger will do a good job of launching servers on demand, and pruning them off when they're not used.

Passenger还可以通过查找tmp/restart.txt触发文件来快速重新启动应用程序的所有实例.您不必杀死任何进程或等待重新启动.

Passenger is also very quick to relaunch all instances of an application by looking for the tmp/restart.txt trigger file. You don't have to kill any processes or wait for a restart.

在引擎盖下,乘客使用自己的发射器和调度系统.尽管在功能上它与Mongrel相似,但是Phusion引入了许多显着的性能改进,这些功能使乘客比Mongrel显着提高了内存效率.

Under the hood, Passenger uses its own launcher and dispatch system. Although functionally it is similar to Mongrel, there are a number of significant performance improvements that Phusion has introduced that make Passenger significantly more memory-efficient than Mongrel.

Passenger是一个完整的软件包,可以正常使用并且易于管理. Mongrel只是一个非常基本的Web服务器.

Passenger is a complete package that just works and is surprisingly easy to manage. Mongrel is only a very basic web server.

这篇关于与“杂种"集群相比,使用“乘客"有什么优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 03:49