<div dir="ltr">Dear Amupama,<div><br></div><div>Just my two cents, as long as you only had single physical server to contain tomcat and pgpool, then option 1 is the best one.</div><div>Since HA (High Availability) conceptually counts about Physical Server Disaster avoidance. then separating 2 PgPool instances but still share resources with other apps like Tomcat is not meet the ideal condition of HA.</div>
<div><br></div><div>Regards, </div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 20, 2014 at 7:18 AM, Anupama Ramaswamy <span dir="ltr">&lt;<a href="mailto:anumr_0123@yahoo.com" target="_blank">anumr_0123@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif"><div>
My current setup involves a Tomcat Web Application on a Postgres backend. I need to have a load balanced / highly available application.  <span style="background-color:transparent">So I have setup postgres with streaming replication and 2 Tomcat server load balanced in a cluster. I have pgpool to load balance the postgres read-only queries.</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">
I do not want pgpool to be a single
 point of failure. So I need to setup 2 pgpool instances. <span style="background-color:transparent">Here is my question.</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">
Of the 2 configurations below, which is recommended and why ?</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">1) Application server = Tomcat + pgpool ---&gt; Each tomcat connects to the local instance of pgpool which load balances against the 2 DB servers. So when one of the
 app servers is down, the other will continue to operate.</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">2) Application Server 1 = Tomcat (active) + active PgPool. Web app connects to local instance of PGpool (through Virtual IP)</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">Application Server 2 = Tomcat (active) + passive PgPool. The web app connects to remote instance of pgpool  (through Virtual IP). The local instance is configured as &quot;Other
 PgPool&quot; with a watchdog. This takes over only if the first instance goes down.</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">Not able to figure out if the first approach has any pitfalls - 2 disparate pgpools supporting 2 front-ends will cause any inconsistencies. Any help/ suggestions welcome.</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">
Regards,</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">Anupama.</div><div><br></div></div>
</div><br>_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><br>Julyanto SUTANDANG<br><br>Equnix Business Solutions, PT<br>(An Open Source an Open Mind Company)<br><br>Pusat Niaga ITC Roxy Mas Blok C2/42.  Jl. KH Hasyim Ashari 125, Jakarta Pusat<br>
T: +6221 7997 692 F: +62216315281 M: +628164858028<br><br><br>Caution: The information enclosed in this email (and any attachments) may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.Unless it is made by the authorized person, any views expressed in this message are those of the individual sender and may not necessarily reflect the views of PT Equnix Business Solutions.
</div>