何时使用 Mongrel 作为 Rails 应用程序的 Web 服务器?
当我开始我的第一个更大 Rails 应用程序时,我选择使用 Apache(带有 Passenger),因为我已经有一些使用 PHP 的经验,但我没有有关部署 Rails 应用程序的任何深入知识。
如何为 Rails 应用程序选择 Web 服务器?
Apache 和 Mongrel 之间有什么主要区别吗?
或者这只是一个品味问题?
When I started my first bigger Rails application, I chose to use Apache (with Passenger), because I already had some experience with it with PHP, but I don't have any deep knowledge of deploying Rails applications.
How would one choose web server for a Rails app?
Are there any main differences between Apache and Mongrel?
Or is it just a matter of taste?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如您所知,两种流行的设置是:
Apache + Passenger
Apache + mongrel(Apache 向您的 mongrel 集群发送请求)
是的,这是一个品味问题。
您为您的第一个应用程序选择了 Passenger,因为它的设置要容易得多。
它是 ROR 官方网站上排名第一的推荐选项。
性能也非常好。
使用 mongrel 仍然是一个不错的选择,但设置和管理比较困难。
您需要确保针对一组杂种而不是仅一个杂种实例运行 Rails 应用程序(出于性能/并发请求的原因)。意思是管理你的 apache + 管理你的杂种。
As you know, two popular setups are:
Apache + passenger
Apache + mongrel (Apache sending requests to your mongrel cluster)
Yes, It is a matter of taste.
You made the good choice with Passenger for your first app as it is far easier to setup.
It is the #1 recommended option on ROR official Website.
Performance is also very good.
Using mongrel is still a good option but it is harder to setup and administrate.
You will need to make sure you are running your rails app against a cluster of mongrel and not only one mongrel instance (for performance/concurrent request reason). Meaning adminstration of your apache + administration of your mongrels.
没有理由使用杂种。
您看到很多使用 mongrel 的网站/教程的原因是……在 Passenger 之前它是一个不错的选择。
Passenger 在性能方面更好,安装非常容易,并且不需要(对于 90% 的情况)管理。
There is no reason to use mongrel.
The reason you see lots of sites/tutorials using mongrel is.. it was a good choice before Passenger.
Passenger is better on the performance side, dead easy to install and no (for the 90% cases) managing is required.
也可以做Nginx + Mongrel集群。 (不过我不推荐。)选择 Phusion Passenger。设置非常简单而且速度很快。没有理由不使用它。
我将 Passenger 与 Nginx 一起使用。除了 Web 服务器之外,还可以考虑使用 Ruby Enterprise Edition。这将为您节省大量内存。 〜30%。 Ruby 企业版。
You can also do Nginx + Mongrel cluster. (I don't recommend it though.) Go with Phusion Passenger. It's pretty easy to setup and it's fast. No reason not to use it.
I use Passenger with Nginx. Besides just the web server, also look into using Ruby Enterprise Edition. It's going to save you a good amount of memory. ~30%. Ruby Enterprise Edition.