Consistency Models and Guarantees Example: I’m bored at FAST and want to go home! Linearizability Weaker models latest data: no staleness in-order reads across clients 10
Consistency Models and Guarantees Example: I’m bored at FAST and want to go home! Linearizability Weaker models latest data: no staleness stale reads in-order reads across clients out-of-order reads across clients 10
Consistency Models and Guarantees Example: I’m bored at FAST and want to go home! Linearizability Weaker models latest data: no staleness stale reads in-order reads across clients out-of-order reads across clients 10 even with monotonic reads and causal
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 leader – S1 a 0 S2 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 leader – S1 a 0 S2 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 leader – S1 a 0 a 1 S2 a 1 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 1 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 1 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 1 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 0 S3 in memory on disk durable = on disk on a majority 11
Realizing Strong Consistency Linearizability requires immediate durability must synchronously replicate and persist data on a majority to tolerate failures a 0 a 1 a 1 leader – S1 a 0 a 1 a 1 S2 a 0 S3 in memory on disk durable = on disk on a majority Poor performance due to synchronous operations 10x slower within data center 11
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 S1 a 0 S2 a 0 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 S1 a 0 S2 app session-1 a 0 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 1 S1 a 0 S2 app session-1 a 0 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 1 S1 a 0 S2 app session-1 a 0 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 1 S1 a 0 S2 app session-1 a 0 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 S1 a 0 S2 app session-1 a 0 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 0 S1 S1 a 0 a 0 S2 S2 app session-1 a 0 a 0 S3 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 0 S1 S1 a 0 a 0 S2 S2 app app session-2 session-1 a 0 a 0 S3 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 0 S1 S1 a 0 a 0 S2 S2 app app session-2 session-1 a 0 a 0 S3 S3 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 0 S1 S1 out-of-order across clients a 0 a 0 S2 S2 app app valid under causal and session-2 session-1 a 0 a 0 S3 S3 monotonic reads but confusing semantics 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 0 S1 S1 out-of-order across clients a 0 a 0 S2 S2 app app valid under causal and session-2 session-1 a 0 a 0 S3 S3 monotonic reads but confusing semantics Many deployments prefer eventual durability for performance in fact, it is the default (e.g., MongoDB, Redis) 12
Realizing Weaker Models Weaker models only require eventual durability data buffered on one node, replication and persistence in background a 0 a 0 S1 S1 out-of-order across clients a 0 a 0 S2 S2 app app valid under causal and session-2 session-1 a 0 a 0 S3 S3 monotonic reads but confusing semantics Many deployments prefer eventual durability for performance in fact, it is the default (e.g., MongoDB, Redis) Thus settle for weak consistency 12
Immediate durability enables strong consistency but is slow Eventual durability is fast but enables only weaker consistency
Outline Introduction Motivation CAD and cross-client monotonic reads ORCA design Results Summary and conclusion 13
Consistency-aware Durability 14
Consistency-aware Durability Most consistency models care about what reads see 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes client write S1 S2 S3 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes client write S1 S2 S3 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes client write ack S1 S2 S3 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes client write ack S1 S2 S3 good performance 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client write ack S1 S2 S3 good performance 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client client write read ack S1 S2 S3 S1 S2 S3 good performance 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client client write read ack S1 S2 S3 S1 S2 S3 good performance 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client client write read ack S1 S2 S3 S1 S2 S3 good performance 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client client write read ack S1 S2 S3 S1 S2 S3 good performance 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client client write read ack S1 S2 S3 S1 S2 S3 prevents out-of-order data across failures good performance strong consistency 14
Consistency-aware Durability Most consistency models care about what reads see Key idea: CAD shifts the point of durability to reads from writes delay durability of writes make data durable before serving reads client client write read ack S1 S2 S3 S1 S2 S3 prevents out-of-order data across failures good performance strong consistency CAD does not always incur overheads on reads reads do not immediately follow writes – natural in many workloads common case: data already durable well before applications access it 14
Cross-client Monotonic Reads upon CAD 15
Cross-client Monotonic Reads upon CAD A read from a client guaranteed to return at least the latest state returned to a previous read from any client 15
Cross-client Monotonic Reads upon CAD A read from a client guaranteed to return at least the latest state returned to a previous read from any client a 0 a 1 a 2 15
Cross-client Monotonic Reads upon CAD A read from a client guaranteed to return at least the latest state returned to a previous read from any client a 0 a 1 a 2 a 2 client-1 15
Cross-client Monotonic Reads upon CAD A read from a client guaranteed to return at least the latest state returned to a previous read from any client a 0 a 1 a 2 a 2 client-1 a 2 client-2 15
Cross-client Monotonic Reads upon CAD A read from a client guaranteed to return at least the latest state returned to a previous read from any client Even in the presence of failures and a 0 a 1 a 2 across client sessions a 2 client-1 a 2 client-2 15
Cross-client Monotonic Reads upon CAD A read from a client guaranteed to return at least the latest state returned to a previous read from any client Even in the presence of failures and a 0 a 1 a 2 across client sessions No existing model provides this a 2 guarantee except linearizability but not client-1 a 2 with high performance client-2 15
Recommend
More recommend