You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by khandelwalanuj <kh...@gmail.com> on 2015/07/22 09:29:01 UTC

ActiveMQ replicated leveldb with 2 brokers(replica = 1)

Hi,  

I am looking to move to using LevelDB replication. We will only have 2 nodes
to run ActiveMq on, one for the master and one for the slave.  We also
intend to run ZooKeeper on 3 nodes.

My intention is that if one server goes down ActiveMQ will continue to
operate.  I have had to set the property for LevelDB, replicas to 1 to get a
master to start on its own. 

As I can see that it is recommended to use odd number of nodes with levelDB
replication. What are the corner cases or side effect of using the above
mentioned configuration ?

Thanks,
Anuj



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-replicated-leveldb-with-2-brokers-replica-1-tp4699679.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ replicated leveldb with 2 brokers(replica = 1)

Posted by khandelwalanuj <kh...@gmail.com>.
> That also means that during a network partition, both brokers can serve
clients.  Is that really what you want? 

Can you please elaborate what does "during a network partition" means ? 

As per my understanding, both the brokers will be using same 'zkpath' in
zookeeper, and master election happens via zookeeper. So both of them sends
their updated positions to the zookeeper and whoever has the latest position
becomes the master.

Thanks,
Anuj



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-replicated-leveldb-with-2-brokers-replica-1-tp4699679p4699777.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ replicated leveldb with 2 brokers(replica = 1)

Posted by Tim Bain <tb...@alumni.duke.edu>.
That also means that during a network partition, both brokers can serve
clients.  Is that really what you want?

Tim
On Jul 23, 2015 9:16 AM, "khandelwalanuj" <kh...@gmail.com>
wrote:

> Hi Jim,
>
> But I am using replica =1 and
> (quorum = replica/2+1) AND quorum != (no of broker/2 +1).
>
> So in my case a single broker can also serve the client(1/2 +1 = 1)
>
> Thanks,
> Anuj
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-replicated-leveldb-with-2-brokers-replica-1-tp4699679p4699749.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ replicated leveldb with 2 brokers(replica = 1)

Posted by khandelwalanuj <kh...@gmail.com>.
Hi Jim,

But I am using replica =1 and 
(quorum = replica/2+1) AND quorum != (no of broker/2 +1). 

So in my case a single broker can also serve the client(1/2 +1 = 1)

Thanks,
Anuj



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-replicated-leveldb-with-2-brokers-replica-1-tp4699679p4699749.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ replicated leveldb with 2 brokers(replica = 1)

Posted by "James A. Robinson" <ji...@highwire.org>.
My understanding has been that the election algorithm requires [(n/2)+1]
 (where n is the configured size of the cluster) nodes to reach consensus on
who the master is.  So [(2/2)+1 = 2] nodes, meaning you have no way to lose
a node and still run.  Unless I'm mistaken, that's typically why you see an
odd number of nodes, since both [(3/2)+1 = 2] and [(4/2)+1 = 3] mean you
can only lose one node.  Go from 3 to 5 and you get the extra redundancy
 of being able to lose 2 nodes.

Jim

On Thu, Jul 23, 2015 at 3:38 AM khandelwalanuj <kh...@gmail.com>
wrote:

> Any updates here.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-replicated-leveldb-with-2-brokers-replica-1-tp4699679p4699739.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ replicated leveldb with 2 brokers(replica = 1)

Posted by khandelwalanuj <kh...@gmail.com>.
Any updates here. 



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-replicated-leveldb-with-2-brokers-replica-1-tp4699679p4699739.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.