Consistency

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Consistency

Nikolay Tikhonov
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!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consistency

Jonathan Haddad
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 <[hidden email]> 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!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consistency

Robert Coli-3
In reply to this post by Nikolay Tikhonov
On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consistency

Nikolay Tikhonov
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 <[hidden email]>:
On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consistency

Jonathan Haddad
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 <[hidden email]> 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 <[hidden email]>:
On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consistency

Nikolay Tikhonov
Thanks for the detailed answer!

2015-04-30 17:14 GMT+03:00 Jonathan Haddad <[hidden email]>:
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 <[hidden email]> 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 <[hidden email]>:
On Wed, Apr 29, 2015 at 8:56 AM, Nikolay Tikhonov <[hidden email]> 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



Loading...