Information Technology Reference
In-Depth Information
the CAP theorem holds, we consider the scenario where the network con-
necting S1 and S2 fails, resulting in a network partitioning and whether all
three properties can be simultaneously fulfilled. In this situation, m cannot
be delivered resulting in an inconsistent (outdated) value of o at site S2. If
we want to avoid this to ensure consistency, m has to be sent synchronously,
that is, in an atomic operation with the updates. However, this procedure
sacrifices the availability property: if m cannot be delivered, the update on
node S1 cannot be performed. However, sending m asynchronously does not
solve the problem because then S1 does not know when S2 receives the mes-
sage. Hence, any approach trying to achieve a strong consistent view such
as locking and centralized management would either violate availability or
partition tolerance.
In order to address these restrictions imposed by CAP, the system designer
has to choose to relax or give up one of these three properties:
Consistency : If we want to preserve availability and partition toler-
ance, the only choice is to give up or relax consistency: the data can
be updated on both sites, and both sites will converge to the same
state when the connection between them is re-established and a cer-
tain time has elapsed.
Availability : Availability is given up by simply waiting when a parti-
tion event occurs until the nodes come back and the data are con-
sistent again. The service is unavailable during the waiting time.
Particularly, for large settings with many nodes, this could result in
long downtimes.
Partition tolerance : Basically, this means avoiding network par-
titioning in the case of link failures. Partition tolerance can be
achieved by ensuring that each node is connected to each other or
making a single atomically failing unit, but obviously, this limits
scalability.
The CAP theorem implies that consistency guarantees in large-scale
distributed systems cannot be as strict as those in centralized systems.
Specifically, it suggests that distributed systems may need to provide BASE
guarantees instead of the ACID guarantees provided by traditional data-
base systems (see note on ACID in Chapter 5, Section 5.7, “Transaction
Processing Monitors”). The CAP theorem states that no distributed system
can provide more than two of the following three guarantees: consistency,
availability, and partitioning tolerance. Here, consistency is defined as in
databases; that is, if multiple operations are performed on the same object
(which is actually stored in a distributed system), the results of the opera-
tions appear as if the operations were carried out in some definite order
on a single system. Availability is defined to be satisfied if each opera-
tion on the system (e.g., a query) returns some result. The system provides
Search WWH ::




Custom Search