Hi, I''ve recently deployed a rails app and our platform is Apache 2.2 + mongrel cluster. It seems to be working fine... although no real tests yet. I just recently found out that it is *quite* possible that the live server will not be getting an update to apache 2.2, and the current version is 1.3. So... I''ve installed Apache 1.3 + FastCGI on the dev server and it''s running fine but... In order to get any chance of having the admins upgrade Apache on the live server... they want to know what the advantages are over using FastCGI (which is a simple Apache mod install). What makes Mongrel different that FastCGI? What are the pros and cons of both? Thank you for any feedback... I''m off to rdo more research! Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070410/00bf843c/attachment.html
On 10/04/07 Matt M. said:> What makes Mongrel different that FastCGI?Personally, I find FastCGI''s implementation in apache to be buggy, but that''s my experience. I just found the --prefix argument in mongrel, and it just saved Rails from the rather shortsighted assumption that all Rails sites will be deployed at the root of the site. As a side-question, does anyone know how to make Rails compose URLs properly without using --prefix in mongrel? Thanks, Mike -- Michael P. Soulier <msoulier at digitaltorque.ca> "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20070410/42d8bd43/attachment.bin
My personal experiences with FastCGI have been buggy and just not very agile at all. Setting up FastCGI was always a pain so I tried mongrel which was just more simple and much less buggy. FastCGI is a little faster than mongrel because mongrel has to use TCP and FCGI uses unix sockets. But if you plan on scaling your application(s) to more machines then TCP (mongrel) is clearly better than using unix sockets (FCGI). So my two main arguments are agility and scalability. Additionally mongrel has some nice features that just make life better. Kyle Kochis On 4/10/07, Matt M. <goodieboy at gmail.com> wrote:> > Hi, > > I''ve recently deployed a rails app and our platform is Apache 2.2 + > mongrel cluster. It seems to be working fine... although no real tests yet. > I just recently found out that it is *quite* possible that the live server > will not be getting an update to apache 2.2, and the current version is > 1.3. So... I''ve installed Apache 1.3 + FastCGI on the dev server and it''s > running fine but... > > In order to get any chance of having the admins upgrade Apache on the live > server... they want to know what the advantages are over using FastCGI > (which is a simple Apache mod install). > > What makes Mongrel different that FastCGI? > > What are the pros and cons of both? > > Thank you for any feedback... I''m off to rdo more research! > > Matt > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070410/503dfd95/attachment.html
The simple answer -- but one that probably won''t satisfy your sysadmins -- is that Mongrel is just easier to work with. It''s a tool built specifically around Rails/Ruby, and as such it includes a lot of niceties that make using it a generally more pleasant experience. In my experience this is especially true if a) you are doing a lot of active development (because restarting the server and debugging is a lot easier than with FastCGI), and/or b) you plan on scaling later on with something like Mongrel cluster. Keep in mind that even though this might be a production environment, in the early stages of development you will probably find yourself having to debug things on the production instance. Environment-specific bugs will almost always show up. This is where FastCGI can be extremely annoying compared to Mongrel. Matt M. wrote:> Hi, > > I''ve recently deployed a rails app and our platform is Apache 2.2 + mongrel > cluster. It seems to be working fine... although no real tests yet. I just > recently found out that it is *quite* possible that the live server will > not > be getting an update to apache 2.2, and the current version is 1.3. So... > I''ve installed Apache 1.3 + FastCGI on the dev server and it''s running fine > but... > > In order to get any chance of having the admins upgrade Apache on the live > server... they want to know what the advantages are over using FastCGI > (which is a simple Apache mod install). > > What makes Mongrel different that FastCGI? > > What are the pros and cons of both? > > Thank you for any feedback... I''m off to rdo more research! > > Matt > > > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-usersThis e-mail message is privileged, confidential and subject to copyright. Any unauthorized use or disclosure is prohibited. Le contenu du pr''esent courriel est privil''egi''e, confidentiel et soumis `a des droits d''auteur. Il est interdit de l''utiliser ou de le divulguer sans autorisation.
Grant Hollingworth
2007-Apr-10 20:14 UTC
[Mongrel] rails url prefix (was Re: comparison... why mongrel?)
* "Michael P. Soulier" <msoulier at digitaltorque.ca> [2007-04-10 12:55]:>As a side-question, does anyone know how to make Rails compose URLs properly >without using --prefix in mongrel?Add this to environment.rb: ActionController::AbstractRequest.relative_url_root = "/blah"
Ross Singer
2007-Apr-11 02:37 UTC
[Mongrel] rails url prefix (was Re: comparison... why mongrel?)
Actually, there''s a little more to it than that if you want your public directory to work. See: http://www.ralree.info/2006/6/15/successful-settings-for-apache-forwarding-to-mongrel -Ross. On 4/10/07, Grant Hollingworth <grant at antiflux.org> wrote:> * "Michael P. Soulier" <msoulier at digitaltorque.ca> [2007-04-10 12:55]: > >As a side-question, does anyone know how to make Rails compose URLs properly > >without using --prefix in mongrel? > > Add this to environment.rb: > ActionController::AbstractRequest.relative_url_root = "/blah" > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >