fastcgi load balancing with lighttpd
July 27th, 2007 by admin

Lighttpd, fast-cgi & PHP can do quite a wonderful setup that can handle significant load. You can have many layers of load balancing & fail-over. Here is a three-layer approach. A dedicated load balancer directs many web servers. Each web server (lighttpd) delegates the processing of dynamic to multiple application servers (fast-cgi).

Configurations

Check out the lighttpd config for mod_fastcgi. In this case, we want only load-balance a single controller PHP file that is called heavily. We also let the webserver be the appserver itself for the moment and become a dedicated one if it becomes overloaded. All other regular PHP requests are served by the localhost (webserver). Add this into your lighttpd.conf:

To start the fast-cgi processes on the application servers:


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

»  Substance:WordPress   »  Style:Ahren Ahimsa