Brian McCallister on 27 Jul 2006 04:47:03 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] Rails Diatribe



On Jul 26, 2006, at 8:20 PM, Thos Styles wrote:


I am a newbie regarding RoR, but I think that fastCGI is really a "court of the last resort" dispatching
mechanism- flexible enough, but not really intended for anything too Earth-shaking, as web apps go. On the other hand, I haven't seen anything like a mod-ror.dll to link with Apache that would do a better job of it (haven't looked too hard). If such a beast existed, then requests could be parsed
by URL, and filtered on the basis of some constant URI path element string or file extension, eg:

mod_ruby exists, but it isn't a good option for any high load app as it requires pre-fork, the ruby VM is not thread safe. This means a ruby VM per process, which starts to eat memory *very* quickly.


FastCGI is a kinda weird, but very reasonable protocol for this kind of front-end <--> app server communication. FastCGI has a bit of a bad rap in the RoR world because folks have tried to use the very unmaintained mod_fcgi with Apache 2.0, which it compiles against, but doesn't work very well against. The much better mod_fcgid does a great job, and the upcoming mod_proxy_fcgi should be great.

You could do a shared-memory or domain socket multiplexing a la mod_perl, but no one has really wanted to do a new mod_ruby which supports that. Wouldn't be awful to do, but mod_fcgid, mod_scgi, mod_proxy_http to mongel or lighttpd (which then uses fcgi) all work well -- as does Apache 1.3 and mod_fcgi (if it lacks the features, scaling ability, and niceness of apache 2.0/2.2). If I had the time I'd probably be all over doing worker-mpm compatiible mod_ruby, but alas -- scgi (less efficient, but simpler than fcgi) serves my needs fine, so other itches get scratched.

Anyway, my 2p on it. If mongrel would support http keepalives... oh well. If you are using mod_proxy to a local http instance it should be fine :-)

-Brian
_______________________________________________
talk mailing list
talk@phillyonrails.org
http://lists.phillyonrails.org/mailman/listinfo/talk