You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by David Van Couvering <da...@vancouvering.com> on 2009/02/26 18:48:56 UTC

CouchDB and clustering

Hi, all.  As I am looking more into CouchDB, I am realizing that there is a
misconception I had (or think I have), and I just want to clarify:

CouchDB is distributed in nature in that it allows for bi-directional
asynchronous replication even under conditions where the network is
reliable.  So as Jens just said on the user list, "CouchDB could be used to
implement a database with millions of server nodes all around the world".

But if I understand things correctly, a given CouchDB database must be able
to reside completely on a single node.  In the current implementation, there
is no real clustering support.  The features that I would expected in a
distributed storage system include (but probably this is not a complete
list):

- Partitioning/sharding of data using some kind of consistent hash on the
key
- Efficient failure detection and failover
- A "single image" view of the cluster from the perspective of the client
API
- An easy to use management interface for managing the cluster (status view
and notification, adding and removing nodes, online upgrade, etc.)

Watching the mail go by, it appears that this is something that has been
thought of and considered in the architecture, but not yet implemented.

I have seem some discussions about adding sharding support and a single
image view, but not much about efficient failure detection or a management
infrastructure and API.

First of all - is my perception correct or am I missing something?  I often
do...

Second - I think they are, but I wanted to confirm - are these things
planned but just the community hasn't had time to address them yet?  What
priority are they taking right now, or are there other fish to fry?

The reason I ask is, it appears the advantages of CouchDB *right now* is
about a highly robust, flexible and high throughput read-mostly data
store.   The other advantage is that the API is easy, approachable, and
web-ready, unlike many stores out there.  I love the pre-compiled views that
allow you to have highly efficient slice-and-dice views into your
documents.  I also think it's an excellent base for a peer-to-peer
replicated data store, allowing people to collaborate over the Internet
without requiring a centralized server (although I am concerned about how
easy it is for a Mere Mortal to install a CouchDB-based app on their
computer).

But what it's not ready for is to give you an out-of-the box clustered
storage solution.  Maybe later, but not now.

Is that about right?

Thanks!

David
-- 
David W. Van Couvering

I am looking for a senior position working on server-side Java systems.
 Feel free to contact me if you know of any opportunities.

http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering

Re: CouchDB and clustering

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Feb 26, 2009 at 7:06 PM, Chris Anderson <jc...@apache.org> wrote:
> On Thu, Feb 26, 2009 at 3:56 PM, Ben Browning <be...@gmail.com> wrote:
>> I think I've captured, at least at a high-level, the general consensus
>> on partitioning here:
>>
>> http://wiki.apache.org/couchdb/Partitioning_proposal
>>
>
> This looks great to me, thanks for capturing it here! The actual
> hashing of docids and merging of view queries will probably not be the
> hard part. I expect the hard part to be configuration and management
> of nodes across machines, as well as communication between nodes.
>
> There has been some work to make CouchDB more OTP-like (having trouble
> finding links...) and I think doing that first could make the rest of
> this job much easier.
>
> Thinking we should move this conversation to dev@ to ensure we get the
> right people's attention. ('scuse the cross-post.)
>
> Chris
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>

I'm starting to believe that becoming more OTP compliant is going to
be the most (immediately) important aspect of supporting CouchDB nodes
that span physical hosts.

By getting the core bits of functionality separated into OTP
modules/apps/units/appropriate-term replacing bits of CouchDB
functionality becomes *alot* easier.

I think a good place for figuring out how to make the different bits
work would be to sit down and figure out a modular split for CouchDB
and then make those our OTP bits. Then with a configurable setup,
having a plugin that replaces the entire storage system (with say, a
distributed btree implementation) would be as easy as changing an INI
setting.

HTH,
Paul Davis

Re: CouchDB and clustering

Posted by Jan Lehnardt <ja...@apache.org>.
On 27 Feb 2009, at 11:13, Martin Scholl wrote:

> Chris Anderson wrote:
>> There has been some work to make CouchDB more OTP-like (having  
>> trouble
>> finding links...) and I think doing that first could make the rest of
>> this job much easier.
> I tend to agree.
>
> Shameless plug: there was once a patch, which was rejected (search  
> JIRA
> for it, forgot the issue ID).

