我应该为我的 Rails 应用程序使用 Apache 还是 Nginx &Passenger 或 Mongrel
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1420183/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Should I user Apache or Nginx & Passenger or Mongrel for my Rails application
提问by Tam
I have a Ruby on Rails application that will be a CMS in way which means it's mostly DB intensive. I expect it to have decent amount of traffic so before designing I'm choosing what servers to use. Most important for me is performance.
我有一个 Ruby on Rails 应用程序,它将成为 CMS,这意味着它主要是数据库密集型的。我希望它有相当数量的流量,所以在设计之前我会选择要使用的服务器。对我来说最重要的是性能。
I heard good things about Nginx and many developers in the Rails community recommends it my only concern about it was that its version is 0.8 which is Beta I believe so I was concerned about potential problems. What is your say?
我听说了有关 Nginx 的好消息,Rails 社区中的许多开发人员都推荐它,我唯一担心的是它的版本是 0.8,我相信这是 Beta,所以我担心潜在的问题。你怎么说?
Also, I want to decide between using Mongrel cluster or Phusion Passenger. What do you think?
另外,我想在使用 Mongrel 集群还是 Phusion Passenger 之间做出决定。你怎么认为?
I'm planning to user Ruby 1.9 as it has better performance that Ruby 1.8 and I will be using VPS to host my website.
我打算使用 Ruby 1.9,因为它比 Ruby 1.8 具有更好的性能,我将使用 VPS 来托管我的网站。
My main things is performance even if it takes longer to setup one over the other.
我的主要事情是性能,即使设置一个比另一个需要更长的时间。
Your opinion is highly appreciated.
非常感谢您的意见。
Thanks,
谢谢,
Tam
谭
回答by Nick L
I'd second for Passenger + Nginx. Very low memory and it's not too difficult to setup. What type of server are your deploying too? Specs? OS? I'd take that into consideration as well considering your available hardware. If you've got enough memory already, then it shouldn't be an issue whether its Passenger or Apache, just optimize and cache your app efficiently.
我第二次选择Passenger + Nginx。内存非常低,设置起来也不难。您也在部署什么类型的服务器?眼镜?操作系统?考虑到您的可用硬件,我也会考虑到这一点。如果您已经有足够的内存,那么无论是Passenger 还是Apache 都不是问题,只需有效地优化和缓存您的应用程序即可。
回答by nasmorn
Two comments: You can deploy any rails app to any of your mentioned servers, so no need to decide this once and for all now.
两条评论:您可以将任何 rails 应用程序部署到您提到的任何服务器上,因此现在无需一劳永逸地决定这一点。
IMO mongrel clusters are no longer worth the trouble. Go for passenger on whatever server makes you happy.
IMO 杂种集群不再值得麻烦。在任何让您满意的服务器上寻找乘客。
回答by Omar Qureshi
Id recommend passenger nginx, the configs are nice and tidy plus the memory footprint is really low compared to passenger apache.
我推荐passenger nginx,配置很好很整洁,而且与passenger apache 相比,内存占用真的很低。

