You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Wolfgang Meyerle <wo...@googlemail.com> on 2020/12/01 19:22:36 UTC

CAP Theorem

Hi,

the CAP Theorem states that a database can only achieve two of the 
following design goals:

- Availability
- Consistency
- Partition Tolerance

Which two of the above design goals Apache Ignite has been developed for?

Mongo DB and Redis for instance match Consitency and Partition tolerance 
but lack of the availability design goal.

Regards,

Wolfgang

Re: CAP Theorem

Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi,

Short answer: CP
Long answer:
https://medium.com/@valentin.kulichenko/apache-ignite-and-cap-theorem-17b8aacdc0e2

On Tue, Dec 1, 2020 at 10:22 PM Wolfgang Meyerle <
wolfgang.meyerle@googlemail.com> wrote:

> Hi,
>
> the CAP Theorem states that a database can only achieve two of the
> following design goals:
>
> - Availability
> - Consistency
> - Partition Tolerance
>
> Which two of the above design goals Apache Ignite has been developed for?
>
> Mongo DB and Redis for instance match Consitency and Partition tolerance
> but lack of the availability design goal.
>
> Regards,
>
> Wolfgang
>

Re: CAP Theorem

Posted by Mikhail Cherkasov <mc...@gridgain.com>.
Definitely read the article Pavel sent, but I can not agree that it's CP.
You also need to consider if it is in-memory or persisted, partition or
replicated cache, number of backups, and partition loss policy.
You can even have two different caches with different warranties(CP or AP)
in the same cluster.
 For example, replicated in-memory cache with IGNORE partition loss
policy(which is the default) will be AP cache, while persisted partitioned
cache will be CP.

On Tue, Dec 1, 2020 at 11:55 AM Mikhail Cherkasov <mc...@gridgain.com>
wrote:

> Hi Wolfgang,
>
> it's a very interesting question, I would say it depends on your
> configuration.
> Ignite is a distributed database, so you always will have P in our
> equation, except corner case when you will run only one node on one host,
> in this case, no partition can happen.
> But really no one wants to get in a split bran situation when a
> divided(partitioned) cluster supports two sets of data and loses
> consistency as result, so you need to have SegmentationResolver set to
> avoid split-brain, so without it ignite provides AP.
> If you have SegmentationResolver or use ZookeeperDiscovery you get CP.(ZK
> by nature always has to have a quorum and as result provides us split brain
> protection of a box),
>
> Thanks,
> Mike.
>
> On Tue, Dec 1, 2020 at 11:22 AM Wolfgang Meyerle <
> wolfgang.meyerle@googlemail.com> wrote:
>
>> Hi,
>>
>> the CAP Theorem states that a database can only achieve two of the
>> following design goals:
>>
>> - Availability
>> - Consistency
>> - Partition Tolerance
>>
>> Which two of the above design goals Apache Ignite has been developed for?
>>
>> Mongo DB and Redis for instance match Consitency and Partition tolerance
>> but lack of the availability design goal.
>>
>> Regards,
>>
>> Wolfgang
>>
>
>
> --
> Thanks,
> Mikhail.
>


-- 
Thanks,
Mikhail.

Re: CAP Theorem

Posted by Mikhail Cherkasov <mc...@gridgain.com>.
Hi Wolfgang,

it's a very interesting question, I would say it depends on your
configuration.
Ignite is a distributed database, so you always will have P in our
equation, except corner case when you will run only one node on one host,
in this case, no partition can happen.
But really no one wants to get in a split bran situation when a
divided(partitioned) cluster supports two sets of data and loses
consistency as result, so you need to have SegmentationResolver set to
avoid split-brain, so without it ignite provides AP.
If you have SegmentationResolver or use ZookeeperDiscovery you get CP.(ZK
by nature always has to have a quorum and as result provides us split brain
protection of a box),

Thanks,
Mike.

On Tue, Dec 1, 2020 at 11:22 AM Wolfgang Meyerle <
wolfgang.meyerle@googlemail.com> wrote:

> Hi,
>
> the CAP Theorem states that a database can only achieve two of the
> following design goals:
>
> - Availability
> - Consistency
> - Partition Tolerance
>
> Which two of the above design goals Apache Ignite has been developed for?
>
> Mongo DB and Redis for instance match Consitency and Partition tolerance
> but lack of the availability design goal.
>
> Regards,
>
> Wolfgang
>


-- 
Thanks,
Mikhail.