This is the big release of Mongrel that’s been in the works for a while
(well, like a week). It is chock full of changes and features, but
it syncs up the Win32 side of things, and validates that Edge Rails
without problems. It also features a more extensive and useful example
the GemPlugins called mongrel_config.
First the usual stuff for people without a clue.
WHAT IS MONGREL?
Mongrel is a small fast little web server project trying to bring the
of FastCGI and the simplicity of WEBrick for deploying any Ruby web
application. It already supports Ruby on Rails, Camping, and Nitro and
could soon support IOWA. Since it is a regular old HTTP based server it
be clustered, manipulated, and deployed like any other web server you
Check out the nifty website at:
TOP 10 REASONS TO USE MONGREL
- It’s damn fast without being a pain to install.
- It works on tons of platforms with active testing on Win32, FreeBSD,
Linux, OSX, and NetBSD.
- It is probably the very best deployment solution for people doing
Rails development, especially since it actively supports windows
and has a reasonably nice management tool.
- It’s fast enough that you could probably run your small to medium
Ruby web applications using just Mongrel and be perfectly happy.
- It actively supports Rails style page caching which could give your
application a major performance boost without any extra deployment
- It uses an insanely correct HTTP parser which I’ve found blocks quite
few exploits. This parser is also what makes Mongrel so Fast.
- It has a great plugin system that lets you package your extensions as
gems and your users just “gem install and go”.
- It is LGPL so you thieves can make money (but I get Mongrel mods
- It supports and uses Camping. Camping is cool.
And the best reason to use Mongrel is…
- Isn’t a cool name like Mongrel enough?
You might need sudo, you will need Ruby 1.8.4, and you’ll need a
(unless you’re on win32).
Simple enough. If you have mongrel already try “gem upgrade”. If that
causes problems then you might have to clear out gem_plugin, mongrel,
mongrel_config, and mongrel_status. This is rare and typically only if
people have been tracking my development.
For newbies just do this:
$ gem install mongrel
$ gem install mongrel_config
$ gem install mongrel_status (if you want this)
NEW STUFF TO TRY IN 0.3.11
The 0.3.11 release features edge Rails support, some great
big stability improvements, some good docs for folks to start using, and
finally the beginning of a config tool implemented as a GemPlugin. Most
importantly it completely supports Win32 again and the mongrel_config
actually works better in Win32.
If you haven’t seen it yet, check out
http://mongrel.rubyforge.org/docs/lighttpd.html For a good set of docs
getting Mongrel up in a very fast production deployment running on one
Check out http://mongrel.rubyforge.org/docs/gem_plugin.html for docs on
writing your very own mongrel_rails commands as gem plugins. The
write your own handlers, filters, and potentially whole applications as
plugins coming soon. Adventurous people could try doing a rails plugin
adding “rails” as a dependency on their plugin gem.
Especially check out the gpgen tool for getting a mongrel plugin up with
== Edge Rails
This release was tested with Edge Rails and several applications, but
interested in more people living on the edge.
== Config Tool
If you’re on Unix (OSX too) or Windows you now have a new thing to play
with: mongrel_config. Once you install the mongrel_config gem you get a
command for mongrel_rails. You can try it two ways depending on your
1) cd myrailsapp
2) $ mongrel_rails configtool
3) Hit the web page it says and try starting and stopping your rails
1) $ mongrel_rails configtool
2) Hit the web page and install new services, delete them, start
stop them, check out the start/stop logs, and view all of the service’s
parameters. Yeah, win32 wins on this one.
And yes, win32 configtool doesn’t need to be in any rails directory,
means smart people will make a simple link that runs this in order to
their rails apps services.
Mongrel now supports Camping a lot better and uses it extensively in the
mongrel_config plugin. Camping is _why’s little micro-framework for
web applications. It’s perfect for little tools like the mongrel_config
If you’re interested in writing a little application and don’t want a
Rails app then try looking at the code to mongrel_config to get an idea.
works great, the only thing is that there’s tons of PFM in Camping that
seems to break Rails like crazy. Camping == oil. Rails == water.
== The Dreaded TCP Hack
Sean Treadway gave me a bit of hack code which jacks the OS listen queue
from the default (usually 5) to a whopping 1024. This makes Mongrel
concurrency much better. Give it a try and let me know how it works for
I’ll be writing the filters feature and finally the configuration file
will let you configure any handlers and filters from a .yaml file. This
needed so that people can write plugins to give you special filters,
handlers, or whole applications (similar to configtool).
After this I’ll be talking with Luis to see if we can consolidate the
mongrel_rails_service and mongrel_rails by using the plugin system to
implement the commands. We’ll also look at making the mongrel_config
Finally I’m talking with the IOWA folks to roll their web app into the
Mongrel kennel. Fun stuff!
Enjoy the release and feel free to shoot me your problems, praise, and
Zed A. Shaw