NYCPHP Meetup

NYPHP.org

[nycphp-talk] spreading php out

Jesse Callaway bonsaime at gmail.com
Sun Jan 25 23:20:05 EST 2009


I was about to install php on a G4 I have and thought I should maybe
go lightweight with it. Really I'm sure it can handle Apache 2 just
fine, since it's just for development... but why not make it fun?

So I took a look at going with lighttpd from the php manual and the
setup that that would entail. What really struck me was that fastcgi
can take a network socket as well as the traditional file socket.
Here's an excerpt from the php.net manual:

http://us2.php.net/manual/en/install.unix.lighttpd-14.php

Connecting to remote FCGI instances

Fastcgi instances can be spawned on multiple remote machines in order
to scale applications.

Example #3 Connecting to remote php-fastcgi instances

fastcgi.server = ( ".php" =>
   (( "host" => "10.0.0.2", "port" => 1030 ),
    ( "host" => "10.0.0.3", "port" => 1030 ))
)


Whoa! Has anyone done this? I understand php isn't probably what's
killing your CPU, rather, it's the database... but I was psyched to
stumble upon this anyway in case it ever comes up in the future.

More people are probably familiar with traditional load balancing
using Apache 1 stripped down. I'm interested to see if anyone's
stripping it *all the way* down like in this example.

-jesse



More information about the talk mailing list