Maybe I'm not explaining myself correctly, maybe your suggestions are the right way to go, but I see a lot of nginx examples such as this:<div><br></div><div><span class="Apple-style-span" style="font-family: lucida, arial, sans-serif; font-size: 12px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><table cellpadding="2" cellspacing="2" style="border-collapse: collapse; text-align: left; background-color: rgb(204, 204, 255); width: 993px; ">
<tbody style="border-top-width: 0px; border-top-style: initial; border-top-color: initial; "><tr><td style="font-family: lucida, arial, sans-serif; font-size: 12px; ">upstream phpproviders {<br> server <a href="http://127.0.0.1:3000">127.0.0.1:3000</a>;<br>
server <a href="http://127.0.0.1:3001">127.0.0.1:3001</a>;<br> server <a href="http://127.0.0.1:3002">127.0.0.1:3002</a>;<br> }<br></td></tr></tbody></table></span><br></div><div>In this example, different port numbers are used, but you can use different ip addresses.</div>
<div><br></div><div>inside the location / tag you would specify:</div><div><br></div><div>proxy_pass <a href="http://phpproviders">http://phpproviders</a></div><div><br></div><div>nginx in the simplest (default mode) would round robin the requests.</div>
<div><br></div><div>Is this not a good type of methodology?</div><div><br></div><div>Thanks</div><div><br><div class="gmail_quote">On Wed, Sep 2, 2009 at 10:28 PM, Jeffrey 'jf' Lim <span dir="ltr"><<a href="mailto:jfs.world@gmail.com">jfs.world@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I would recommend using haproxy if you have the budget for a separate box as a load balancer. As for doing it via the 2nd method... why would you want to do that? And the underlying assumption here - can nginx do that? How would it determine when the load has been reached for "this" box? (so that the rest become "additional" fastcgi requests)<br>
<font color="#888888">
<br>-jf</font><div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Thu, Sep 3, 2009 at 10:11 AM, Ilan Berkner <span dir="ltr"><<a href="mailto:iberkner@gmail.com" target="_blank">iberkner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
So the time has come for us to add another web server (number 2) to our configuration to help with the amount of connections we're getting. I'm looking for some basic recommendations in terms of configuration of nginx.<div>
<br></div><div>That is:</div><div><br></div><div>1. Do I run exactly the same configuration on both boxes and load balance externally (i.e. nginx + php-fpm on each box + dedicated mysql server) or</div><div>2. Do I run nginx + php-fpm on box A and route additional fastCGI requests to box B?</div>
<div><br></div><div>What would the configuration look like? How do I preserver sessions? We are currently using memcached for session menagement and could place that on the dedicated data server. What's the "recommended" methodology?</div>
<div><br></div><div>Thanks!!!!!!!!</div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>