You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Joey Samonte <cs...@hotmail.com> on 2016/08/24 11:36:57 UTC

Adding a node to cluster

Good day,
 
Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
 
Regards,
Joey 
 		 	   		  

Re: Adding a node to cluster

Posted by Sebastian Rothbucher <se...@googlemail.com>.
Hi,

as always (esp. with security): it depends and you should have a thorough
plan about how 2 secure. There is really no serious general and binary
answer to the question. From a functional point of view, the nodes in a
cluster need to talk to each other over Erlang RPC and calling applications
need to be able to reach the HTTP endpoint.

Best
    Sebastian


On Mon, Sep 5, 2016 at 11:41 PM, Joey Samonte <cs...@hotmail.com>
wrote:

> Thanks. Does this mean I need to add ports 4369 and 5984 to the firewall
> exceptions?
>
> > Subject: Re: Adding a node to cluster
> > From: sebastianrothbucher@googlemail.com
> > Date: Mon, 5 Sep 2016 23:08:04 +0200
> > To: dev@couchdb.apache.org
> >
> > Hi,
> >
> > clustering and replication are indeed two (very) separate things - and
> you won't get a Cluster by setting up replication. Again: treat the two as
> separate. Clustering turns several shards (on several nodes) into one
> database (from an user/caller perspective) while replication happens
> _between_ databases.
> > Consequently, technical underpinnings differ as well, as Bob explained
> below.
> >
> > Hope that gets things in perspective a little...
> >
> > Best
> >   Sebastian
> >
> > Von meinem iPhone gesendet
> >
> > > Am 05.09.2016 um 22:47 schrieb Joey Samonte <
> csharpdeveloper@hotmail.com>:
> > >
> > > Does this mean that setting up replication is separate from setting up
> clustering?
> > >
> > > Does replication needs to be bi-directional between nodes?
> > >
> > >> From: rnewson@apache.org
> > >> Subject: Re: Adding a node to cluster
> > >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> > >> To: dev@couchdb.apache.org
> > >>
> > >> Ok, seems I've confused you.
> > >>
> > >> Couchdb replication occurs over http or https, as you know. The nodes
> in a couchdb 2.0 cluster do not communicate with each other over http. They
> use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in
> the Erlang faq and is fairly simple to set up in newer Erlang releases.
> > >>
> > >> I feel I owe an example of 2.0 cluster that exclusively uses TLS for
> all communications.
> > >>
> > >> Sent from my iPhone
> > >>
> > >>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com>
> wrote:
> > >>>
> > >>> What if we remove the reverse proxy and just set up the CouchDB
> nodes to allow only SSL connections, port 6984? https://wiki.apache.org/
> couchdb/How_to_enable_SSL
> > >>>
> > >>>> Subject: Re: Adding a node to cluster
> > >>>> From: rnewson@apache.org
> > >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> > >>>> To: dev@couchdb.apache.org
> > >>>>
> > >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be
> able to communicate with erlang rpc (service discovery over port 4369 and
> then whatever port the node is running ong).
> > >>>>
> > >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <
> csharpdeveloper@hotmail.com> wrote:
> > >>>>>
> > >>>>> Good day,
> > >>>>>
> > >>>>> Is it possible to add a node to a cluster from Fauxton if the
> remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > >>>>>
> > >>>>> Regards,
> > >>>>> Joey
> > >
>
>

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
Thanks. Does this mean I need to add ports 4369 and 5984 to the firewall exceptions?
 
> Subject: Re: Adding a node to cluster
> From: sebastianrothbucher@googlemail.com
> Date: Mon, 5 Sep 2016 23:08:04 +0200
> To: dev@couchdb.apache.org
> 
> Hi, 
> 
> clustering and replication are indeed two (very) separate things - and you won't get a Cluster by setting up replication. Again: treat the two as separate. Clustering turns several shards (on several nodes) into one database (from an user/caller perspective) while replication happens _between_ databases. 
> Consequently, technical underpinnings differ as well, as Bob explained below.
> 
> Hope that gets things in perspective a little...
> 
> Best
>   Sebastian
> 
> Von meinem iPhone gesendet
> 
> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <cs...@hotmail.com>:
> > 
> > Does this mean that setting up replication is separate from setting up clustering? 
> > 
> > Does replication needs to be bi-directional between nodes?
> > 
> >> From: rnewson@apache.org
> >> Subject: Re: Adding a node to cluster
> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> >> To: dev@couchdb.apache.org
> >> 
> >> Ok, seems I've confused you. 
> >> 
> >> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases. 
> >> 
> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications. 
> >> 
> >> Sent from my iPhone
> >> 
> >>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> >>> 
> >>> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> >>> 
> >>>> Subject: Re: Adding a node to cluster
> >>>> From: rnewson@apache.org
> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> >>>> To: dev@couchdb.apache.org
> >>>> 
> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> >>>> 
> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> >>>>> 
> >>>>> Good day,
> >>>>> 
> >>>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> >>>>> 
> >>>>> Regards,
> >>>>> Joey
> >                         
 		 	   		  

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
This is confusing. So how does a database that spans multiple nodes gets replicated?
 
