Database Reference
In-Depth Information
is a quorum-like setting. This configuration insures that the last up-to-date replica is
included in the quorum and thus the response. However, the operation latencies are
as small as the longest replica response time. In a configuration where R + W < N ,
clients may be exposed to stale versions of data.
10.4.2 C assanDra
Many web services and social networks are data-intensive and deal with the problem
of data deluge. The Facebook social networking platform is the largest networking
platform serving hundred millions of users at peak times and having no less than 900
million active users [9]. Therefore, and in order to keep users satisfied within such
services, an efficient Big Data management that guarantees high availability, per-
formance, and reliability is required. Moreover, a storage system that fulfills these
needs must be able to elastically scale out to meet the continuous growth of the data-
intensive platform. Cassandra [34] is a highly available, highly scalable, distributed
storage system that was first built within Facebook. It was designed for managing
large objects of structured data spread over a large amount of commodity hardware
located in different datacenters worldwide.
The design of Cassandra was highly inspired by that of two other distributed stor-
age systems. Implementation choices and consistency management are very similar
to the ones of Amazon Dynamo (except for in-memory management) while its data
model is derived from the Google BigTable [6] model. Therefore, the model adopted
is column family based. Data are stored in tables and indexed by row keys. For
each table, column families are defined and column keys within a column family
can be created dynamically. Every operation on a single row key is atomic per a
replica without the consideration of which columns are accessed. Such a data model
provides great abilities for structured large data, as it offers a more flexible yet effi-
cient data access. Moreover, it enables a better dynamic memory management. Like
BigTable, Cassandra keeps data in-memory in small tables called memtables . When
a memtable size grows over a given threshold, it is considered as full and data is
flushed into an sstable that will be dumped to the disk.
The Cassandra partitioning scheme is based on consistent hashing. Unlike Dynamo,
which uses virtual nodes to overcome the non-uniformity of load distribution, every
node on the ring is a physical host. Therefore, and to guarantee uniform load distribu-
tion, Cassandra uses the same technique as in [35], where lightly loaded nodes move
on the ring. Replication in Cassandra is performed in the same manner as in Dynamo.
Moreover, Cassandra implements few replication strategies that consider the system
topology. Therefore, strategies that are Rack UnAware , Rack Aware , and Datacenter
Aware are provided. For the two latter strategies, Cassandra implements algorithms in
Zookeeper [36] to compute the reference list for a given key. This list is cached locally
at the level of every node as to preserve the zero-hop property of the system.
Similar to Amazon Dynamo, Cassandra storage system provides a flexible API
to clients. In this context, various consistency levels [37] are proposed per operation.
A write of consistency level One implies that data has to be written to the commit
log and memory table of at least one replica before returning a success. Moreover, as
shown in Figure 10.2, a read operation with consistency level All (strong consistency)
Search WWH ::




Custom Search