Aaron Blohowiak on 27 Jul 2006 07:38:52 -0000


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

Re: [PhillyOnRails] Rails Diatribe


Brian,

Thank You for dropping some knowledge. One minor point of clarification; mod_scgi was written by Zed Shaw, who later went on to write mongrel as a better way to serve ruby apps. 

Can you tell us more about the http keepalive bit?

Aaron Blohowiak

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 mailing list
talk@phillyonrails.org
http://lists.phillyonrails.org/mailman/listinfo/talk