> From: wickedgrey@gmail.com
> Date: Tue, 6 Sep 2016 15:55:00 -0700
> Subject: Re: Adding a node to cluster
> To: dev@couchdb.apache.org
> 
> Nodes in the cluster do not replicate to one another.
> 
> Replication takes place between databases. A single node isn't a
> database; a clustered database spans multiple nodes.
> 
> Each node has a black-box lump of data that happens to have a fraction
> of a database inside, but that's an implementation detail. It's the
> wrong level of abstraction to work with.
> 
> On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> <cs...@hotmail.com> wrote:
> > If you have two nodes in the cluster, the replication should be two-way between the nodes?
> > What if there are three nodes? How should the replication be setup between them?
> >
> >> Subject: Re: Adding a node to cluster
> >> From: sebastianrothbucher@googlemail.com
> >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> >> To: dev@couchdb.apache.org
> >>
> >> Hi,
> >>
> >> clustering and replication are indeed two (very) separate things - and you won't get a Cluster by setting up replication. Again: treat the two as separate. Clustering turns several shards (on several nodes) into one database (from an user/caller perspective) while replication happens _between_ databases.
> >> Consequently, technical underpinnings differ as well, as Bob explained below.
> >>
> >> Hope that gets things in perspective a little...
> >>
> >> Best
> >>   Sebastian
> >>
> >> Von meinem iPhone gesendet
> >>
> >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <cs...@hotmail.com>:
> >> >
> >> > Does this mean that setting up replication is separate from setting up clustering?
> >> >
> >> > Does replication needs to be bi-directional between nodes?
> >> >
> >> >> From: rnewson@apache.org
> >> >> Subject: Re: Adding a node to cluster
> >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> >> >> To: dev@couchdb.apache.org
> >> >>
> >> >> Ok, seems I've confused you.
> >> >>
> >> >> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases.
> >> >>
> >> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications.
> >> >>
> >> >> Sent from my iPhone
> >> >>
> >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> >> >>>
> >> >>> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> >> >>>
> >> >>>> Subject: Re: Adding a node to cluster
> >> >>>> From: rnewson@apache.org
> >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> >> >>>> To: dev@couchdb.apache.org
> >> >>>>
> >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> >> >>>>
> >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> >> >>>>>
> >> >>>>> Good day,
> >> >>>>>
> >> >>>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> >> >>>>>
> >> >>>>> Regards,
> >> >>>>> Joey
> >> >
> >
 		 	   		  

Re: Adding a node to cluster

Posted by Russell Branca <ch...@apache.org>.
Good catch, it should have included the db ;-)


-Russell

On Tuesday, September 6, 2016, Joey Samonte <cs...@hotmail.com>
wrote:

> In the example you gave for the replication, why is the target "
> test2.bar.com", and not "test2.bar.com/my_db"?
>
> > From: chewbranca@apache.org <javascript:;>
> > Date: Tue, 6 Sep 2016 19:34:43 -0700
> > Subject: Re: Adding a node to cluster
> > To: dev@couchdb.apache.org <javascript:;>
> >
> > CouchDB "replication" uses the HTTP API to replicate a database, whereas
> > the somewhat confusingly named "internal replication" is used within the
> > cluster itself as a way to synchronize state between the shard replicas.
> > The protocol for internal replication uses the Erlang distribution
> protocol
> > to communicate between nodes. So if your cluster is a connected set of
> > Erlang nodes then they will be able to synchronize database/shard state
> > amongst themselves.
> >
> >
> > As an example, consider a single node 1.x CouchDB server at
> > test1.foo.com:5984 where you want to replicate to a CouchDB 2.0 cluster
> at
> > test2.bar.com that has three db nodes and a load balancer, with the load
> > balancer actually having the test2.bar.com address. You communicate with
> > the cluster by way of the load balancer which will distribute requests to
> > all the nodes. The details of the cluster should be mostly transparent at
> > the HTTP layer, and so you can just do something like:
> >
> > curl -i -X POST test1.foo.com/_replicator -d '{"source":"
> test1.foo.com/my_db",
> > "target":"test2.bar.com"}'
> >
> > This will replicate "my_db" from test1 to test2 using the HTTP protocol
> > like you would expect from CouchDB. Within the test2 cluster the nodes
> will
> > communicate amongst themselves using internal replication (non HTTP) to
> > ensure the data is fully synchronized between the shard replicas.
> >
> > Hopefully that clarifies things a bit.
> >
> >
> > -Russell
> >
> >
> >
> > On Tuesday, September 6, 2016, Joey Samonte <csharpdeveloper@hotmail.com
> <javascript:;>>
> > wrote:
> >
> > > I think I understand it. Hoping to find more documentation on it.
> > >
> > > > From: wickedgrey@gmail.com <javascript:;> <javascript:;>
> > > > Date: Tue, 6 Sep 2016 15:55:00 -0700
> > > > Subject: Re: Adding a node to cluster
> > > > To: dev@couchdb.apache.org <javascript:;> <javascript:;>
> > > >
> > > > Nodes in the cluster do not replicate to one another.
> > > >
> > > > Replication takes place between databases. A single node isn't a
> > > > database; a clustered database spans multiple nodes.
> > > >
> > > > Each node has a black-box lump of data that happens to have a
> fraction
> > > > of a database inside, but that's an implementation detail. It's the
> > > > wrong level of abstraction to work with.
> > > >
> > > > On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> > > > <csharpdeveloper@hotmail.com <javascript:;> <javascript:;>> wrote:
> > > > > If you have two nodes in the cluster, the replication should be
> > > two-way between the nodes?
> > > > > What if there are three nodes? How should the replication be setup
> > > between them?
> > > > >
> > > > >> Subject: Re: Adding a node to cluster
> > > > >> From: sebastianrothbucher@googlemail.com <javascript:;>
> <javascript:;>
> > > > >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> > > > >> To: dev@couchdb.apache.org <javascript:;> <javascript:;>
> > > > >>
> > > > >> Hi,
> > > > >>
> > > > >> clustering and replication are indeed two (very) separate things -
> > > and you won't get a Cluster by setting up replication. Again: treat
> the two
> > > as separate. Clustering turns several shards (on several nodes) into
> one
> > > database (from an user/caller perspective) while replication happens
> > > _between_ databases.
> > > > >> Consequently, technical underpinnings differ as well, as Bob
> > > explained below.
> > > > >>
> > > > >> Hope that gets things in perspective a little...
> > > > >>
> > > > >> Best
> > > > >>   Sebastian
> > > > >>
> > > > >> Von meinem iPhone gesendet
> > > > >>
> > > > >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <
> > > csharpdeveloper@hotmail.com <javascript:;> <javascript:;>>:
> > > > >> >
> > > > >> > Does this mean that setting up replication is separate from
> setting
> > > up clustering?
> > > > >> >
> > > > >> > Does replication needs to be bi-directional between nodes?
> > > > >> >
> > > > >> >> From: rnewson@apache.org <javascript:;> <javascript:;>
> > > > >> >> Subject: Re: Adding a node to cluster
> > > > >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> > > > >> >> To: dev@couchdb.apache.org <javascript:;> <javascript:;>
> > > > >> >>
> > > > >> >> Ok, seems I've confused you.
> > > > >> >>
> > > > >> >> Couchdb replication occurs over http or https, as you know. The
> > > nodes in a couchdb 2.0 cluster do not communicate with each other over
> > > http. They use Erlang rpc. Erlang rpc can be configured for TLS
> > > encryption.  It's in the Erlang faq and is fairly simple to set up in
> newer
> > > Erlang releases.
> > > > >> >>
> > > > >> >> I feel I owe an example of 2.0 cluster that exclusively uses
> TLS
> > > for all communications.
> > > > >> >>
> > > > >> >> Sent from my iPhone
> > > > >> >>
> > > > >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <
> > > csharpdeveloper@hotmail.com <javascript:;> <javascript:;>> wrote:
> > > > >> >>>
> > > > >> >>> What if we remove the reverse proxy and just set up the
> CouchDB
> > > nodes to allow only SSL connections, port 6984?
> https://wiki.apache.org/
> > > couchdb/How_to_enable_SSL
> > > > >> >>>
> > > > >> >>>> Subject: Re: Adding a node to cluster
> > > > >> >>>> From: rnewson@apache.org <javascript:;> <javascript:;>
> > > > >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> > > > >> >>>> To: dev@couchdb.apache.org <javascript:;> <javascript:;>
> > > > >> >>>>
> > > > >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to
> be
> > > able to communicate with erlang rpc (service discovery over port 4369
> and
> > > then whatever port the node is running ong).
> > > > >> >>>>
> > > > >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <
> > > csharpdeveloper@hotmail.com <javascript:;> <javascript:;>> wrote:
> > > > >> >>>>>
> > > > >> >>>>> Good day,
> > > > >> >>>>>
> > > > >> >>>>> Is it possible to add a node to a cluster from Fauxton if
> the
> > > remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > > > >> >>>>>
> > > > >> >>>>> Regards,
> > > > >> >>>>> Joey
> > > > >> >
> > > > >
> > >
>

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
In the example you gave for the replication, why is the target "test2.bar.com", and not "test2.bar.com/my_db"?
 
