<div>Well, actually I am asking about the flow of load balancer action.</div>
<div> </div>
<div>For example, the client will open my homepage and the hompage (index.php) 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 </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> </div>
<div>Thanks, <br><br> </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> <<a href="mailto:mitani@sraw.co.jp">mitani@sraw.co.jp</a>> 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 "pglb.conf".<br>
Then, load balancer consider the load as "(connected sessions)/(max sessions)".<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<<a href="mailto:rchyeon@gmail.com">rchyeon@gmail.com</a>><br>
To: <<a href="mailto:pgcluster-general@pgfoundry.org">pgcluster-general@pgfoundry.org</a>><br>Sent: Wed, 28 May 2008 17:03:31 -0600<br>Subject: [Pgcluster-general] concept of load balance server<br><br>>Hi!<br>>I am setting up load balance and cluster db1 in server 1<br>
>and replicator and cluster db2 in server 2.<br>>I just tested replication and restoration.<br>>Now, I would like to test load balance. But, I am little bit confused.<br>>What I am thinking is that I think if client request some then they will go<br>
>to some page in server 1.<br>>Which is starting point. So I used pg_connect(host=server1 port=5433 dbname=<br>>... )<br>>What I am thinking is if that connection go to load balance server in port<br>>5433 then load balance server will determine which is lower load from<br>
>server1 and server 2. Server 1 and server 2 has port 5432. And the selected<br>>database will be used for that service.<br>>Is that right ?<br>>If not, please give me any advice.<br>>Also when I am doing like this, I am getting this error message *<br>
>Warning*: pg_connect()<br>>[function.pg-connect<<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>>]:<br>>Unable to connect to PostgreSQL server: server closed the connection<br>
>unexpectedly This probably means the server terminated abnormally before or<br>>while processing the request.<br>><br>>If you know about this, please give me some help.<br>><br>>Thanks,<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>
><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>