Causal Consistency and Latency Optimality: Friend or Foe?

Causal consistency is an attractive consistency model for replicated data stores. It is provably the strongest model that tolerates partitions, it avoids the long latencies associated with strong consistency, and, especially when using read-only transactions, it prevents many of the anomalies of weaker consistency models. Recent work has shown that causal consistency allows "latency-optimal" read-only transactions, that are nonblocking, single-version and single-round in terms of communication. On the surface, this latency optimality is very appealing, as the vast majority of applications are assumed to have read-dominated workloads. In this paper, we show that such "latency-optimal" read-only transactions induce an extra overhead on writes, the extra overhead is so high that performance is actually jeopardized, even in read-dominated workloads. We show this result from a practical and a theoretical angle. First, we present a protocol that implements "almost laten- cy-optimal" ROTs but does not impose on the writes any of the overhead of latency-optimal protocols. In this protocol, ROTs are nonblocking, one version and can be configured to use either two or one and a half rounds of client-server communication. We experimentally show that this protocol not only provides better throughput, as expected, but also surprisingly better latencies for all but the lowest loads and most read-heavy workloads. Then, we prove that the extra overhead imposed on writes by latency-optimal read-only transactions is inherent, i.e., it is not an artifact of the design we consider, and cannot be avoided by any implementation of latency-optimal read-only transactions. We show in particular that this overhead grows linearly with the number of clients.

[1]  Indranil Gupta,et al.  Ambry: LinkedIn's Scalable Geo-Distributed Object Store , 2016, SIGMOD Conference.

[2]  Rachid Guerraoui,et al.  TRIAD: Creating Synergies Between Memory, Disk and Log in Log Structured Key-Value Stores , 2017, USENIX Annual Technical Conference.

[3]  Arvind Krishnamurthy,et al.  Building consistent transactions with inconsistent replication , 2015, SOSP.

[4]  Marvin Theimer,et al.  Managing update conflicts in Bayou, a weakly connected replicated storage system , 1995, SOSP.

[5]  João Leitão,et al.  ChainReaction: a causal+ consistent datastore based on chain replication , 2013, EuroSys '13.

[6]  Y. C. Tay,et al.  Analytical Performance Modeling for Computer Systems , 2010, Analytical Performance Modeling for Computer Systems.

[7]  Lewis Tseng,et al.  Characterizing and Adapting the Consistency-Latency Tradeoff in Distributed Key-Value Stores , 2015, ACM Trans. Auton. Adapt. Syst..

[8]  Gil Neiger,et al.  Causal memory: definitions, implementation, and programming , 1995, Distributed Computing.

[9]  Barbara Liskov,et al.  Weak Consistency: A Generalized Theory and Optimistic Implementations for Distributed Transactions , 1999 .

[10]  Marvin Theimer,et al.  Flexible update propagation for weakly consistent replication , 1997, SOSP.

[11]  Marcos K. Aguilera,et al.  Transactional storage for geo-replicated systems , 2011, SOSP.

[12]  Marko Vukolic,et al.  Consistency in Non-Transactional Distributed Storage Systems , 2015, ACM Comput. Surv..

[13]  Shuai Mu,et al.  The SNOW Theorem and Latency-Optimal Read-Only Transactions , 2016, OSDI.

[14]  Robert H. Thomas,et al.  A Majority consensus approach to concurrency control for multiple copy databases , 1979, ACM Trans. Database Syst..

[15]  Lei Gao,et al.  PRACTI Replication , 2006, NSDI.

[16]  Marcos K. Aguilera,et al.  Transaction chains: achieving serializability with low latency in geo-distributed storage systems , 2013, SOSP.

[17]  Tim Kraska,et al.  MDCC: multi-data center consistency , 2012, EuroSys '13.

[18]  Anurag Gupta,et al.  Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases , 2017, SIGMOD Conference.

[19]  Ali Ghodsi,et al.  Bolt-on causal consistency , 2013, SIGMOD '13.

[20]  Sérgio Duarte,et al.  Putting consistency back into eventual consistency , 2015, EuroSys.

[21]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[22]  Tony Tung,et al.  Scaling Memcache at Facebook , 2013, NSDI.

[23]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .

[24]  Liuba Shrira,et al.  Providing high availability using lazy replication , 1992, TOCS.

[25]  Peter Van Roy,et al.  Saturn: a Distributed Metadata Service for Causal Consistency , 2017, EuroSys.

[26]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[27]  Nicolas Bruno,et al.  Spanner: Becoming a SQL System , 2017, SIGMOD Conference.

[28]  Hongseok Yang,et al.  'Cause I'm strong enough: Reasoning about consistency choices in distributed systems , 2016, POPL.

[29]  Willy Zwaenepoel,et al.  GentleRain: Cheap and Scalable Causal Consistency with Physical Clocks , 2014, SoCC.

[30]  João Leitão,et al.  Blotter: Low Latency Transactions for Geo-Replicated Storage , 2017, WWW.

[31]  Lorenzo Alvisi,et al.  Consistency , Availability , and Convergence , 2011 .

[32]  Willy Zwaenepoel,et al.  Wren: Nonblocking Reads in a Partitioned Transactional Causally Consistent Data Store , 2018, 2018 48th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN).

