PRE-RELEASE: lighttpd-1.4.12-20060724-0947.tar.gz

I just uploaded the 3rd pre-release of lighttpd 1.4.12.

This pre-release should work on most platforms and it mainly got improvements for our mongrel users. A small test has shown that we can even improve the performance of mongrel by balancing over 2 local instances (on a single-cpu machine).

I’m using it here against 2 mongrels:

$SERVER["socket"] == ":1446" {
    proxy-core.balancer = "round-robin"
    proxy-core.protocol = "http"
    proxy-core.backends = ( "127.0.0.1:3000", "127.0.0.1:3001" )
}

My small rails app got started with mongrel:

$ RAILS_ENV="production" mongrel_rails start --port 3000
$ RAILS_ENV="production" mongrel_rails start --port 3001

The performance with of the RR-LB was tested with ab, run 3 times:

$ ab -c 20 -n 500 http://127.0.0.1:1446/expenses/
  Requests per second:    22.67 [#/sec] (mean)
  Requests per second:    22.68 [#/sec] (mean)
  Requests per second:    22.97 [#/sec] (mean)

In top the cpu-time was split nicely:

  PID  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
31104 26748  23m 2468 S 42.6  3.4   0:30.09 mongrel_rails
31168 27216  23m 2472 R 40.3  3.4   0:30.10 mongrel_rails
28509  9728 4900 2600 S  5.6  0.7   0:03.91 lighttpd

Against a single mongrel, without lighty, to measure the native performance:

$ ab -c 20 -n 500 http://127.0.0.1:3000/expenses/
  Requests per second:    20.51 [#/sec] (mean)
  Requests per second:    20.42 [#/sec] (mean)
  Requests per second:    20.65 [#/sec] (mean)

Conclusion: 2 mongrels are faster than one (even on a single CPU machine).

To get more background on mod_proxy_core check out: