Disaster tolerance with Apache Cassandra

Adjusting Consistency

Although Cassandra prioritizes around availability at moments of network failure, it does include options for enhancing consistency in normal operations. For each query in an application, you can select a consistency level: Any, One (Two, Three), Quorum, or All. Then a special rule is applied for the query, which is only considered fulfilled if the specified number of nodes confirm the write operation or give the same answer to a read query. The more answers, the more consistency, but the price of pursuing a high level of consistency is a certain loss of performance, because several nodes need to react. High consistency also weakens availability. Configuring your Cassandra system for high consistency tends to push it toward the CP end of the CAP diagram (refer to Figure 1). For example, an update with the consistency level of All can be written to the cluster in which three of the replication nodes store the data (Replication Factor: 3). If a node does not respond, the procedure is stopped and an exception is thrown. The most commonly used consistency level for important operations is Quorum. Accordingly, the write is considered successful if 50 percent +1 nodes confirm the write operation.

Conclusions

Cassandra is too complex for a typical small to medium-sized project. However, companies that don't want to keep data on a single server, need geographic distribution, and are looking for the highest possible availability would do well to consider the Cassandra option. Apache Cassandra is an excellent tool for companies that wish to quickly create distributed, disaster-tolerant systems.

The Author

Aleksandr Volochnev is Developer Advocate at DataStax.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Data Management

    Open source database management systems offer greater flexibility and lower costs while avoiding vendor lock-in. Finding the right one depends on your project's needs.

  • Linux News

    Samba 4.0

    • FTC ends Google investigation
    • Samba implements Windows AD
    • News Bites

    Linux Phones

    • Ubuntu launches a new phone OS
    • Samsung announces Tizen phone
    • Perl turns 25

    Big Data DB

    • vert.x project leader
    • Apache Cassandra v1.2 released
    • HPC app contest
  • Apache Announces Cassandra 2.0

    Big Data database rolls out new features and adds new powers to its query language.

  • Hadoop 2 and Apache Spark

    Hadoop version 2 has transitioned from an application to a Big Data platform. Reports of its demise are premature at best.

  • Samba for Clusters

    Samba Version 3.3 and the CTDB lock manager provide full cluster support.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News