Building notes, projects, and occasional rants

Wake up and smell the fastcgi

You might have noticed that fastcgi has been getting a lot of momentum in the past few months. The biggest deployment I know is Yahoo! Small Bussiness Web Hosting service using Moveable Type under fastcgi.

Most rails apps are deployed using it, Catalyst also has support out of the box, and even PHP works very well with it.

The main advantages I see with it is that it splits the application from the webserver. You can run your fastcgi process under a different user id, and even chroot'ed for increased security. At the same time, static content can be streamed very efficiently by the webserver.

It also helps to improve the webserver because you can make it threaded or add other tweaks without having to worry about if it will break modules like modphp, or modperl.

And you can mix and match, a threaded webserver with a non-threaded app.

There are limitations for now: with mod_perl, for example, you can hook into all of Apache processing phases, and modify almost everything you want on the requests.

But all in all, it's a good technology with a lot of advantages.

But Apache has been lagging behind in the fastcgi support department. The mod_fcgi module is a third party install, and without some patches, it will not work with Apache 2.2.

The big winner seems to be Lighty which has very good fastcgi support.

But it seems that the big boy has awaken, and you should all look forward to mod_proxy_fcgi. It will behind the mod_proxy_* set, so you'll be able to use it with mod_proxy_balancer.

It's good to see decent support for fastcgi in Apache, even if it is a couple of days after I switched to Lighty.

Technorati Tags: , ,