[33]  Arvind Krishnamurthy,et al.  Diamond: Automating Data Management and Storage for Wide-Area, Reactive Applications , 2016, OSDI.

[34]  Sanjeev Kumar,et al.  Existential consistency: measuring and understanding consistency at Facebook , 2015, SOSP.

[35]  Sebastian Burckhardt,et al.  Geo-distribution of actor-based services , 2017, Proc. ACM Program. Lang..

[36]  Werner Vogels,et al.  Eventually consistent , 2008, CACM.

[37]  Luís E. T. Rodrigues,et al.  Unobtrusive Deferred Update Stabilization for Efficient Geo-Replication , 2017, USENIX Annual Technical Conference.

[38]  Annette Bieniusa,et al.  Cure: Strong Semantics Meets High Availability and Low Latency , 2016, 2016 IEEE 36th International Conference on Distributed Computing Systems (ICDCS).

[39]  Sameh Elnikety,et al.  Orbe: scalable causal consistency using dependency matrices and physical clocks , 2013, SoCC.

[40]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[41]  Pekka Aavikko,et al.  Network Time Protocol , 2010 .

[42]  Song Jiang,et al.  Workload analysis of a large-scale key-value store , 2012, SIGMETRICS '12.

[43]  Ozalp Babaoglu,et al.  Consistent global states of distributed systems: fundamental concepts and mechanisms , 1993 .

[44]  Lorenzo Alvisi,et al.  I Can't Believe It's Not Causal! Scalable Causal Consistency with No Slowdown Cascades , 2017, NSDI.

[45]  João Leitão,et al.  Geo-Replication: Fast If Possible, Consistent If Necessary , 2016, IEEE Data Eng. Bull..

[46]  Kenneth P. Birman,et al.  Reliable communication in the presence of failures , 1987, TOCS.

[47]  David Mosberger,et al.  Memory consistency models , 1993, OPSR.

[48]  Natacha Crooks TARDiS: A Branch-and-Merge Approach to Weak Consistency , 2019, Encyclopedia of Big Data Technologies.

[49]  Michael Stonebraker,et al.  H-store: a high-performance, distributed main memory transaction processing system , 2008, Proc. VLDB Endow..

[50]  Ali Ghodsi,et al.  The potential dangers of causal consistency and an explicit solution , 2012, SoCC '12.

[51]  Marcos K. Aguilera,et al.  Consistency-based service level agreements for cloud storage , 2013, SOSP.

[52]  Lorenzo Alvisi,et al.  Seeing is Believing: A Client-Centric Specification of Database Isolation , 2017, PODC.

[53]  Brian F. Cooper Spanner: Google's globally-distributed database , 2013, SYSTOR '13.

[54]  Michael J. Freedman,et al.  Don't settle for eventual: scalable causal consistency for wide-area storage with COPS , 2011, SOSP.

[55]  Mustaque Ahamad,et al.  Slow memory: weakening consistency to enhance concurrency in distributed shared memories , 1990, Proceedings.,10th International Conference on Distributed Computing Systems.

[56]  Divyakant Agrawal,et al.  Minimizing Commit Latency of Transactions in Geo-Replicated Data Stores , 2015, SIGMOD Conference.

[57]  Marco Canini,et al.  Rein: Taming Tail Latency in Key-Value Stores via Multiget Scheduling , 2017, EuroSys.

[58]  Werner Vogels,et al.  Dynamo: amazon's highly available key-value store , 2007, SOSP.

[59]  Murat Demirbas,et al.  CausalSpartan: Causal Consistency for Distributed Data Stores Using Hybrid Logical Clocks , 2017, 2017 IEEE 36th Symposium on Reliable Distributed Systems (SRDS).

[60]  Murat Demirbas,et al.  Logical Physical Clocks , 2014, OPODIS.

[61]  Dale Skeen,et al.  Nonblocking commit protocols , 1981, SIGMOD '81.

[62]  Michael J. Freedman,et al.  Stronger Semantics for Low-Latency Geo-Replicated Storage , 2013, NSDI.

[63]  João Leitão,et al.  Automating the Choice of Consistency Levels in Replicated Systems , 2014, USENIX Annual Technical Conference.

[64]  Adam Silberstein,et al.  Benchmarking cloud serving systems with YCSB , 2010, SoCC '10.

[65]  Sérgio Duarte,et al.  Write Fast, Read in the Past: Causal Consistency for Client-Side Applications , 2015, Middleware.

[66]  Douglas B. Terry,et al.  A Self-Configurable Geo-Replicated Cloud Storage System , 2014, OSDI.

[67]  Faith Ellen,et al.  Limitations of Highly-Available Eventually-Consistent Data Stores , 2015, IEEE Transactions on Parallel and Distributed Systems.

[68]  Enhong Chen,et al.  KV-Direct: High-Performance In-Memory Key-Value Store with Programmable NIC , 2017, SOSP.

[69]  Ju Wang,et al.  Windows Azure Storage: a highly available cloud storage service with strong consistency , 2011, SOSP.

[70]  Willy Zwaenepoel,et al.  Optimistic Causal Consistency for Geo-Replicated Key-Value Stores , 2017, 2017 IEEE 37th International Conference on Distributed Computing Systems (ICDCS).