PHP/FCGI balancing

Igor Clark igor at pokelondon.com
Wed Jun 18 13:15:56 MSD 2008


Thanks Philip,

That's a good suggestion. I had considered swapping them around to  
make the most of what we now have, but there's so much stuff built and  
running live on the existing nginx <--> php <--> mysql setup already  
that I'm really wary of making wholesale changes like that before the  
main thing goes live next week, and unfortunately I definitely don't  
have time to start getting into DB replication issues. The main  
campaign's only live for a week! Hence my wish to make the best use of  
the unexpected extra box in line with the existing setup rather than  
making big changes.

Appreciate your reponse. I'll bear it mind on the next project!

Best wishes
Igor

On 18 Jun 2008, at 09:51, Phillip B Oldham wrote:

> Igor Clark wrote:
>> I'm considering whether to:
>>
>> - leave all web serving to 8GB box 1, and dedicate 8GB box 2 to PHP  
>> application serving, or
>>
>> - load-balance web traffic between both 8GB boxes, say 70% to  
>> existing box and 30% to new box, and run PHP app server on new 8GB  
>> box.
>>
>> As per Q1, I'd like to be able to specify some weighting on the  
>> fastcgi-->PHP traffic so that I could tune which box processes what  
>> a bit more finely, but from what I can see in the nginx  
>> documentation, this isn't possible.
>>
>> The latter way seems to spread the load, but the former way  
>> dedicates machines to doing one thing at a time. Given that the  
>> nginx box is currently running at loads of less than 0.1 and has  
>> over 2GB of RAM free, perhaps the extra nginx muscle isn't necessary.
>>
>> There is a bit of processing overhead on the PHP side, as the AMF  
>> codec processing has to be done in PHP (the PHP AMF C extension has  
>> a bug with AMF3 which breaks our app) - although we're using APC,  
>> which seems to speed things up nicely.
>>
>> What do you think would be most sensible?
> Would it not be better to use the two 8's for MySQL and PHP (same  
> set-up on both, with the mysql db replicating from one to the  
> other), and have the two 4's as nginx servers in a fail-over  
> scenario? I'd've thought that nginx wouldn't benefit as much from  
> the ram as PHP & MySQL would, and ensuring that if one of the "app"  
> servers goes down its not the end of the world as you can still  
> serve content.
>
> -- 
>
> *Phillip B Oldham*
> The Activity People
> phill at theactivitypeople.co.uk <mailto:phill at theactivitypeople.co.uk>
>
> ------------------------------------------------------------------------
>
> *Policies*
>
> This e-mail and its attachments are intended for the above named  
> recipient(s) only and may be confidential. If they have come to you  
> in error, please reply to this e-mail and highlight the error. No  
> action should be taken regarding content, nor must you copy or show  
> them to anyone.
>
> This e-mail has been created in the knowledge that Internet e-mail  
> is not a 100% secure communications medium, and we have taken steps  
> to ensure that this e-mail and attachments are free from any virus.  
> We must advise that in keeping with good computing practice the  
> recipient should ensure they are completely virus free, and that you  
> understand and observe the lack of security when e-mailing us.
>
> ------------------------------------------------------------------------
> <phill.vcf>

--
Igor Clark • POKE • 10 Redchurch Street • E2 7DD • +44 (0)20 7749 5355  
• www.pokelondon.com








More information about the nginx mailing list