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:
0 Comments:
Post a Comment
Home