mod_mcpage for lighttpd 1.5 svn patch 0.94.1 (preliminary)

In preparation for some DK4 stuff, I went and revisited my mod_mcpage work and finally knocked a couple of little things off the list of things to do with it.

As usual, this is a patch for lighttpd 1.5. As usual again, there's a tarball too. This patch still only applies to lighttpd 1.5; a version for 1.4 is on the to-do list.

In terms of obvious new features, this one doesn't have much. There's optional MD5 hashing of URIs in the memcached keys, which is handy if you have really long URIs. It does, however, incur a slight penalty, so I wouldn't advise using that option if you don't have to. The other change is setting MEMCACHED_BEHAVIOR_RCV_TIMEOUT so fetching data from the server will at least not hang forever. This is set if you've set non-blocking I/O in the config file. Using the real non-blocking I/O mechanism in libmemcached is preferable, but at the moment using memcached_mget and memcached_fetch breaks stuff in other areas (weird, I know), so for now setting the receive timeout should fix the worst of that problem.

With this patch, almost all of the features I wanted to have in the module have been added. Further testing is still required, but it's performed well in testing environments.

This patch has all the features of the last one, plus:

  • Optional MD5 hashing of keys
  • Pseudo-non blocking on fetching from the server. The receive timeout is set as such that it will at least bail fairly quickly.

Todo down the road:

  • Real non-blocking fetching.
  • Update: The problem with gzipped content from the source server may have come back. That will need to be fixed. Alternatively, it may be a difference between gzipped content and content using the real DEFLATE stream.

Update 2: Because while it works fine on the dev box, this patch has been randomly acting up on the DK4 test server when running with memcached, I’m going to have to move this patch back to “preliminary” status. Seems there’s still something wrong with it.

 
comments powered by Disqus