<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>david kerr &#187; clustering</title>
	<atom:link href="http://www.davidmkerr.com/tag/clustering/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidmkerr.com</link>
	<description>Weapons designer. Innovator, inventor, world changer</description>
	<lastBuildDate>Thu, 20 May 2010 14:30:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PostgreSQL Clustering: HA-JDBC</title>
		<link>http://www.davidmkerr.com/databases/postgresql-clustering-ha-jdbc/</link>
		<comments>http://www.davidmkerr.com/databases/postgresql-clustering-ha-jdbc/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 19:03:16 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?p=210</guid>
		<description><![CDATA[A little while ago I posted about PostgreSQL clustering and I said that I was going to evaluate HA-JDBC as an option. The reason I wanted to use HA-JDBC is that I was looking for a no-coding required solution for seamless fail over. (Similar to Oracle RAC) for PostgreSQL. I&#8217;ll be using a Shared Disk [...]]]></description>
			<content:encoded><![CDATA[<p>A little while ago I <a href="http://www.davidmkerr.com/databases/postgresql-ha-clustering-options/">posted</a> about PostgreSQL clustering and I said that I was going to evaluate HA-JDBC as an option.</p>
<p>The reason I wanted to use HA-JDBC is that I was looking for a no-coding required solution for seamless fail over. (Similar to Oracle RAC) for PostgreSQL.</p>
<p>I&#8217;ll be using a Shared Disk / Heartbeat cluster on the server side, however when the node fails the application will register an error, which is undesirable.</p>
<p>After doing more research it&#8217;s been determined that HA-JDBC won&#8217;t work.</p>
<p>It seems that HA-JDBC is, at best, a SQL replicator, where you have 2 active nodes and HA-JDBC will perform inserts and updates across both databases to keep them in sync. This is fine if you&#8217;re not using the &#8220;serial&#8221; data type in PostgreSQL, Triggers, Functions, time based default values, etc. Using any sort of trigger, the code fires independently on insert and you end up getting out of sync databases.</p>
<p>Another reason why HA-JDBC won&#8217;t work is that if a node is un-reachable HA-JDBC removes it from consideration. So your 2nd &#8220;standby&#8221; when it becomes active won&#8217;t be considered by HA-JDBC without some manual intervention.</p>
<p><del datetime="2010-01-20T01:51:19+00:00">And finally, I&#8217;d advise steering away from HA-JDBC at this point even if the above works for you. I posted a few clarifying questions regarding the above to both the HA-JDBC forums and their mailing list and received no response. If your business is looking into true high availability for their servers you need to choose all of your components with care. A non-responsive community either means the project is dead, or un-caring, both of which are unacceptable when you&#8217;re looking into HA solutions.</del></p>
<p>Finally got a response from Paul Ferraro, Nice guy, very helpful posted below:</p>
<pre>Sorry for the slow response...

HA-JDBC is not the right tool for this job.  HA-JDBC is an
*alternative* to shared disk failover - it was not designed
to be used in concert with it.  Instead, you want something
like JBoss HA DataSource or Weblogic multi-pools.  These are
DataSource proxies whose getConnection() method returns a
raw connection from the first available data source.
DataSource-level.  Connections returned by HA-JDBC's DataSource,
on the other hand, are proxies to connections to each active
database in your cluster.

I can go into more detail if you'd like, such as the advantages/
disadvantages of HA-JDBC over shared-disk failover, if you're
interested.

Paul</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/databases/postgresql-clustering-ha-jdbc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Clustering: JDBC</title>
		<link>http://www.davidmkerr.com/databases/postgresql-clustering-jdbc/</link>
		<comments>http://www.davidmkerr.com/databases/postgresql-clustering-jdbc/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 21:17:12 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?p=175</guid>
		<description><![CDATA[Now that I&#8217;ve got my basic active/passive cluster setup using the shared disk Linux heartbeat method mentioned]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve got my basic active/passive cluster setup using the shared disk Linux heartbeat method mentioned <a href=http://www.davidmkerr.com/?p=164">here</a>. One thing is left, and that&#8217;s allowing my java app to fail-over to the new database without re-coding the app.</p>
<p>Without updating the JDBC driver you would have to catch the failure at the java container level or in the app itself and manage the switch from the down node to the active node.<br />
I don&#8217;t think that&#8217;s &#8220;industry standard&#8221; and it&#8217;s certainly not easy by any means.<br />
The normal way is to let the JDBC driver manage it.</p>
<p>Unfortunately the PostgreSQL JDBC driver doesn&#8217;t handle this event out of the box so we need to invoke a 3rd party.</p>
<p>There aren&#8217;t a lot of options in this area here are two:</p>
<ul>
<li><a href="http://ha-jdbc.sourceforge.net/">HA-JDBC</a>
</li>
<li><a href="http://www.continuent.com/community/tungsten-sql-router">Tungsten SQL Router</a> which used to be called <a href="http://ha-jdbc.sourceforge.net/faq.html#faq-N10143">Sequoia</a>
</li>
</ul>
<p>I found a good discussion around HA-JDBC <a href="http://tom.jteam.nl/?p=5">here</a> </p>
<p>I&#8217;m using Hibernate + Geronimo so i need to do testing to see if that&#8217;s going to work with HA-JDBC but from the sounds of it, it should work just fine.</p>
<p>I&#8217;ll need to evaluate both of these to determine which is the best.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/databases/postgresql-clustering-jdbc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL HA Clustering Options</title>
		<link>http://www.davidmkerr.com/databases/postgresql-ha-clustering-options/</link>
		<comments>http://www.davidmkerr.com/databases/postgresql-ha-clustering-options/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 00:26:07 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[gndb]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[slony]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?p=164</guid>
		<description><![CDATA[I&#8217;ve been evaluating PostgreSQL clustering options for my current project. The reason I&#8217;m looking at clustering is that the DB server will be handling a large number of users and any downtime is catastrophic. So reliability comes before any performance or administrative concerns in a clustering solution. My platform is PostgreSQL 8.3 and SLES Linux. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been evaluating PostgreSQL clustering options for my current project.</p>
<p>The reason I&#8217;m looking at clustering is that the DB server will be handling a large number of users and any downtime is catastrophic. So reliability comes before any performance or administrative concerns in a clustering solution.</p>
<p>My platform is PostgreSQL 8.3 and SLES Linux.</p>
<p>I looked at 4 Solutions:<br />
Option 1: Shared Disk (Heartbeat) Cluster (<a href="http://www.linux-ha.org/">Heartbeat: SLES</a>)<br />
Option 2: Filesystem Replication Based (<a href="http://www.drbd.org/">DR:BD</a> / <a href="http://sourceware.org/cluster/gnbd/">GNDB</a>)<br />
Option 3: DB Replication Based (<a href="http://www.slony.info">Slony I</a>)<br />
Option 4: DB Replication Based (<a href="http://pgcluster.projects.postgresql.org/">PGCluster</a>)</p>
<p>I weighed the pro&#8217;s and con&#8217;s of each of them and eventually chose Option 1 as the best for my needs. </p>
<p>I like the heartbeat solution because:</p>
<ul>
<li>It&#8217;s simple
</li>
<li>There&#8217;s no data loss in a shared disk cluster
</li>
<li>There&#8217;s no replication overhead so no performance impact
</li>
</ul>
<p>Unfortunately, there is very little public documentation regarding heartbeat clusters used with PostgreSQL. I  hope to rectify that over the next weeks and months, so stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/databases/postgresql-ha-clustering-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
