lighty's life

lighty developer blog

PRE-RELEASE: lighttpd-1.5.0-r1435.tar.gz

Yeah, really.

Before you jump around and empty a barrel of beer, try to compile it first. :)


Finally I got some time to finish the loose ends of 1.5.0. MySQL Network MAS is going to release (hopefully) next week, giving me time to work on lighty again.

What works and what doesn’t ?

  • mod_fastcgi, mod_cgi, mod_scgi, mod_proxy are removed
  • mod_proxy_core is the replace for the above plugins
  • you have to spawn fastcgi processes with spawn-fcgi
  • mod_cml is removed and mod_magnet isn’t included yet

Linux AIO

I blogged about Linux AIO before, now you can try it out. Install libaio and build lighttpd with —with-linux-aio. = "linux-aio-sendfile"


I checked that balancing and uploading works nicely work mod-proxy-core with fastcgi and http as protocols.


Start PHP with spawn-fcgi as documented in the manual and add

$HTTP["url"] =~ "\.php$" {
  proxy-core.balancer = "round-robin"
  proxy-core.protocol = "fastcgi"
  proxy-core.backends = ( "" )
  proxy-core.max-pool-size = 16

the to config.

BTW: we use FCGI_KEEP_CONN to keep the connection between lighttpd and the FsatCGI backend up as long as possible.

HTTP (mongrel)

We use keep-alive and HTTP/1.1 by default. Give it a try.

$SERVER["socket"] == ":1445" {
  proxy-core.protocol = "http"
#  proxy-core.balancer = "round-robin"
  proxy-core.balancer = "sqf"
  proxy-core.backends = (
    "" )

sqf is Shortest Queue First and is the preferred balancer if you have backends which different CPUs. See the next blog-post.