<div>Well, actually I am asking about the flow of load balancer action.</div>
<div>&nbsp;</div>
<div>For example, the client will open my homepage and the hompage (index.php)&nbsp;is written in php to connect postgresql.</div>
<div>And the index.php will use pg_connect(host=server1 dbname=... ) to connect postgre database.</div>
<div>In this case, if server1 is down or have more load than server2 then does that connection go to the server2 automatically by load balancer?</div>
<div>Or, Do I have to say explicitly&nbsp;</div>
<div>like</div>
<div>$dbconn = pg_connect(host=server1 dbname=...) or pg_connect(host=server2 dbname=...)</div>
<div>So, What I am asking is taht the only I have to do for load balancer is setting pglb.conf ? Or is there anything else to do for that?</div>
<div>&nbsp;</div>
<div>Thanks,&nbsp;<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 5/28/08, <b class="gmail_sendername"><a href="mailto:mitani@sraw.co.jp">mitani@sraw.co.jp</a></b> &lt;<a href="mailto:mitani@sraw.co.jp">mitani@sraw.co.jp</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>The load balncer has current session numbers of each cluster db.<br>The maximum session number of each cluster db is defined in &quot;pglb.conf&quot;.<br>
Then, load balancer consider the load as &quot;(connected sessions)/(max sessions)&quot;.<br>It is consider neither connecting times nor cpu load.<br>It is using just number of sessions.<br><br>About the pg_connect error.<br>
Can you let us know the debug messages of replication server.<br>Probably, we can find something in the debug log.<br><br>Regards,<br>--------------<br>At.Mitani<br><br>-- original message --<br>From: Chahyeon Rhee&lt;<a href="mailto:rchyeon@gmail.com">rchyeon@gmail.com</a>&gt;<br>
To: &lt;<a href="mailto:pgcluster-general@pgfoundry.org">pgcluster-general@pgfoundry.org</a>&gt;<br>Sent: Wed, 28 May 2008 17:03:31 -0600<br>Subject: [Pgcluster-general] concept of load balance server<br><br>&gt;Hi!<br>&gt;I am setting up load balance and cluster db1 in server 1<br>
&gt;and replicator and cluster db2 in server 2.<br>&gt;I just tested replication and restoration.<br>&gt;Now, I would like to test load balance. But, I am little bit confused.<br>&gt;What I am thinking&nbsp;&nbsp;is that I think if client request some then they will go<br>
&gt;to some page in server 1.<br>&gt;Which is starting point. So I used pg_connect(host=server1 port=5433 dbname=<br>&gt;... )<br>&gt;What I am thinking is if that connection go to load balance server in port<br>&gt;5433 then load balance server will determine which is lower load from<br>
&gt;server1 and server 2. Server 1 and server 2 has port 5432. And the selected<br>&gt;database will be used for that service.<br>&gt;Is that right ?<br>&gt;If not, please give me any advice.<br>&gt;Also when I am doing like this, I am getting this error message *<br>
&gt;Warning*: pg_connect()<br>&gt;[function.pg-connect&lt;<a href="http://seo.gkmc.utah.edu/cha_test/pgcluster/function.pg-connect">http://seo.gkmc.utah.edu/cha_test/pgcluster/function.pg-connect</a>&gt;]:<br>&gt;Unable to connect to PostgreSQL server: server closed the connection<br>
&gt;unexpectedly This probably means the server terminated abnormally before or<br>&gt;while processing the request.<br>&gt;<br>&gt;If you know about this, please give me some help.<br>&gt;<br>&gt;Thanks,<br>&gt;<br>&gt;_______________________________________________<br>
&gt;Pgcluster-general mailing list<br>&gt;<a href="mailto:Pgcluster-general@pgfoundry.org">Pgcluster-general@pgfoundry.org</a><br>&gt;<a href="http://pgfoundry.org/mailman/listinfo/pgcluster-general">http://pgfoundry.org/mailman/listinfo/pgcluster-general</a><br>
&gt;<br><br>_______________________________________________<br>Pgcluster-general mailing list<br><a href="mailto:Pgcluster-general@pgfoundry.org">Pgcluster-general@pgfoundry.org</a><br><a href="http://pgfoundry.org/mailman/listinfo/pgcluster-general">http://pgfoundry.org/mailman/listinfo/pgcluster-general</a><br>
</blockquote></div><br>