> From: chewbranca@apache.org
> Date: Tue, 6 Sep 2016 19:34:43 -0700
> Subject: Re: Adding a node to cluster
> To: dev@couchdb.apache.org
> 
> CouchDB "replication" uses the HTTP API to replicate a database, whereas
> the somewhat confusingly named "internal replication" is used within the
> cluster itself as a way to synchronize state between the shard replicas.
> The protocol for internal replication uses the Erlang distribution protocol
> to communicate between nodes. So if your cluster is a connected set of
> Erlang nodes then they will be able to synchronize database/shard state
> amongst themselves.
> 
> 
> As an example, consider a single node 1.x CouchDB server at
> test1.foo.com:5984 where you want to replicate to a CouchDB 2.0 cluster at
> test2.bar.com that has three db nodes and a load balancer, with the load
> balancer actually having the test2.bar.com address. You communicate with
> the cluster by way of the load balancer which will distribute requests to
> all the nodes. The details of the cluster should be mostly transparent at
> the HTTP layer, and so you can just do something like:
> 
> curl -i -X POST test1.foo.com/_replicator -d '{"source":"test1.foo.com/my_db",
> "target":"test2.bar.com"}'
> 
> This will replicate "my_db" from test1 to test2 using the HTTP protocol
> like you would expect from CouchDB. Within the test2 cluster the nodes will
> communicate amongst themselves using internal replication (non HTTP) to
> ensure the data is fully synchronized between the shard replicas.
> 
> Hopefully that clarifies things a bit.
> 
> 
> -Russell
> 
> 
> 
> On Tuesday, September 6, 2016, Joey Samonte <cs...@hotmail.com>
> wrote:
> 
> > I think I understand it. Hoping to find more documentation on it.
> >
> > > From: wickedgrey@gmail.com <javascript:;>
> > > Date: Tue, 6 Sep 2016 15:55:00 -0700
> > > Subject: Re: Adding a node to cluster
> > > To: dev@couchdb.apache.org <javascript:;>
> > >
> > > Nodes in the cluster do not replicate to one another.
> > >
> > > Replication takes place between databases. A single node isn't a
> > > database; a clustered database spans multiple nodes.
> > >
> > > Each node has a black-box lump of data that happens to have a fraction
> > > of a database inside, but that's an implementation detail. It's the
> > > wrong level of abstraction to work with.
> > >
> > > On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> > > <csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > > If you have two nodes in the cluster, the replication should be
> > two-way between the nodes?
> > > > What if there are three nodes? How should the replication be setup
> > between them?
> > > >
> > > >> Subject: Re: Adding a node to cluster
> > > >> From: sebastianrothbucher@googlemail.com <javascript:;>
> > > >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> > > >> To: dev@couchdb.apache.org <javascript:;>
> > > >>
> > > >> Hi,
> > > >>
> > > >> clustering and replication are indeed two (very) separate things -
> > and you won't get a Cluster by setting up replication. Again: treat the two
> > as separate. Clustering turns several shards (on several nodes) into one
> > database (from an user/caller perspective) while replication happens
> > _between_ databases.
> > > >> Consequently, technical underpinnings differ as well, as Bob
> > explained below.
> > > >>
> > > >> Hope that gets things in perspective a little...
> > > >>
> > > >> Best
> > > >>   Sebastian
> > > >>
> > > >> Von meinem iPhone gesendet
> > > >>
> > > >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>>:
> > > >> >
> > > >> > Does this mean that setting up replication is separate from setting
> > up clustering?
> > > >> >
> > > >> > Does replication needs to be bi-directional between nodes?
> > > >> >
> > > >> >> From: rnewson@apache.org <javascript:;>
> > > >> >> Subject: Re: Adding a node to cluster
> > > >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> > > >> >> To: dev@couchdb.apache.org <javascript:;>
> > > >> >>
> > > >> >> Ok, seems I've confused you.
> > > >> >>
> > > >> >> Couchdb replication occurs over http or https, as you know. The
> > nodes in a couchdb 2.0 cluster do not communicate with each other over
> > http. They use Erlang rpc. Erlang rpc can be configured for TLS
> > encryption.  It's in the Erlang faq and is fairly simple to set up in newer
> > Erlang releases.
> > > >> >>
> > > >> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS
> > for all communications.
> > > >> >>
> > > >> >> Sent from my iPhone
> > > >> >>
> > > >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > >> >>>
> > > >> >>> What if we remove the reverse proxy and just set up the CouchDB
> > nodes to allow only SSL connections, port 6984? https://wiki.apache.org/
> > couchdb/How_to_enable_SSL
> > > >> >>>
> > > >> >>>> Subject: Re: Adding a node to cluster
> > > >> >>>> From: rnewson@apache.org <javascript:;>
> > > >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> > > >> >>>> To: dev@couchdb.apache.org <javascript:;>
> > > >> >>>>
> > > >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be
> > able to communicate with erlang rpc (service discovery over port 4369 and
> > then whatever port the node is running ong).
> > > >> >>>>
> > > >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > >> >>>>>
> > > >> >>>>> Good day,
> > > >> >>>>>
> > > >> >>>>> Is it possible to add a node to a cluster from Fauxton if the
> > remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > > >> >>>>>
> > > >> >>>>> Regards,
> > > >> >>>>> Joey
> > > >> >
> > > >
> >
 		 	   		  

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
Thanks for this. It clarified things for me. :) Will try it if it works in my case.
 
