Re: zookeeper deployment strategy for multi data centers

2016-06-04 Thread Flavio Junqueira
There is no black magic going on with weights or hierarchies. Whatever you do, you can't escape from the curse of the intersection, and I'm sorry for stating the obvious, but that's the key reason why masking a data center going down out of two is so hard. In general, using majorities makes it

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Camille Fournier
You don't need weights to run this cluster successfully across 2 datacenters, unless you want to run with 4 live read/write nodes which isn't really a recommended setup (we advise odd numbers because running with even numbers doesn't generally buy you anything). I would probably run 3 voting

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Dan Benediktson
Weights will at least let you do better: if you weight it, you can make it so that datacenter A will survive even if datacenter B goes down, but not the other way around. While not ideal, it's probably better than the non-weighted alternative. (2, 2, 1, 1) weights might work fairly well - as long

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Camille Fournier
You can't solve this with weights. On Jun 3, 2016 6:03 PM, "Michael Han" wrote: > ZK supports more than just majority quorum rule, there are also weights / > hierarchy of groups based quorum [1]. So probably one can assign more > weights to one out of two data center which can

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Michael Han
ZK supports more than just majority quorum rule, there are also weights / hierarchy of groups based quorum [1]. So probably one can assign more weights to one out of two data center which can form a weight based quorum even if another DC is failing? Another idea is to instead of forming a single

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Alexander Shraer
> Is there any settings to override the quorum rule? Would you know the rationale behind it? The rule comes from a theoretical impossibility saying that you must have n > 2f replicas to tolerate f failures, for any algorithm trying to solve consensus while being able to handle periods of

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Camille Fournier
2 servers is the same as 1 server wrt fault tolerance, so yes, you are correct. If they want fault tolerance, they have to run 3 (or more). On Fri, Jun 3, 2016 at 4:25 PM, Shawn Heisey wrote: > On 6/3/2016 1:44 PM, Nomar Morado wrote: > > Is there any settings to override

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Camille Fournier
I wish I had a better answer for you but you can't safely and automatically have a setup across 2 datacenters where you can be guaranteed that the loss of one data center won't cause the cluster to go down. So, what you want to do, you cannot do. I wrote a bit about designing x-dc ZK clusters a

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Shawn Heisey
On 6/3/2016 1:44 PM, Nomar Morado wrote: > Is there any settings to override the quorum rule? Would you know the > rationale behind it? Ideally, you will want to operate the application > even if at least one data center is up. I do not know if the quorum rule can be overridden, or whether your

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Nomar Morado
Will be using ZK with Apache Kafka and don't know if I can get away of not using ZK Printing e-mails wastes valuable natural resources. Please don't print this message unless it is absolutely necessary. Thank you for thinking green! Sent from my iPhone > On Jun 3, 2016, at 3:51 PM, Camille

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Camille Fournier
You could put the remaining available node in read-only mode. You could reconfigure the cluster to have the majority nodes in the remaining data center, but it would require reconfiguration and restart of the nodes in the living data center. But there's no automatic fix for this, and if you can

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Nomar Morado
Thanks Shawn. Is there any settings to override the quorum rule? Would you know the rationale behind it? Ideally, you will want to operate the application even if at least one data center is up. Thanks. Printing e-mails wastes valuable natural resources. Please don't print this message

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Shawn Heisey
On 6/2/2016 4:06 PM, J316 Services wrote: > We have two data centers and got two servers at each. At an event of a > data center failure, with the quorum majority rule - the other > surviving data center seems to be no use at all and we'll be out of luck. You are correct -- the scenario you've

Re: zookeeper deployment strategy for multi data centers

2016-06-03 Thread Nomar Morado
We need to keep zookeeper up and running at the event of catastrophic loss of one data center. Printing e-mails wastes valuable natural resources. Please don't print this message unless it is absolutely necessary. Thank you for thinking green! Sent from my iPhone > On Jun 3, 2016, at 12:18

Re: zookeeper deployment strategy for multi data centers

2016-06-02 Thread sagar shukla
what combination of functional scenarios are you looking for? Regards,Sagar On Friday, June 3, 2016 3:36 AM, J316 Services wrote: We have two data centers and got two servers at each. At an event of a data center failure, with the quorum majority rule - the

zookeeper deployment strategy for multi data centers

2016-06-02 Thread J316 Services
We have two data centers and got two servers at each. At an event of a data center failure, with the quorum majority rule - the other surviving data center seems to be no use at all and we'll be out of luck. Any thoughts on how best to deploy in this scenario? Appreciate your thoughts on