Blogs and Stuff

Intellectual plumbing and 100% toll free.

Blogs

Archives: July 2006

0 Comments By Damon on Jul 23 in Website and Rubyonrails.

Webrick, Apache, FastCGI, Lighthttpd? These are only a small selection of some of the choices one must make when figuring out what to use to serve Rails applications. Initially, I've been using the combination of Apache 2.0 and FastCGI while running in Rails 'production' mode to try and make the site as zippy as possible. Even though everything worked fine, there were occasionally times when some of the FastCGI processes turned into zombies.

Recently, I've been doing some reading about this HTTP server called Mongrel. Quoting the Mongrel website...

'Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, and Camping frameworks.'

Despite having a cool name, I really hadn't taken the time to give it a fair shot. Why fix something that isn't broke, right? Well, since I had already busted everything else on my network, I figured why not give it a shot. I had read an article that talked about configuring Mongrel and Apache so that there was load balancing using a combination of mod_proxy and mod_proxy_balancer.

Two hours later, I finally discovered why things weren't working. Apache's mod_proxy_balancer only supports Apache 2.2. Considering I'm running Apache 2.0, it was no wonder I wasn't having any luck. So I scraped the load balancing idea for now, I'll do that later when Ubuntu makes an Apache 2.2 package available. For now, I've installed Mongrel and used mod_proxy to server the content you are now viewing.

Now that this site is served via Mongrel, I must say, pages load mighty fast. I didn't do any speed comparisons between Mongrel and Apache + FastCGI so it's kind of hard to tell. For now, I think I'll just leave the site as it is and see how things go. Eventually, I'll put some load balancing in play when Apache 2.2 comes out so that I can provide speedy service to all 23 visitors I have a day. Talk about overdoing it, huh!

  • Current rating is 4
  •  
  •  
  •  
  •  
  •