mod_rails 或 Phusion Passenger 最终是 Ruby on Rails 部署的答案吗?
我从一些书中了解到,Phusion Passenger 是轻松部署 Ruby on Rails 的答案。 但是我的朋友说,首先有Apache +一堆Mongrels,然后是lighttpd,然后是nginx,现在是Passenger,而且似乎无穷无尽......
他还说他使用dreamhost,它使用Passenger,有时他看到他的请求不正在处理。
所以我想知道Passenger是否是RoR部署的最终答案? 您是否使用它并使用“ab”命令来测试该网站是否运行良好?
I read from some books that Phusion Passenger is the answer to easy Ruby on Rails deployment. But my friend said that first there was Apache + bunch of Mongrels, and then lighttpd, and then nginx, and now Passenger, and it seems endless...
he also said he uses dreamhost which uses Passenger, and sometimes he sees his request not being processed.
So I wonder if Passenger is the final answer to RoR deployment? do you use it and used the "ab" command to test if the site is doing quite well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
简短的回答:是的。
长答案:yeeeeeeeeeeeeeeeessssssssssssssss。
认真地说,Phusion Passenger 和 Ruby Enterprise Edition 几乎消除了将 Rails 应用程序迁移到生产环境的所有痛苦。 以前的方法,包括运行一套 Mongrels,需要围绕 Passenger 透明处理的启动、停止和回收侦听器进程进行大量设置,或者通过简单的 Apache(或 nginx)配置选项进行设置。 REE 的补充垃圾收集器意味着分叉新的侦听器使用更少的内存,并且启动速度更快(在 Passenger 的“智能”生成模式下)。
编辑:@srboisvert 提出了一个很好的观点; Passenger 并不是 RoR 部署的最终答案,但目前为止它是我最喜欢的。 有一天,在解决了许多困难的工程问题之后,主流 Ruby 可能会从使用多进程模型托管 RoR 转向单进程模型,这将使管理比 Passenger 更容易。
short answer: yes.
long answer: yeeeeeeeeeeeeeeesssssssssssssssss.
In all seriousness, Phusion Passenger and Ruby Enterprise Edition have taken out pretty much all of the pain of moving a Rails app into production. Previous approaches, including running a suite of Mongrels, required lots of setup surrounding starting, stopping, and recycling listener processes that Passenger handles transparently, or via simple Apache (or nginx) configuration options. And REE's complementary garbage collector means that forking off a new listener uses MUCH less memory, and is faster to boot (in Passenger's "smart" spawning mode).
Edit: @srboisvert makes a very good point; Passenger isn't the final answer to RoR deployment, but for now it's my favorite by far. One day, after a lot of hard engineering problems are solved, mainstream Ruby will probably move from hosting RoR using a multi-process model to a single-process model, which would make management even easier than with Passenger.
这是迄今为止最好的解决方案。 我开始使用 FCGI 进行部署,这很痛苦。 然后杂种来了,情况更好了。 然后 mod_rails 出现了,它好多了。
此外,许多大型酷应用程序正在迁移到 mod_rails,其中包括 37signals 的一些应用程序,所以您知道这很好。
最后引用 DHH 的一句话作为结束:
(来自)
It's the best solution so far. I started deploying with FCGI and it was a pain. Then came mongrel and it was better. Then came mod_rails and it was WAY better.
Also a lot of large cool application are migrating to mod_rails including some by 37signals, so you know that's good.
I'll just end with a quote from DHH:
(via)
是的,这是最简单、最快、最有效的解决方案。
在最近的版本中解决了诸如soap4r等gems的许多问题之后,Passenger现在是部署问题的答案。
我们在平衡环境中运行 Apache/mod_rails,并在 2 台服务器前面使用 HAProxy。 它比我们之前使用 Mongrel/Aapache 的设置可靠得多。
控制
Matt
Yes, it is the easiest, fastest and most efficient solution.
After a lot of problems with gems like soap4r etc. had been resolved in recent releases, Passenger is the answer to deployment questions now.
We're running Apache/mod_rails in a balanced environment with HAProxy in front of 2 servers. It's much more reliable than our previous setup using Mongrel/Aapache.
It's very easy to take control over
Matt
最终答案? 没有什么永远是最终的答案。
我想说,乘客是当前的答案。
Final Answer? Nothing is ever the final answer.
I'd say Passenger is the current answer though.
是的。 自从几周前他们发布了 2.2.0 以来,我一直在 Apache 之前运行 Nginx/Passenger 来处理仍然需要 PHP 的事情。 尤其是 Ruby Enterprise Edition,它接近我所说的“完美”。
Yes. I've been running Nginx/Passenger in front of Apache for whatever still needs PHP since they released 2.2.0 a few weeks back. Especially with Ruby Enterprise Edition, it approaches what I would call "perfect".
我想现在人们会坚持使用 mod_rails 多年。 该模块确实很好。 配置非常简单。 很难用更好的解决方案来取代它。 与mod_php类似。 唯一缺少的关键组件是:Windows 端口。
I guess that now people will stick to mod_rails for many years. The module is really good. Configuration is dead simple. It will be hard to replace it with some better solution. Similar to mod_php. The only key component which is missing: Windows port.
在某些情况下(企业等)JVM 也是一个不错的选择。
In some situations (enterprise, etc) the JVM can also be a good option.