You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Nikolay Tikhonov <ti...@gmail.com> on 2015/04/29 17:56:53 UTC

Consistency

Hi,

I try to understand how to Cassandra supports data consistency and compare
it with other distributed caches. Hazelcast and Apache Ignite products have
primary and backups. This approach allows to support read/write consistency
if client code will read/write to primary node. User's operation will not
wait when backups to be updated. I don't understand which Write/Read
Consistency Levels has the same behavior.
I would be grateful for clarification!

Re: Consistency

Posted by Nikolay Tikhonov <ti...@gmail.com>.
Thanks for the detailed answer!

2015-04-30 17:14 GMT+03:00 Jonathan Haddad <jo...@jonhaddad.com>:

> You can connect to any node in the cluster to issue a query.  For that
> request, it's called the coordinator.  The coordinator will figure out
> which node to talk to.  The DataStax native drivers can use what's called
> token aware queries, in that they'll connect to one of the nodes that owns
> the data, saving a network hop.
>
> Your replication factor determines the number of nodes that will own the
> data.  There is no concept of master/secondary here, all the replicas can
> accept reads & writes, and your writes will be replicated to all replicas
> at the consistency level provided (as per the earlier doc).
>
> Does that help?
>
> On Thu, Apr 30, 2015 at 5:09 AM Nikolay Tikhonov <
> tikhonovnicolay@gmail.com> wrote:
>
>> Thank for your response!
>> I've read the documentation but some points aren't clear for me still.
>> Does Cassandra support read/write operation only from/to node which is
>> responsible for this partition (calculated by has)?
>>
>> 2015-04-29 22:43 GMT+03:00 Robert Coli <rc...@eventbrite.com>:
>>
>>> On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <
>>> tikhonovnicolay@gmail.com> wrote:
>>>
>>>> I try to understand how to Cassandra supports data consistency and
>>>> compare it with other distributed caches.
>>>>
>>>
>>> For the record, Cassandra is not a distributed cache.
>>>
>>> =Rob
>>>
>>>
>>

Re: Consistency

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
You can connect to any node in the cluster to issue a query.  For that
request, it's called the coordinator.  The coordinator will figure out
which node to talk to.  The DataStax native drivers can use what's called
token aware queries, in that they'll connect to one of the nodes that owns
the data, saving a network hop.

Your replication factor determines the number of nodes that will own the
data.  There is no concept of master/secondary here, all the replicas can
accept reads & writes, and your writes will be replicated to all replicas
at the consistency level provided (as per the earlier doc).

Does that help?

On Thu, Apr 30, 2015 at 5:09 AM Nikolay Tikhonov <ti...@gmail.com>
wrote:

> Thank for your response!
> I've read the documentation but some points aren't clear for me still.
> Does Cassandra support read/write operation only from/to node which is
> responsible for this partition (calculated by has)?
>
> 2015-04-29 22:43 GMT+03:00 Robert Coli <rc...@eventbrite.com>:
>
>> On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <
>> tikhonovnicolay@gmail.com> wrote:
>>
>>> I try to understand how to Cassandra supports data consistency and
>>> compare it with other distributed caches.
>>>
>>
>> For the record, Cassandra is not a distributed cache.
>>
>> =Rob
>>
>>
>

Re: Consistency

Posted by Nikolay Tikhonov <ti...@gmail.com>.
Thank for your response!
I've read the documentation but some points aren't clear for me still. Does
Cassandra support read/write operation only from/to node which is
responsible for this partition (calculated by has)?

2015-04-29 22:43 GMT+03:00 Robert Coli <rc...@eventbrite.com>:

> On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <
> tikhonovnicolay@gmail.com> wrote:
>
>> I try to understand how to Cassandra supports data consistency and
>> compare it with other distributed caches.
>>
>
> For the record, Cassandra is not a distributed cache.
>
> =Rob
>
>

Re: Consistency

Posted by Robert Coli <rc...@eventbrite.com>.
On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <tikhonovnicolay@gmail.com
> wrote:

> I try to understand how to Cassandra supports data consistency and compare
> it with other distributed caches.
>

For the record, Cassandra is not a distributed cache.

=Rob

Re: Consistency

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
There's a lot going on, reading through some docs is probably your best
bet:
http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html

On Wed, Apr 29, 2015 at 8:57 AM Nikolay Tikhonov <ti...@gmail.com>
wrote:

> Hi,
>
> I try to understand how to Cassandra supports data consistency and compare
> it with other distributed caches. Hazelcast and Apache Ignite products have
> primary and backups. This approach allows to support read/write consistency
> if client code will read/write to primary node. User's operation will not
> wait when backups to be updated. I don't understand which Write/Read
> Consistency Levels has the same behavior.
> I would be grateful for clarification!
>