You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Kaushal Shriyan <ka...@gmail.com> on 2017/06/19 18:47:59 UTC

Zookeeper is always CP or AP in terms of CAP theorem

Hi,

I am reading the CAP theorem and zookeeper either satisfies CP or AP. I am
not sure how do we take care of Availability property or Consistency
property. Any examples to understand it better. Please help me understand
if i am completely wrong?

Thanks in Advance.

Regards,

Kaushal

Re: Zookeeper is always CP or AP in terms of CAP theorem

Posted by Abraham Fine <af...@apache.org>.
I'm a big fan of this post, specifically the ZooKeeper section:
https://martin.kleppmann.com/2015/05/11/please-stop-calling-databases-cp-or-ap.html

On Mon, Jun 19, 2017, at 12:02, Gaurav Sharma wrote:
> For typical Zk use-cases, Consistency is non-negotiable; so CP. That
> said,
> typically A is not black/white even if you are working with a CP system,
> you can get a degree of availability. For prod use-cases, instead of a 3
> node cluster, try to setup a 5 node cluster and write some simple
> scripts/automation to heal the cluster on failures (read the admin docs)
> -
> https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#sc_supervision
> You
> can scale reads via observer nodes but you cannot (and should not) accept
> writes without a quorum.
> 
> 
> On Mon, Jun 19, 2017 at 11:47 AM, Kaushal Shriyan
> <ka...@gmail.com>
> wrote:
> 
> > Hi,
> >
> > I am reading the CAP theorem and zookeeper either satisfies CP or AP. I am
> > not sure how do we take care of Availability property or Consistency
> > property. Any examples to understand it better. Please help me understand
> > if i am completely wrong?
> >
> > Thanks in Advance.
> >
> > Regards,
> >
> > Kaushal
> >

Re: Zookeeper is always CP or AP in terms of CAP theorem

Posted by Gaurav Sharma <gs...@gmail.com>.
For typical Zk use-cases, Consistency is non-negotiable; so CP. That said,
typically A is not black/white even if you are working with a CP system,
you can get a degree of availability. For prod use-cases, instead of a 3
node cluster, try to setup a 5 node cluster and write some simple
scripts/automation to heal the cluster on failures (read the admin docs) -
https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#sc_supervision You
can scale reads via observer nodes but you cannot (and should not) accept
writes without a quorum.


On Mon, Jun 19, 2017 at 11:47 AM, Kaushal Shriyan <ka...@gmail.com>
wrote:

> Hi,
>
> I am reading the CAP theorem and zookeeper either satisfies CP or AP. I am
> not sure how do we take care of Availability property or Consistency
> property. Any examples to understand it better. Please help me understand
> if i am completely wrong?
>
> Thanks in Advance.
>
> Regards,
>
> Kaushal
>

Re: Zookeeper is always CP or AP in terms of CAP theorem

Posted by Michael Han <ha...@cloudera.com>.
Martin had a good blog post about this - see the ZooKeeper case study
section.
https://martin.kleppmann.com/2015/05/11/please-stop-calling-databases-cp-or-ap.html

On Mon, Jun 19, 2017 at 11:47 AM, Kaushal Shriyan <ka...@gmail.com>
wrote:

> Hi,
>
> I am reading the CAP theorem and zookeeper either satisfies CP or AP. I am
> not sure how do we take care of Availability property or Consistency
> property. Any examples to understand it better. Please help me understand
> if i am completely wrong?
>
> Thanks in Advance.
>
> Regards,
>
> Kaushal
>



-- 
Cheers
Michael.