Database Reference
In-Depth Information
Table 5.1 Probability of reading freshest value
Time elapsed from
starting write until starting read
Eventual consistent read
Consistent read
Œ0; 450/
33:40% (168;908/505;821)
100:00% (482;717/482;717)
Œ500; 1000/
99:78% (1192/541;062)
100:00% (509;426/509;426)
Read-Your-Write Consistency
Figure 5.2 shows the probability of reading the fresh value plotted against the
time interval that elapsed from the time when the write begins, to the time when
the read is submitted. Each data point in the graph is an aggregation over all the
measurements for a particular bucket containing all time intervals that conform to
millisecond granularity. With eventual consistent read the probability of reading the
freshest data stays about 33% from 0 ms to 450 ms. It surges sharply between 450 ms
and 500 ms, and finally reaches 98% at 507 ms. A spike and a valley in the first 10 ms
are perhaps random fluctuations due to a small number of data points. While with
consistent read, the probability is 100% from about 0 ms onwards. To summarize
further, Table 5.1 places all buckets whose time is in a broad interval together and
shows actual numbers as well as percentages.
A type of relevant consistency is read-your-writes, which says that when the
most recent write is from the same thread as the reader, then the value seen should
be fresh. As stale eventual consistent reads are possible with Amazon SimpleDB
within a single thread, so it is concluded that eventual consistent reads do not satisfy
read-your-writes; however, consistent reads do achieve such level of consistency.
Moreover, the variability of the time is also examined when freshness is possible
or highly likely, among different measurement runs. For eventual consistent reads,
Fig. 5.3 shows the first time when a bucket has the freshness probability of over
99%, and the last time when the probability is less than 100%. Each data point
is obtained from a 5 min measurement run, so there are 258 data points in each
time series. The median of the time to exceed 99% is 516:17 ms and coefficient of
variance is 0:0258. There does not seem to be any regular daily or weekly variation,
rather the outliers seem randomly placed. Out of the 258 measurement runs, second
and twenty-first runs show a non-zero probability of stale read after 4,000 ms and
1,000 ms respectively. Those outliers are considered to be generated by network
jitter and other similar effects.
Monotonic Read Consistency
Monotonic read is an important consistency option [ 226 ]. It is defined as a condition
where subsequent operations see data that is at least as fresh as what was seen
before. This property can be examined across multiple data elements or for a single
element as is considered here. The consistent read meets monotonic as it should
 
Search WWH ::




Custom Search