> From: chewbranca@apache.org
> Date: Tue, 6 Sep 2016 19:34:43 -0700
> Subject: Re: Adding a node to cluster
> To: dev@couchdb.apache.org
> 
> CouchDB "replication" uses the HTTP API to replicate a database, whereas
> the somewhat confusingly named "internal replication" is used within the
> cluster itself as a way to synchronize state between the shard replicas.
> The protocol for internal replication uses the Erlang distribution protocol
> to communicate between nodes. So if your cluster is a connected set of
> Erlang nodes then they will be able to synchronize database/shard state
> amongst themselves.
> 
> 
> As an example, consider a single node 1.x CouchDB server at
> test1.foo.com:5984 where you want to replicate to a CouchDB 2.0 cluster at
> test2.bar.com that has three db nodes and a load balancer, with the load
> balancer actually having the test2.bar.com address. You communicate with
> the cluster by way of the load balancer which will distribute requests to
> all the nodes. The details of the cluster should be mostly transparent at
> the HTTP layer, and so you can just do something like:
> 
> curl -i -X POST test1.foo.com/_replicator -d '{"source":"test1.foo.com/my_db",
> "target":"test2.bar.com"}'
> 
> This will replicate "my_db" from test1 to test2 using the HTTP protocol
> like you would expect from CouchDB. Within the test2 cluster the nodes will
> communicate amongst themselves using internal replication (non HTTP) to
> ensure the data is fully synchronized between the shard replicas.
> 
> Hopefully that clarifies things a bit.
> 
> 
> -Russell
> 
> 
> 
> On Tuesday, September 6, 2016, Joey Samonte <cs...@hotmail.com>
> wrote:
> 
> > I think I understand it. Hoping to find more documentation on it.
> >
> > > From: wickedgrey@gmail.com <javascript:;>
> > > Date: Tue, 6 Sep 2016 15:55:00 -0700
> > > Subject: Re: Adding a node to cluster
> > > To: dev@couchdb.apache.org <javascript:;>
> > >
> > > Nodes in the cluster do not replicate to one another.
> > >
> > > Replication takes place between databases. A single node isn't a
> > > database; a clustered database spans multiple nodes.
> > >
> > > Each node has a black-box lump of data that happens to have a fraction
> > > of a database inside, but that's an implementation detail. It's the
> > > wrong level of abstraction to work with.
> > >
> > > On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> > > <csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > > If you have two nodes in the cluster, the replication should be
> > two-way between the nodes?
> > > > What if there are three nodes? How should the replication be setup
> > between them?
> > > >
> > > >> Subject: Re: Adding a node to cluster
> > > >> From: sebastianrothbucher@googlemail.com <javascript:;>
> > > >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> > > >> To: dev@couchdb.apache.org <javascript:;>
> > > >>
> > > >> Hi,
> > > >>
> > > >> clustering and replication are indeed two (very) separate things -
> > and you won't get a Cluster by setting up replication. Again: treat the two
> > as separate. Clustering turns several shards (on several nodes) into one
> > database (from an user/caller perspective) while replication happens
> > _between_ databases.
> > > >> Consequently, technical underpinnings differ as well, as Bob
> > explained below.
> > > >>
> > > >> Hope that gets things in perspective a little...
> > > >>
> > > >> Best
> > > >>   Sebastian
> > > >>
> > > >> Von meinem iPhone gesendet
> > > >>
> > > >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>>:
> > > >> >
> > > >> > Does this mean that setting up replication is separate from setting
> > up clustering?
> > > >> >
> > > >> > Does replication needs to be bi-directional between nodes?
> > > >> >
> > > >> >> From: rnewson@apache.org <javascript:;>
> > > >> >> Subject: Re: Adding a node to cluster
> > > >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> > > >> >> To: dev@couchdb.apache.org <javascript:;>
> > > >> >>
> > > >> >> Ok, seems I've confused you.
> > > >> >>
> > > >> >> Couchdb replication occurs over http or https, as you know. The
> > nodes in a couchdb 2.0 cluster do not communicate with each other over
> > http. They use Erlang rpc. Erlang rpc can be configured for TLS
> > encryption.  It's in the Erlang faq and is fairly simple to set up in newer
> > Erlang releases.
> > > >> >>
> > > >> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS
> > for all communications.
> > > >> >>
> > > >> >> Sent from my iPhone
> > > >> >>
> > > >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > >> >>>
> > > >> >>> What if we remove the reverse proxy and just set up the CouchDB
> > nodes to allow only SSL connections, port 6984? https://wiki.apache.org/
> > couchdb/How_to_enable_SSL
> > > >> >>>
> > > >> >>>> Subject: Re: Adding a node to cluster
> > > >> >>>> From: rnewson@apache.org <javascript:;>
> > > >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> > > >> >>>> To: dev@couchdb.apache.org <javascript:;>
> > > >> >>>>
> > > >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be
> > able to communicate with erlang rpc (service discovery over port 4369 and
> > then whatever port the node is running ong).
> > > >> >>>>
> > > >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > >> >>>>>
> > > >> >>>>> Good day,
> > > >> >>>>>
> > > >> >>>>> Is it possible to add a node to a cluster from Fauxton if the
> > remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > > >> >>>>>
> > > >> >>>>> Regards,
> > > >> >>>>> Joey
> > > >> >
> > > >
> >
 		 	   		  

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
I have added a node 2 to a cluster. From node 1, looking at _membership shows this:
 