https://issues.apache.org/jira/browse/COUCHDB-216 wasn't rejected per- 
se,
it just needs rework.

Cheers
Jan
--


Re: CouchDB and clustering

Posted by Martin Scholl <ms...@diskware.net>.
Hello all,


Chris Anderson wrote:
> There has been some work to make CouchDB more OTP-like (having trouble
> finding links...) and I think doing that first could make the rest of
> this job much easier.
I tend to agree.

Shameless plug: there was once a patch, which was rejected (search JIRA
for it, forgot the issue ID).


Martin

Re: CouchDB and clustering

Posted by Chris Anderson <jc...@apache.org>.
On Thu, Feb 26, 2009 at 3:56 PM, Ben Browning <be...@gmail.com> wrote:
> I think I've captured, at least at a high-level, the general consensus
> on partitioning here:
>
> http://wiki.apache.org/couchdb/Partitioning_proposal
>

This looks great to me, thanks for capturing it here! The actual
hashing of docids and merging of view queries will probably not be the
hard part. I expect the hard part to be configuration and management
of nodes across machines, as well as communication between nodes.

There has been some work to make CouchDB more OTP-like (having trouble
finding links...) and I think doing that first could make the rest of
this job much easier.

Thinking we should move this conversation to dev@ to ensure we get the
right people's attention. ('scuse the cross-post.)

Chris

-- 
Chris Anderson
http://jchris.mfdz.com

Re: CouchDB and clustering

Posted by Chris Anderson <jc...@apache.org>.
On Thu, Feb 26, 2009 at 3:56 PM, Ben Browning <be...@gmail.com> wrote:
> I think I've captured, at least at a high-level, the general consensus
> on partitioning here:
>
> http://wiki.apache.org/couchdb/Partitioning_proposal
>

This looks great to me, thanks for capturing it here! The actual
hashing of docids and merging of view queries will probably not be the
hard part. I expect the hard part to be configuration and management
of nodes across machines, as well as communication between nodes.

There has been some work to make CouchDB more OTP-like (having trouble
finding links...) and I think doing that first could make the rest of
this job much easier.

Thinking we should move this conversation to dev@ to ensure we get the
right people's attention. ('scuse the cross-post.)

Chris

-- 
Chris Anderson
http://jchris.mfdz.com

Re: CouchDB and clustering

