Archive for December 30th, 2005

native FastCGI is coming

Friday, December 30th, 2005

So, the Ruby on Rails people are getting excited about Apache HTTPD getting native FastCGI support.

To prove that mod_proxy_fcgi isn’t vaporware, I present a live/running demo.

And here is how its configured:

ProxyPass /fcgi-test fcgi-tcp://127.0.0.1:9500/

And here is the source code:

import cgi
import types

def myapp(environ, start_response):
start_response(’200 OK’, [('Content-Type', 'text/html')])
out = “”
# Print all environment variables
out = out+”<h3>mod_proxy_fcgi test page</h3>”
out = out+”<dl>”
env_keys = environ.keys()
env_keys.sort()
for e in env_keys:
if (type(environ[e]) == types.StringType):
out = out+”<dt>”+cgi.escape(e+’='+’”‘+environ[e]+’”‘) + “</dt>”
out = out+”</dl>”
return out

if __name__ == ‘__main__’:
from flup.server.fcgi import WSGIServer
# from flup.server.ajp import WSGIServer
WSGIServer(myapp, bindAddress=(”127.0.0.1″,9500)).run()

Most of the credit really should go to Garrett. He has been writing most of the actual code. I have just been watching the Firefly DVDs and inserting sneer comments about how XYZ patch doesn’t work with XYZ library.

Finally, A shout out to the Flup library for python. It supports AJP, FastCGI and SCGI, making it much easier to move applications between all the available connector protocols.

Update: Okay, like any new code there are bugs. The test page isn’t working right now….. Oh well.

The colo move was good…

Friday, December 30th, 2005

Bloglines performance after the data center move has been GOOD:

200512292105

Via Grabperf.

Mark has posted parts 1, 2, and 3, explaining how the data center move was done.

It was a good Christmas present to finish the move.

Update: Mark has posted part 4, talking about the DNS and proxy magic that made it work.