{"all_nodes":["couchdb@localhost"],"cluster_nodes":["couchdb@xx.xx.xx.xx","couchdb@localhost"]}

But looking at _membership at node 2, it shows differently:
 
{"all_nodes":["couchdb@localhost"],"cluster_nodes":["couchdb@localhost"]}
 
 
> From: chewbranca@apache.org
> Date: Tue, 6 Sep 2016 19:34:43 -0700
> Subject: Re: Adding a node to cluster
> To: dev@couchdb.apache.org
> 
> CouchDB "replication" uses the HTTP API to replicate a database, whereas
> the somewhat confusingly named "internal replication" is used within the
> cluster itself as a way to synchronize state between the shard replicas.
> The protocol for internal replication uses the Erlang distribution protocol
> to communicate between nodes. So if your cluster is a connected set of
> Erlang nodes then they will be able to synchronize database/shard state
> amongst themselves.
> 
> 
> As an example, consider a single node 1.x CouchDB server at
> test1.foo.com:5984 where you want to replicate to a CouchDB 2.0 cluster at
> test2.bar.com that has three db nodes and a load balancer, with the load
> balancer actually having the test2.bar.com address. You communicate with
> the cluster by way of the load balancer which will distribute requests to
> all the nodes. The details of the cluster should be mostly transparent at
> the HTTP layer, and so you can just do something like:
> 
> curl -i -X POST test1.foo.com/_replicator -d '{"source":"test1.foo.com/my_db",
> "target":"test2.bar.com"}'
> 
> This will replicate "my_db" from test1 to test2 using the HTTP protocol
> like you would expect from CouchDB. Within the test2 cluster the nodes will
> communicate amongst themselves using internal replication (non HTTP) to
> ensure the data is fully synchronized between the shard replicas.
> 
> Hopefully that clarifies things a bit.
> 
> 
> -Russell
> 
> 
> 
> On Tuesday, September 6, 2016, Joey Samonte <cs...@hotmail.com>
> wrote:
> 
> > I think I understand it. Hoping to find more documentation on it.
> >
> > > From: wickedgrey@gmail.com <javascript:;>
> > > Date: Tue, 6 Sep 2016 15:55:00 -0700
> > > Subject: Re: Adding a node to cluster
> > > To: dev@couchdb.apache.org <javascript:;>
> > >
> > > Nodes in the cluster do not replicate to one another.
> > >
> > > Replication takes place between databases. A single node isn't a
> > > database; a clustered database spans multiple nodes.
> > >
> > > Each node has a black-box lump of data that happens to have a fraction
> > > of a database inside, but that's an implementation detail. It's the
> > > wrong level of abstraction to work with.
> > >
> > > On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> > > <csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > > If you have two nodes in the cluster, the replication should be
> > two-way between the nodes?
> > > > What if there are three nodes? How should the replication be setup
> > between them?
> > > >
> > > >> Subject: Re: Adding a node to cluster
> > > >> From: sebastianrothbucher@googlemail.com <javascript:;>
> > > >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> > > >> To: dev@couchdb.apache.org <javascript:;>
> > > >>
> > > >> Hi,
> > > >>
> > > >> clustering and replication are indeed two (very) separate things -
> > and you won't get a Cluster by setting up replication. Again: treat the two
> > as separate. Clustering turns several shards (on several nodes) into one
> > database (from an user/caller perspective) while replication happens
> > _between_ databases.
> > > >> Consequently, technical underpinnings differ as well, as Bob
> > explained below.
> > > >>
> > > >> Hope that gets things in perspective a little...
> > > >>
> > > >> Best
> > > >>   Sebastian
> > > >>
> > > >> Von meinem iPhone gesendet
> > > >>
> > > >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>>:
> > > >> >
> > > >> > Does this mean that setting up replication is separate from setting
> > up clustering?
> > > >> >
> > > >> > Does replication needs to be bi-directional between nodes?
> > > >> >
> > > >> >> From: rnewson@apache.org <javascript:;>
> > > >> >> Subject: Re: Adding a node to cluster
> > > >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> > > >> >> To: dev@couchdb.apache.org <javascript:;>
> > > >> >>
> > > >> >> Ok, seems I've confused you.
> > > >> >>
> > > >> >> Couchdb replication occurs over http or https, as you know. The
> > nodes in a couchdb 2.0 cluster do not communicate with each other over
> > http. They use Erlang rpc. Erlang rpc can be configured for TLS
> > encryption.  It's in the Erlang faq and is fairly simple to set up in newer
> > Erlang releases.
> > > >> >>
> > > >> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS
> > for all communications.
> > > >> >>
> > > >> >> Sent from my iPhone
> > > >> >>
> > > >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > >> >>>
> > > >> >>> What if we remove the reverse proxy and just set up the CouchDB
> > nodes to allow only SSL connections, port 6984? https://wiki.apache.org/
> > couchdb/How_to_enable_SSL
> > > >> >>>
> > > >> >>>> Subject: Re: Adding a node to cluster
> > > >> >>>> From: rnewson@apache.org <javascript:;>
> > > >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> > > >> >>>> To: dev@couchdb.apache.org <javascript:;>
> > > >> >>>>
> > > >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be
> > able to communicate with erlang rpc (service discovery over port 4369 and
> > then whatever port the node is running ong).
> > > >> >>>>
> > > >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <
> > csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > >> >>>>>
> > > >> >>>>> Good day,
> > > >> >>>>>
> > > >> >>>>> Is it possible to add a node to a cluster from Fauxton if the
> > remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > > >> >>>>>
> > > >> >>>>> Regards,
> > > >> >>>>> Joey
> > > >> >
> > > >
> >
 		 	   		  

