Re: Using php in custom built http server

From: Date: Sat, 20 Dec 2008 20:33:59 +0000
Subject: Re: Using php in custom built http server
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-284892@lists.php.net to get a copy of this message
On Sat, Dec 20, 2008 at 9:37 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote: > well now ill have to go scope out nginx :D > > anyways, major diff between cgi & libphp should be performance, wherein cgi > should be like waaay slower. but supposedly fastCGI is pretty solid. peep > this thread from a little while back, > > > http://coding.derkeiler.com/Archive/PHP/comp.lang.php/2007-01/msg00120.html > > and it looks like lighttpd supports fastCGI+php, so again, prob a good > source for free working code examples ;D you can look at nginx or lighttpd for samples of fastcgi. i think there are some very minor implementation details where one might be better than another, etc. fastcgi is good because it does not tie up the webserver itself with a PHP engine that leaks some memory, but dispatches the request to a separate entity and allows you to scale them separately. a webserver like nginx can do much more work even on a single box - wordpress.com had it pushing 8000 reqs/s of real world load balancing traffic - and then you can focus on giving fastcgi the resources it needs, be it more engines on the same box or splitting it apart and creating a pool of fastcgi engines on N servers... i'd also recommend php-fpm. it makes configuring php for fastcgi elegant, adds in multiple options and will soon adaptively spawn the amount of engines like apache does with webserver threads/processes/whatever as needed...

« previous php.general (#284892) next »