This is achieved through a combination of replication factor (RF) and consistency level (CL):
Replication factor is tied to your schema (more specifically, it is configured at the keyspace level) and specifies how many copies of each piece of data is kept. Consistency level is associated (either explicitly or implicitly) with queries (both reads and writes). It determines the number of replicas a query should check (or wait for) when you execute a query on a given piece of data. In the simplest terms, a low consistency level will give you better availability at the cost of potential data inconsistency, as fewer replicas need to be online and available in order to satisfy the query, but if those replicas are offline they may not receive the write, or may have a different value that is not read. Conversely, a high consistency level will give you better consistency at the cost of potentially reduced availability. There is much more in-depth description of this in the docs, I suggest you read it: http://cassandra.apache.org/doc/latest/architecture/dynamo.html?highlight=quorum#tunable-consistency Cheers, Justin On Tue, 20 Jun 2017 at 12:47 Kaushal Shriyan <[email protected]> wrote: > Hi, > > I am reading the CAP theorem and Cassandra 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 > -- *Justin Cameron*Senior Software Engineer <https://www.instaclustr.com/> This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA). This email and any attachments may contain confidential and legally privileged information. If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.