Re: Adding a node to cluster

Posted by Russell Branca <ch...@apache.org>.
CouchDB "replication" uses the HTTP API to replicate a database, whereas
the somewhat confusingly named "internal replication" is used within the
cluster itself as a way to synchronize state between the shard replicas.
The protocol for internal replication uses the Erlang distribution protocol
to communicate between nodes. So if your cluster is a connected set of
Erlang nodes then they will be able to synchronize database/shard state
amongst themselves.


As an example, consider a single node 1.x CouchDB server at
test1.foo.com:5984 where you want to replicate to a CouchDB 2.0 cluster at
test2.bar.com that has three db nodes and a load balancer, with the load
balancer actually having the test2.bar.com address. You communicate with
the cluster by way of the load balancer which will distribute requests to
all the nodes. The details of the cluster should be mostly transparent at
the HTTP layer, and so you can just do something like:

curl -i -X POST test1.foo.com/_replicator -d '{"source":"test1.foo.com/my_db",
"target":"test2.bar.com"}'

This will replicate "my_db" from test1 to test2 using the HTTP protocol
like you would expect from CouchDB. Within the test2 cluster the nodes will
communicate amongst themselves using internal replication (non HTTP) to
ensure the data is fully synchronized between the shard replicas.

Hopefully that clarifies things a bit.


-Russell



On Tuesday, September 6, 2016, Joey Samonte <cs...@hotmail.com>
wrote:

> I think I understand it. Hoping to find more documentation on it.
>
> > From: wickedgrey@gmail.com <javascript:;>
> > Date: Tue, 6 Sep 2016 15:55:00 -0700
> > Subject: Re: Adding a node to cluster
> > To: dev@couchdb.apache.org <javascript:;>
> >
> > Nodes in the cluster do not replicate to one another.
> >
> > Replication takes place between databases. A single node isn't a
> > database; a clustered database spans multiple nodes.
> >
> > Each node has a black-box lump of data that happens to have a fraction
> > of a database inside, but that's an implementation detail. It's the
> > wrong level of abstraction to work with.
> >
> > On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> > <csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > > If you have two nodes in the cluster, the replication should be
> two-way between the nodes?
> > > What if there are three nodes? How should the replication be setup
> between them?
> > >
> > >> Subject: Re: Adding a node to cluster
> > >> From: sebastianrothbucher@googlemail.com <javascript:;>
> > >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> > >> To: dev@couchdb.apache.org <javascript:;>
> > >>
> > >> Hi,
> > >>
> > >> clustering and replication are indeed two (very) separate things -
> and you won't get a Cluster by setting up replication. Again: treat the two
> as separate. Clustering turns several shards (on several nodes) into one
> database (from an user/caller perspective) while replication happens
> _between_ databases.
> > >> Consequently, technical underpinnings differ as well, as Bob
> explained below.
> > >>
> > >> Hope that gets things in perspective a little...
> > >>
> > >> Best
> > >>   Sebastian
> > >>
> > >> Von meinem iPhone gesendet
> > >>
> > >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <
> csharpdeveloper@hotmail.com <javascript:;>>:
> > >> >
> > >> > Does this mean that setting up replication is separate from setting
> up clustering?
> > >> >
> > >> > Does replication needs to be bi-directional between nodes?
> > >> >
> > >> >> From: rnewson@apache.org <javascript:;>
> > >> >> Subject: Re: Adding a node to cluster
> > >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> > >> >> To: dev@couchdb.apache.org <javascript:;>
> > >> >>
> > >> >> Ok, seems I've confused you.
> > >> >>
> > >> >> Couchdb replication occurs over http or https, as you know. The
> nodes in a couchdb 2.0 cluster do not communicate with each other over
> http. They use Erlang rpc. Erlang rpc can be configured for TLS
> encryption.  It's in the Erlang faq and is fairly simple to set up in newer
> Erlang releases.
> > >> >>
> > >> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS
> for all communications.
> > >> >>
> > >> >> Sent from my iPhone
> > >> >>
> > >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <
> csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > >> >>>
> > >> >>> What if we remove the reverse proxy and just set up the CouchDB
> nodes to allow only SSL connections, port 6984? https://wiki.apache.org/
> couchdb/How_to_enable_SSL
> > >> >>>
> > >> >>>> Subject: Re: Adding a node to cluster
> > >> >>>> From: rnewson@apache.org <javascript:;>
> > >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> > >> >>>> To: dev@couchdb.apache.org <javascript:;>
> > >> >>>>
> > >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be
> able to communicate with erlang rpc (service discovery over port 4369 and
> then whatever port the node is running ong).
> > >> >>>>
> > >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <
> csharpdeveloper@hotmail.com <javascript:;>> wrote:
> > >> >>>>>
> > >> >>>>> Good day,
> > >> >>>>>
> > >> >>>>> Is it possible to add a node to a cluster from Fauxton if the
> remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > >> >>>>>
> > >> >>>>> Regards,
> > >> >>>>> Joey
> > >> >
> > >
>

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
I think I understand it. Hoping to find more documentation on it.
 
