Database Reference
In-Depth Information
10.6.1 w hy u se the s tale r eaDs r ate to D eFine the
C onsistenCy r eQuirements oF an a PPliCation ?
We consider two applications that may at some point have the same access pattern.
One is a web-shop application that can have heavy reads and writes during the busy
holiday periods, and a social network application that can also have heavy access
during important events or in the evening of a working day. These two applications
may have the same behavior at some point and are the same from the point of view
of the system when monitoring data accesses and network state, thus they may be
given the same consistency level. However, the cost for stale reads is not the same
for both applications. A social network application can tolerate a higher number of
stale reads than a web-shop application: a stale read has no effects on the former,
whereas it could result in anomalies for the latter. Consequently, defining the consis-
tency level in accordance to the stale reads rate can precisely reflect the application
requirements. Furthermore, this allow Harmony to always retain the same consis-
tency guarantees (i.e., predefined stale reads rate) while offering the best-effort per-
formance (i.e., finding the minimum number of replicas that satisfy the predefined
consistency). For example, Harmony can offer strong consistency guarantees to the
same application (by setting the stale reads rate to low value or “zero”), but with
adaptive number of involved replicas (e.g., less replicas will be involved when the
service load or the network latency are low).
10.6.2 s tale r eaDs P robabilistiC e stimation
The estimation model requires basic knowledge of the application access pattern
and of the storage system network latency. Network latency in this case is of high
importance, since it is the determinant of the updates propagation time to other rep-
licas. The access pattern, which includes read rates and write rates is a key factor to
determine consistency requirements in the storage system. For instance, it is obvious
that a heavy read-write access pattern would produce higher stale reads when adopt-
ing eventual consistency.
We define the situation that leads to a stale read in Figure 10.3. The read may be
stale if its starting time X r is in the time interval between the starting time of the last
write and the end of the propagation time of data to the other replicas. This situation
is repeatable for any of the writes that may occur in the system. T p in Figure 10.3
is the time necessary for the propagation of a write or an update to all the replicas.
It is computed based on the network latency L n and the average write size avg w and
should be represented as T p ( L n , avg w ), but to simplify the representation, it will be
denoted as T p in the rest of the chapter.
Transactions arrivals are generally considered as a Poisson process as it is the
common way to model them in literature [10,51]. We assume that the writes and the
reads arrivals follow the Poisson distribution of parameter λ −1 (we chose λ −1 instead
of λ w to simplify subsequent formulas where the parameter will be inverted) and λ r ,
respectively. These parameters values change dynamically at run time following the
read and write requests arrivals monitored in the storage system. Since the distribu-
tion of waiting time between two Poisson arrivals is an exponential process, the
Search WWH ::




Custom Search