Posted by David Van Couvering <da...@gmail.com>.
This is a great summary of the goals.  What I would like to see (and what
I'm offering to write up) is a set of scenarios/use cases, and use this to
make sure there is agreement on the functionality, to help guide/frame the
approach, and to exercise the design we come up with.

Unless there are any objections, I'll go ahead and start putting something
together on the Wiki.

David

On Thu, Feb 26, 2009 at 3:56 PM, Ben Browning <be...@gmail.com> wrote:

> I think I've captured, at least at a high-level, the general consensus
> on partitioning here:
>
> http://wiki.apache.org/couchdb/Partitioning_proposal
>
> There's not a lot of actual implementation details yet since those
> still need to be worked through and I'm planning to concentrate on the
> prerequisite Erlang API first. Feel free to edit as needed.
>
> Ben
>



-- 
David W. Van Couvering

I am looking for a senior position working on server-side Java systems.
 Feel free to contact me if you know of any opportunities.

http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering

Re: CouchDB and clustering

Posted by Ben Browning <be...@gmail.com>.
I think I've captured, at least at a high-level, the general consensus
on partitioning here:

http://wiki.apache.org/couchdb/Partitioning_proposal

There's not a lot of actual implementation details yet since those
still need to be worked through and I'm planning to concentrate on the
prerequisite Erlang API first. Feel free to edit as needed.

Ben

Re: CouchDB and clustering

Posted by David Van Couvering <da...@gmail.com>.
Isn't node failure core to the problem of partitioning because your  
partitioning of data will have to change as the cluster membership is  
changing, and data is going to have to migrate - right?

Anyway, I'll take a look at your Wiki and see if I can contribute in  
some way.  Thanks!

David

On Feb 26, 2009, at 2:41 PM, Ben Browning <be...@gmail.com> wrote:

> On Thu, Feb 26, 2009 at 5:16 PM, David Van Couvering
> <da...@gmail.com> wrote:
>> This us great!  Are you going to put some functional and design  
>> docs on the
>> Wiki?  This seems pretty important to get right and could save you  
>> a lot of
>> time getting feedback from the community on your overall approach.
>
>
> Yes, that sounds like a good idea. I'll find a place on the wiki to
> document my thoughts as well as the opinions of others expressed
> previously on the mailing list.
>
>
>> Just for example, a discussion of your hashing mechanism would be  
>> great, and
>> how you handle repartitioning on node failure, etc.
>
> Initially I'm just concentrating on partitioning the data. Gracefully
> handling node failures will be a step after that and I haven't put a
> lot of effort into that piece yet. Any ideas are welcome, and I know
> there are some threads that at least touched on that topic before.

Re: CouchDB and clustering

Posted by Ben Browning <be...@gmail.com>.
On Thu, Feb 26, 2009 at 5:16 PM, David Van Couvering
<da...@gmail.com> wrote:
> This us great!  Are you going to put some functional and design docs on the
> Wiki?  This seems pretty important to get right and could save you a lot of
> time getting feedback from the community on your overall approach.


Yes, that sounds like a good idea. I'll find a place on the wiki to
document my thoughts as well as the opinions of others expressed
previously on the mailing list.


> Just for example, a discussion of your hashing mechanism would be great, and
> how you handle repartitioning on node failure, etc.

Initially I'm just concentrating on partitioning the data. Gracefully
handling node failures will be a step after that and I haven't put a
lot of effort into that piece yet. Any ideas are welcome, and I know
there are some threads that at least touched on that topic before.

Re: CouchDB and clustering

Posted by David Van Couvering <da...@gmail.com>.
This us great!  Are you going to put some functional and design docs  
on the Wiki?  This seems pretty important to get right and could save  
you a lot of time getting feedback from the community on your overall  
approach.

Just for example, a discussion of your hashing mechanism would be  
great, and how you handle repartitioning on node failure, etc.

Thanks!

David

------------------
David Van Couvering
http://davidvancouvering.blogspot.com

On Feb 26, 2009, at 2:04 PM, Ben Browning <be...@gmail.com> wrote:

> I'm actively interested in getting two of the things you mentioned,
> partitioning of data and a single view of the cluster, developed and
> working. I haven't said much about the subject since the thread Jan
> mentioned but I've been thinking a lot of things over in my head and
> have an attack plan.
>
> My first goal is to create an Erlang API which will probably be a
> subset of the current HTTP API. I've seen this requested before on the
> mailing list and believe this is a necessary first step to getting
> partitioning support. After that I plan to tackle the actual
> partitioning. I'll be doing all development in the following github
> fork:
>
> http://github.com/bbrowning/couchdb/tree/master
>
> There are no changes there yet but you should start seeing code pop up
> this week. At various points along the process I'll explicitly solicit
> feedback from the devs and the rest of the community since my hope is
> this code will eventually be used for partitioning in CouchDB proper.
>
> I can't speak for the priority of this in the community, but it's the
> only piece of Couch I'm currently working on and am planning to devote
> at least 10-20 hours a week to it.
>
> Ben
>
> On Thu, Feb 26, 2009 at 12:53 PM, Jan Lehnardt <ja...@apache.org> wrote:
>>
>>
>> That is about correct, see the current (slightly stale) thread
>> "Partitioned Clusters"* on the dev@ mailing list.
>>
>> * Started by Chris Anderson on February 20th.

Re: CouchDB and clustering

Posted by Jan Lehnardt <ja...@apache.org>.
On 27 Feb 2009, at 11:27, Ben Browning wrote:

> On Thu, Feb 26, 2009 at 5:12 PM, Jan Lehnardt <ja...@apache.org> wrote:
>> your planned commitment sounds terrific! May I suggest (again :)
>> to move this to dev@ (CC'd this time) for the benefit of the right
>> audience and coordination of efforts?
>>
>
> Yes, this belongs on dev@. Ever since Chris CC'd dev@ earlier in this
> thread Gmail has been following the conversation in both dev@ and
> user@ for me but I have to remember not all mail clients work this
> way.

Just for clarification, my mail was sent before Chris's but got  
delayed for
some reason. Hence the reality mismatch :)

Cheers
Jan
--





Re: CouchDB and clustering

Posted by Ben Browning <be...@gmail.com>.
On Thu, Feb 26, 2009 at 5:12 PM, Jan Lehnardt <ja...@apache.org> wrote:
> your planned commitment sounds terrific! May I suggest (again :)
> to move this to dev@ (CC'd this time) for the benefit of the right
> audience and coordination of efforts?
>

Yes, this belongs on dev@. Ever since Chris CC'd dev@ earlier in this
thread Gmail has been following the conversation in both dev@ and
user@ for me but I have to remember not all mail clients work this
way.

Re: CouchDB and clustering

Posted by Jan Lehnardt <ja...@apache.org>.
Hi Ben,

your planned commitment sounds terrific! May I suggest (again :)
to move this to dev@ (CC'd this time) for the benefit of the right
audience and coordination of efforts?

Cheers
Jan
--


On 26 Feb 2009, at 23:04, Ben Browning wrote:

> I'm actively interested in getting two of the things you mentioned,
> partitioning of data and a single view of the cluster, developed and
> working. I haven't said much about the subject since the thread Jan
> mentioned but I've been thinking a lot of things over in my head and
> have an attack plan.
>
> My first goal is to create an Erlang API which will probably be a
> subset of the current HTTP API. I've seen this requested before on the
> mailing list and believe this is a necessary first step to getting
> partitioning support. After that I plan to tackle the actual
> partitioning. I'll be doing all development in the following github
> fork:
>
> http://github.com/bbrowning/couchdb/tree/master
>
> There are no changes there yet but you should start seeing code pop up
> this week. At various points along the process I'll explicitly solicit
> feedback from the devs and the rest of the community since my hope is
> this code will eventually be used for partitioning in CouchDB proper.
>
> I can't speak for the priority of this in the community, but it's the
> only piece of Couch I'm currently working on and am planning to devote
> at least 10-20 hours a week to it.
>
> Ben
>
> On Thu, Feb 26, 2009 at 12:53 PM, Jan Lehnardt <ja...@apache.org> wrote:
>>
>>
>> That is about correct, see the current (slightly stale) thread
>> "Partitioned Clusters"* on the dev@ mailing list.
>>
>> * Started by Chris Anderson on February 20th.
>


Re: CouchDB and clustering

Posted by Jan Lehnardt <ja...@apache.org>.
Hi Ben,

your planned commitment sounds terrific! May I suggest (again :)
to move this to dev@ (CC'd this time) for the benefit of the right
audience and coordination of efforts?

Cheers
Jan
--


On 26 Feb 2009, at 23:04, Ben Browning wrote:

> I'm actively interested in getting two of the things you mentioned,
> partitioning of data and a single view of the cluster, developed and
> working. I haven't said much about the subject since the thread Jan
> mentioned but I've been thinking a lot of things over in my head and
> have an attack plan.
>
> My first goal is to create an Erlang API which will probably be a
> subset of the current HTTP API. I've seen this requested before on the
> mailing list and believe this is a necessary first step to getting
> partitioning support. After that I plan to tackle the actual
> partitioning. I'll be doing all development in the following github
> fork:
>
> http://github.com/bbrowning/couchdb/tree/master
>
> There are no changes there yet but you should start seeing code pop up
> this week. At various points along the process I'll explicitly solicit
> feedback from the devs and the rest of the community since my hope is
> this code will eventually be used for partitioning in CouchDB proper.
>
> I can't speak for the priority of this in the community, but it's the
> only piece of Couch I'm currently working on and am planning to devote
> at least 10-20 hours a week to it.
>
> Ben
>
> On Thu, Feb 26, 2009 at 12:53 PM, Jan Lehnardt <ja...@apache.org> wrote:
>>
>>
>> That is about correct, see the current (slightly stale) thread
>> "Partitioned Clusters"* on the dev@ mailing list.
>>
>> * Started by Chris Anderson on February 20th.
>


Re: CouchDB and clustering

Posted by Ben Browning <be...@gmail.com>.
I'm actively interested in getting two of the things you mentioned,
partitioning of data and a single view of the cluster, developed and
working. I haven't said much about the subject since the thread Jan
mentioned but I've been thinking a lot of things over in my head and
have an attack plan.

My first goal is to create an Erlang API which will probably be a
subset of the current HTTP API. I've seen this requested before on the
mailing list and believe this is a necessary first step to getting
partitioning support. After that I plan to tackle the actual
partitioning. I'll be doing all development in the following github
fork:

http://github.com/bbrowning/couchdb/tree/master

There are no changes there yet but you should start seeing code pop up
this week. At various points along the process I'll explicitly solicit
feedback from the devs and the rest of the community since my hope is
this code will eventually be used for partitioning in CouchDB proper.

I can't speak for the priority of this in the community, but it's the
only piece of Couch I'm currently working on and am planning to devote
at least 10-20 hours a week to it.

Ben

On Thu, Feb 26, 2009 at 12:53 PM, Jan Lehnardt <ja...@apache.org> wrote:
>
>
> That is about correct, see the current (slightly stale) thread
> "Partitioned Clusters"* on the dev@ mailing list.
>
> * Started by Chris Anderson on February 20th.

Re: CouchDB and clustering

Posted by Jan Lehnardt <ja...@apache.org>.
On 26 Feb 2009, at 18:48, David Van Couvering wrote:
>
> Is that about right?

That is about correct, see the current (slightly stale) thread
"Partitioned Clusters"* on the dev@ mailing list.

* Started by Chris Anderson on February 20th.

Cheers
Jan
--


Re: What is CouchDB? (was: Re: [user] CouchDB and clustering)

Posted by Jan Lehnardt <ja...@apache.org>.
On 27 Feb 2009, at 11:08, Wout Mertens wrote:

> Resending with a different subject because I think this is the best  
> summary of CouchDB I've seen so far. +1 Internets to David.

I'd only object on the read-mostly. Write-mostly works pretty well, too.
But yeah, maybe we should steal some of that for couchdb.apache.org.

Cheers
Jan
--




> Wout.
>
> On Feb 26, 2009, at 6:48 PM, David Van Couvering wrote:
>
>> The reason I ask is, it appears the advantages of CouchDB *right  
>> now* is
>> about a highly robust, flexible and high throughput read-mostly data
>> store.   The other advantage is that the API is easy, approachable,  
>> and
>> web-ready, unlike many stores out there.  I love the pre-compiled  
>> views that
>> allow you to have highly efficient slice-and-dice views into your
>> documents.  I also think it's an excellent base for a peer-to-peer
>> replicated data store, allowing people to collaborate over the  
>> Internet
>> without requiring a centralized server (although I am concerned  
>> about how
>> easy it is for a Mere Mortal to install a CouchDB-based app on their
>> computer).
>
>


What is CouchDB? (was: Re: [user] CouchDB and clustering)

Posted by Wout Mertens <wm...@cisco.com>.
Resending with a different subject because I think this is the best  
summary of CouchDB I've seen so far. +1 Internets to David.

Wout.

On Feb 26, 2009, at 6:48 PM, David Van Couvering wrote:

> The reason I ask is, it appears the advantages of CouchDB *right  
> now* is
> about a highly robust, flexible and high throughput read-mostly data
> store.   The other advantage is that the API is easy, approachable,  
> and
> web-ready, unlike many stores out there.  I love the pre-compiled  
> views that
> allow you to have highly efficient slice-and-dice views into your
> documents.  I also think it's an excellent base for a peer-to-peer
> replicated data store, allowing people to collaborate over the  
> Internet
> without requiring a centralized server (although I am concerned  
> about how
> easy it is for a Mere Mortal to install a CouchDB-based app on their
> computer).