> From: wickedgrey@gmail.com
> Date: Tue, 6 Sep 2016 15:55:00 -0700
> Subject: Re: Adding a node to cluster
> To: dev@couchdb.apache.org
> 
> Nodes in the cluster do not replicate to one another.
> 
> Replication takes place between databases. A single node isn't a
> database; a clustered database spans multiple nodes.
> 
> Each node has a black-box lump of data that happens to have a fraction
> of a database inside, but that's an implementation detail. It's the
> wrong level of abstraction to work with.
> 
> On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
> <cs...@hotmail.com> wrote:
> > If you have two nodes in the cluster, the replication should be two-way between the nodes?
> > What if there are three nodes? How should the replication be setup between them?
> >
> >> Subject: Re: Adding a node to cluster
> >> From: sebastianrothbucher@googlemail.com
> >> Date: Mon, 5 Sep 2016 23:08:04 +0200
> >> To: dev@couchdb.apache.org
> >>
> >> Hi,
> >>
> >> clustering and replication are indeed two (very) separate things - and you won't get a Cluster by setting up replication. Again: treat the two as separate. Clustering turns several shards (on several nodes) into one database (from an user/caller perspective) while replication happens _between_ databases.
> >> Consequently, technical underpinnings differ as well, as Bob explained below.
> >>
> >> Hope that gets things in perspective a little...
> >>
> >> Best
> >>   Sebastian
> >>
> >> Von meinem iPhone gesendet
> >>
> >> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <cs...@hotmail.com>:
> >> >
> >> > Does this mean that setting up replication is separate from setting up clustering?
> >> >
> >> > Does replication needs to be bi-directional between nodes?
> >> >
> >> >> From: rnewson@apache.org
> >> >> Subject: Re: Adding a node to cluster
> >> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> >> >> To: dev@couchdb.apache.org
> >> >>
> >> >> Ok, seems I've confused you.
> >> >>
> >> >> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases.
> >> >>
> >> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications.
> >> >>
> >> >> Sent from my iPhone
> >> >>
> >> >>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> >> >>>
> >> >>> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> >> >>>
> >> >>>> Subject: Re: Adding a node to cluster
> >> >>>> From: rnewson@apache.org
> >> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> >> >>>> To: dev@couchdb.apache.org
> >> >>>>
> >> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> >> >>>>
> >> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> >> >>>>>
> >> >>>>> Good day,
> >> >>>>>
> >> >>>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> >> >>>>>
> >> >>>>> Regards,
> >> >>>>> Joey
> >> >
> >
 		 	   		  

Re: Adding a node to cluster

Posted by "Eli Stevens (Gmail)" <wi...@gmail.com>.
Nodes in the cluster do not replicate to one another.

Replication takes place between databases. A single node isn't a
database; a clustered database spans multiple nodes.

Each node has a black-box lump of data that happens to have a fraction
of a database inside, but that's an implementation detail. It's the
wrong level of abstraction to work with.

On Tue, Sep 6, 2016 at 1:52 PM, Joey Samonte
<cs...@hotmail.com> wrote:
> If you have two nodes in the cluster, the replication should be two-way between the nodes?
> What if there are three nodes? How should the replication be setup between them?
>
>> Subject: Re: Adding a node to cluster
>> From: sebastianrothbucher@googlemail.com
>> Date: Mon, 5 Sep 2016 23:08:04 +0200
>> To: dev@couchdb.apache.org
>>
>> Hi,
>>
>> clustering and replication are indeed two (very) separate things - and you won't get a Cluster by setting up replication. Again: treat the two as separate. Clustering turns several shards (on several nodes) into one database (from an user/caller perspective) while replication happens _between_ databases.
>> Consequently, technical underpinnings differ as well, as Bob explained below.
>>
>> Hope that gets things in perspective a little...
>>
>> Best
>>   Sebastian
>>
>> Von meinem iPhone gesendet
>>
>> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <cs...@hotmail.com>:
>> >
>> > Does this mean that setting up replication is separate from setting up clustering?
>> >
>> > Does replication needs to be bi-directional between nodes?
>> >
>> >> From: rnewson@apache.org
>> >> Subject: Re: Adding a node to cluster
>> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
>> >> To: dev@couchdb.apache.org
>> >>
>> >> Ok, seems I've confused you.
>> >>
>> >> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases.
>> >>
>> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications.
>> >>
>> >> Sent from my iPhone
>> >>
>> >>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
>> >>>
>> >>> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
>> >>>
>> >>>> Subject: Re: Adding a node to cluster
>> >>>> From: rnewson@apache.org
>> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
>> >>>> To: dev@couchdb.apache.org
>> >>>>
>> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
>> >>>>
>> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
>> >>>>>
>> >>>>> Good day,
>> >>>>>
>> >>>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Joey
>> >
>

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
If you have two nodes in the cluster, the replication should be two-way between the nodes?
What if there are three nodes? How should the replication be setup between them?
 
> Subject: Re: Adding a node to cluster
> From: sebastianrothbucher@googlemail.com
> Date: Mon, 5 Sep 2016 23:08:04 +0200
> To: dev@couchdb.apache.org
> 
> Hi, 
> 
> clustering and replication are indeed two (very) separate things - and you won't get a Cluster by setting up replication. Again: treat the two as separate. Clustering turns several shards (on several nodes) into one database (from an user/caller perspective) while replication happens _between_ databases. 
> Consequently, technical underpinnings differ as well, as Bob explained below.
> 
> Hope that gets things in perspective a little...
> 
> Best
>   Sebastian
> 
> Von meinem iPhone gesendet
> 
> > Am 05.09.2016 um 22:47 schrieb Joey Samonte <cs...@hotmail.com>:
> > 
> > Does this mean that setting up replication is separate from setting up clustering? 
> > 
> > Does replication needs to be bi-directional between nodes?
> > 
> >> From: rnewson@apache.org
> >> Subject: Re: Adding a node to cluster
> >> Date: Thu, 25 Aug 2016 11:10:45 +0100
> >> To: dev@couchdb.apache.org
> >> 
> >> Ok, seems I've confused you. 
> >> 
> >> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases. 
> >> 
> >> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications. 
> >> 
> >> Sent from my iPhone
> >> 
> >>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> >>> 
> >>> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> >>> 
> >>>> Subject: Re: Adding a node to cluster
> >>>> From: rnewson@apache.org
> >>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
> >>>> To: dev@couchdb.apache.org
> >>>> 
> >>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> >>>> 
> >>>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> >>>>> 
> >>>>> Good day,
> >>>>> 
> >>>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> >>>>> 
> >>>>> Regards,
> >>>>> Joey
> >                         
 		 	   		  

Re: Adding a node to cluster

Posted by Sebastian Rothbucher <se...@googlemail.com>.
Hi, 

clustering and replication are indeed two (very) separate things - and you won't get a Cluster by setting up replication. Again: treat the two as separate. Clustering turns several shards (on several nodes) into one database (from an user/caller perspective) while replication happens _between_ databases. 
Consequently, technical underpinnings differ as well, as Bob explained below.

