<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: CouchDB Load Balancing and Replication using HAProxy.</title>
	<atom:link href="http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/</link>
	<description></description>
	<lastBuildDate>Fri, 05 Mar 2010 06:54:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ed Ruder</title>
		<link>http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/comment-page-1/#comment-1011</link>
		<dc:creator>Ed Ruder</dc:creator>
		<pubDate>Wed, 26 Aug 2009 21:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeandmotorboat.com/?p=820#comment-1011</guid>
		<description>Thought I&#039;d add a bit more detail that clarifies a couple of gotchas I ran into while bringing up a second CouchDB instance on the same machine.

The first problem I had was in specifying the separate .ini file. I had assumed that -c SOME_PATH/couchdb2.ini would work just like local.ini did for the first instance--i.e., it was an override on top of default.ini. Not so. -c (lowercase C) doesn&#039;t build on the &quot;system default&quot; configuration file chain. -C (uppercase C) does. You can explicitly include default.ini and your instance&#039;s .ini file using -c or include just your instance&#039;s .ini file using -C (or use -c if your instance&#039;s .ini file doesn&#039;t assume it&#039;s building on top of default.ini).

The second has to do with directory and file ownership--if you are running couchdb under the couchdb as I was (and as the default startup script does), the directory containing your database and view needs to be read/write-able by the couchdb user. The log file also has to be writable by the couchdb user. An easy way to make sure this is the case is to chown the directories and log file to be owned by the couchdb user.

Thanks for the article!</description>
		<content:encoded><![CDATA[<p>Thought I&#8217;d add a bit more detail that clarifies a couple of gotchas I ran into while bringing up a second CouchDB instance on the same machine.</p>
<p>The first problem I had was in specifying the separate .ini file. I had assumed that -c SOME_PATH/couchdb2.ini would work just like local.ini did for the first instance&#8211;i.e., it was an override on top of default.ini. Not so. -c (lowercase C) doesn&#8217;t build on the &#8220;system default&#8221; configuration file chain. -C (uppercase C) does. You can explicitly include default.ini and your instance&#8217;s .ini file using -c or include just your instance&#8217;s .ini file using -C (or use -c if your instance&#8217;s .ini file doesn&#8217;t assume it&#8217;s building on top of default.ini).</p>
<p>The second has to do with directory and file ownership&#8211;if you are running couchdb under the couchdb as I was (and as the default startup script does), the directory containing your database and view needs to be read/write-able by the couchdb user. The log file also has to be writable by the couchdb user. An easy way to make sure this is the case is to chown the directories and log file to be owned by the couchdb user.</p>
<p>Thanks for the article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/comment-page-1/#comment-975</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Wed, 15 Jul 2009 19:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeandmotorboat.com/?p=820#comment-975</guid>
		<description>It works pretty well and is in production. Regarding replication I believe there will be configurable permanent replicators coming to couch soon.</description>
		<content:encoded><![CDATA[<p>It works pretty well and is in production. Regarding replication I believe there will be configurable permanent replicators coming to couch soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis</title>
		<link>http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/comment-page-1/#comment-973</link>
		<dc:creator>Curtis</dc:creator>
		<pubDate>Tue, 14 Jul 2009 18:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeandmotorboat.com/?p=820#comment-973</guid>
		<description>Great Post.  How has the HAProxy setup been working for you?  I do worry that the replication step involves too many steps.</description>
		<content:encoded><![CDATA[<p>Great Post.  How has the HAProxy setup been working for you?  I do worry that the replication step involves too many steps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2009-01-27 &#171; Bloggitation</title>
		<link>http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/comment-page-1/#comment-814</link>
		<dc:creator>links for 2009-01-27 &#171; Bloggitation</dc:creator>
		<pubDate>Wed, 28 Jan 2009 07:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeandmotorboat.com/?p=820#comment-814</guid>
		<description>[...] CouchDB Load Balancing and Replication using HAProxy. (tags: sysadmin cluster database couchdb) [...]</description>
		<content:encoded><![CDATA[<p>[...] CouchDB Load Balancing and Replication using HAProxy. (tags: sysadmin cluster database couchdb) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie</title>
		<link>http://www.joeandmotorboat.com/2009/01/27/couchdb-load-balancing-and-replication-using-haproxy/comment-page-1/#comment-812</link>
		<dc:creator>Charlie</dc:creator>
		<pubDate>Tue, 27 Jan 2009 20:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeandmotorboat.com/?p=820#comment-812</guid>
		<description>Nice! I like how easy it is to get the master/slave behavior by simply configuring a proxy server.

I&#039;m wondering about better ways to do this replication though. It looks like we have the following sequence of steps:

1. CouchDB instance A completes an update operation
2. Instance A runs some kind of user-supplied script?
3. Script sends instance A a POST request giving a command to replicate with CouchDB instance B
4. Instance A connects to instance B to get a list of documents on instance B.
5. Instance A determines which documents it has that instance B doesn&#039;t have, and sends those documents to instance B using a batch request.
6. Go back to step 3, replacing B with C
7. ...

That seems kind of inefficient. I&#039;m wondering if we could do something more like:

1. CouchDB instance A completes an update operation
2. Instance A runs some kind of user-supplied script?
3. Script sends the same update to instance B
4. Script sends the same update to instance C
5. ...

or, as a variation on that theme:

3. Script publishes the update to a messaging server. In AMQP terminology, publish the update to and exchange. In JMS terminology, publish it to a topic.

4. &#039;Slave&#039; databases have a live connection over which they are listening for these updates.</description>
		<content:encoded><![CDATA[<p>Nice! I like how easy it is to get the master/slave behavior by simply configuring a proxy server.</p>
<p>I&#8217;m wondering about better ways to do this replication though. It looks like we have the following sequence of steps:</p>
<p>1. CouchDB instance A completes an update operation<br />
2. Instance A runs some kind of user-supplied script?<br />
3. Script sends instance A a POST request giving a command to replicate with CouchDB instance B<br />
4. Instance A connects to instance B to get a list of documents on instance B.<br />
5. Instance A determines which documents it has that instance B doesn&#8217;t have, and sends those documents to instance B using a batch request.<br />
6. Go back to step 3, replacing B with C<br />
7. &#8230;</p>
<p>That seems kind of inefficient. I&#8217;m wondering if we could do something more like:</p>
<p>1. CouchDB instance A completes an update operation<br />
2. Instance A runs some kind of user-supplied script?<br />
3. Script sends the same update to instance B<br />
4. Script sends the same update to instance C<br />
5. &#8230;</p>
<p>or, as a variation on that theme:</p>
<p>3. Script publishes the update to a messaging server. In AMQP terminology, publish the update to and exchange. In JMS terminology, publish it to a topic.</p>
<p>4. &#8216;Slave&#8217; databases have a live connection over which they are listening for these updates.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
