PRE-RELEASE: lighttpd-1.4.12-20060724-0947.tar.gz 6
I just uploaded the 3rd pre-release of lighttpd 1.4.12:
http://www.lighttpd.net/download/lighttpd-1.4.12-20060724-0947.tar.gz
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 lighttpdAgainst 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:
- load-balancers (hash, fair, rr)
- scheduling in the plugin instead of the kernel
- fail-over handling
- x-sendfile and x-rewrite-*
- keep-alive for HTTP
- HTTP/1.1
- header-rewriting
Trackbacks
Use the following link to trackback from your own site:
http://blog.lighttpd.net/articles/trackback/1833
-
Typo 4.0.0 is now out and features a very nice new looking admin. To add to the excitement a pre release of the new lighttpd with a working mod_proxy is out. I’m be looking forward to getting this going on our server this week.
Comments
-
Would it be possible to change lighty so that if a server.document-root is specified for the block that it will try to satisfy requests itself from the file system before handing them out to the proxy? This would make this kind of setup enormously more useful.
-
Hey Jan, great work on all of this. I was able to get a rails action with a simple database query and small view render to run at 113req/sec with 3 mongrels behind the latest pre-release on linux. THe proxy_core is shaping up to be pretty sweet. I cannot build the latest pre release on OSX however. I can build 1.4.11 fine but the pre release errors out of make with this: Is there aything special I have to do to build on OSX?
-
http://trac.lighttpd.net/trac/ticket/771 check this out, I think this serious bug also exists in this prerelease.
-
I'm getting the same thing as you Ezra on my OSX box. I'll wait to see if the final build is any better, or you can contact me to test.
-
I tried the 1.4.12 pre-release on my VPS today, it seems that after servicing one set of requests through Mongrel, the second kills it. Inside the logs I see: Not too sure what's causing it, if you want me to check anything out I'll happily take a peek.
-
same error in my VPS using ubuntu dapper, the second request kills lighty