Hope that gets things in perspective a little...

Best
  Sebastian

Von meinem iPhone gesendet

> Am 05.09.2016 um 22:47 schrieb Joey Samonte <cs...@hotmail.com>:
> 
> Does this mean that setting up replication is separate from setting up clustering? 
> 
> Does replication needs to be bi-directional between nodes?
> 
>> From: rnewson@apache.org
>> Subject: Re: Adding a node to cluster
>> Date: Thu, 25 Aug 2016 11:10:45 +0100
>> To: dev@couchdb.apache.org
>> 
>> Ok, seems I've confused you. 
>> 
>> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases. 
>> 
>> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications. 
>> 
>> Sent from my iPhone
>> 
>>> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
>>> 
>>> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
>>> 
>>>> Subject: Re: Adding a node to cluster
>>>> From: rnewson@apache.org
>>>> Date: Wed, 24 Aug 2016 19:43:51 +0100
>>>> To: dev@couchdb.apache.org
>>>> 
>>>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
>>>> 
>>>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
>>>>> 
>>>>> Good day,
>>>>> 
>>>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
>>>>> 
>>>>> Regards,
>>>>> Joey
>                         

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
Does this mean that setting up replication is separate from setting up clustering? 
 
Does replication needs to be bi-directional between nodes?
 
> From: rnewson@apache.org
> Subject: Re: Adding a node to cluster
> Date: Thu, 25 Aug 2016 11:10:45 +0100
> To: dev@couchdb.apache.org
> 
> Ok, seems I've confused you. 
> 
> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases. 
> 
> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications. 
> 
> Sent from my iPhone
> 
> > On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> > 
> > What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> > 
> >> Subject: Re: Adding a node to cluster
> >> From: rnewson@apache.org
> >> Date: Wed, 24 Aug 2016 19:43:51 +0100
> >> To: dev@couchdb.apache.org
> >> 
> >> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> >> 
> >>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> >>> 
> >>> Good day,
> >>> 
> >>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> >>> 
> >>> Regards,
> >>> Joey
> >                         
> 
 		 	   		  

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
Thank you very much. An example would really be helpful. I am a little bit confused how to do this in Fauxton if all nodes are SSL enabled (actually nginx as reverse proxy)
 
> From: rnewson@apache.org
> Subject: Re: Adding a node to cluster
> Date: Thu, 25 Aug 2016 11:10:45 +0100
> To: dev@couchdb.apache.org
> 
> Ok, seems I've confused you. 
> 
> Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases. 
> 
> I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications. 
> 
> Sent from my iPhone
> 
> > On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> > 
> > What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> > 
> >> Subject: Re: Adding a node to cluster
> >> From: rnewson@apache.org
> >> Date: Wed, 24 Aug 2016 19:43:51 +0100
> >> To: dev@couchdb.apache.org
> >> 
> >> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> >> 
> >>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> >>> 
> >>> Good day,
> >>> 
> >>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> >>> 
> >>> Regards,
> >>> Joey
> >                         
> 
 		 	   		  

Re: Adding a node to cluster

Posted by Robert Newson <rn...@apache.org>.
Ok, seems I've confused you. 

Couchdb replication occurs over http or https, as you know. The nodes in a couchdb 2.0 cluster do not communicate with each other over http. They use Erlang rpc. Erlang rpc can be configured for TLS encryption.  It's in the Erlang faq and is fairly simple to set up in newer Erlang releases. 

I feel I owe an example of 2.0 cluster that exclusively uses TLS for all communications. 

Sent from my iPhone

> On 24 Aug 2016, at 20:47, Joey Samonte <cs...@hotmail.com> wrote:
> 
> What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
> 
>> Subject: Re: Adding a node to cluster
>> From: rnewson@apache.org
>> Date: Wed, 24 Aug 2016 19:43:51 +0100
>> To: dev@couchdb.apache.org
>> 
>> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
>> 
>>> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
>>> 
>>> Good day,
>>> 
>>> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
>>> 
>>> Regards,
>>> Joey
>                         


RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
What if we remove the reverse proxy and just set up the CouchDB nodes to allow only SSL connections, port 6984? https://wiki.apache.org/couchdb/How_to_enable_SSL
 
> Subject: Re: Adding a node to cluster
> From: rnewson@apache.org
> Date: Wed, 24 Aug 2016 19:43:51 +0100
> To: dev@couchdb.apache.org
> 
> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> 
> > On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> > 
> > Good day,
> > 
> > Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > 
> > Regards,
> > Joey 
> > 		 	   		  
> 
 		 	   		  

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
Can you elaborate on this more? Does this mean https is not possible? 
 
> Subject: Re: Adding a node to cluster
> From: rnewson@apache.org
> Date: Wed, 24 Aug 2016 19:43:51 +0100
> To: dev@couchdb.apache.org
> 
> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> 
> > On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> > 
> > Good day,
> > 
> > Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > 
> > Regards,
> > Joey 
> > 		 	   		  
> 
 		 	   		  

RE: Adding a node to cluster

Posted by Joey Samonte <cs...@hotmail.com>.
Does this mean that data cannot be secured over https?
 
> Subject: Re: Adding a node to cluster
> From: rnewson@apache.org
> Date: Wed, 24 Aug 2016 19:43:51 +0100
> To: dev@couchdb.apache.org
> 
> Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).
> 
> > On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> > 
> > Good day,
> > 
> > Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> > 
> > Regards,
> > Joey 
> > 		 	   		  
> 
 		 	   		  

Re: Adding a node to cluster

Posted by Robert Samuel Newson <rn...@apache.org>.
Assuming you mean a 2.0 cluster, no, all those nodes need to be able to communicate with erlang rpc (service discovery over port 4369 and then whatever port the node is running ong).

> On 24 Aug 2016, at 12:36, Joey Samonte <cs...@hotmail.com> wrote:
> 
> Good day,
> 
> Is it possible to add a node to a cluster from Fauxton if the remote host is behind a reverse proxy (nginx) configured as HTTPS?
> 
> Regards,
> Joey 
>