Independent Transaction START TRANSACTION START TRANSACTION START TRANSACTION UPDATE tb t1 UPDATE tb t1 UPDATE tb t1 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 WHERE t1.Salary < 500 WHERE t1.Salary < 500 WHERE t1.Salary < 500 COMMIT COMMIT COMMIT Name Salary Name Name Salary Salary Name Name Salary Salary Alice 600 Bob Bob 450 350 Charlie Charlie 400 500
Independent Transaction START TRANSACTION UPDATE tb t1 SET t1.Salary = t1.Salary + 100 WHERE 500 < (SELECT AVG(t2.Salary) FROM tb t2) COMMIT START TRANSACTION START TRANSACTION START TRANSACTION UPDATE tb t1 UPDATE tb t1 UPDATE tb t1 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 WHERE t1.Salary < 500 WHERE t1.Salary < 500 WHERE t1.Salary < 500 COMMIT COMMIT COMMIT Name Salary Name Name Salary Salary Name Name Salary Salary Alice 600 Bob Bob 350 450 Charlie Charlie 500 400
Independent Transaction START TRANSACTION UPDATE tb t1 SET t1.Salary = t1.Salary + 100 ! WHERE 500 < (SELECT AVG(t2.Salary) FROM tb t2) t n e COMMIT d n e START TRANSACTION START TRANSACTION p START TRANSACTION e UPDATE tb t1 UPDATE tb t1 d UPDATE tb t1 n SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 I SET t1.Salary = t1.Salary + 100 t WHERE t1.Salary < 500 WHERE t1.Salary < 500 WHERE t1.Salary < 500 o N COMMIT COMMIT COMMIT Name Salary Name Name Salary Salary Name Name Salary Salary Alice 600 Bob Bob 350 450 Charlie Charlie 500 400
Independent Transaction START TRANSACTION START TRANSACTION START TRANSACTION UPDATE tb t1 UPDATE tb t1 UPDATE tb t1 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 WHERE t1.Salary < 500 WHERE t1.Salary < 500 WHERE t1.Salary < 500 COMMIT COMMIT COMMIT Name Salary Name Name Salary Salary Name Name Salary Salary Alice 600 Bob Bob 450 350 Charlie Charlie 400 500
Independent Transaction Many applications consist entirely of START TRANSACTION START TRANSACTION START TRANSACTION independent transactions (e.g. TPC-C) UPDATE tb t1 UPDATE tb t1 UPDATE tb t1 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 SET t1.Salary = t1.Salary + 100 WHERE t1.Salary < 500 WHERE t1.Salary < 500 WHERE t1.Salary < 500 COMMIT COMMIT COMMIT Name Salary Name Name Salary Salary Name Name Salary Salary Alice 600 Bob Bob 350 450 Charlie Charlie 500 400
Why independent transactions? • No coordination/communication across shards • Executing them serially at each shard in a consistent order guarantees serializability • Multi-sequenced groupcast establishes such an order • How to handle message drops and sequencer/ server failures ?
Outline 1. Introduction 2. In-Network Concurrency Control 3. Transaction Model 4. Eris Protocol 5. Evaluation
Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
Normal Case 1 round trip Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
Normal Case 1 round trip Client Sequencer Shard 1 Learner Replica Replica no coordination Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica
How to handle dropped messages? A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 T1 B1 (ABC) C1 C A1 T1 B1 (ABC) C1
How to handle dropped messages? A A1 A3 T3 T1 B1 (A) (ABC) C1 B A1 T1 B1 (ABC) C1 C A1 T1 B1 (ABC) C1
How to handle dropped messages? A A1 A3 T3 T1 B1 (A) (ABC) C1 B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 C A1 T1 B1 (ABC) C1
How to handle dropped messages? A A1 A3 T3 T1 B1 (A) (ABC) C1 B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 C A1 T1 B1 (ABC) C1
How to handle dropped messages? A A1 A3 T3 T1 B1 (A) (ABC) C1 B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 C A1 T1 B1 (ABC) C1
How to handle dropped messages? A A1 A3 T3 T1 B1 (A) (ABC) C1 B Global coordination problem A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 Failure Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 Received A2? DROP (A) (ABC) C1 B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 Failure Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 A2 Received A2? Received A2? T1 T2 B1 B2 (ABC) (AB) C1 Failure Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 A2 Received A2? T1 T2 B1 B2 (ABC) (AB) C1 Failure Coordinator C A1 Received A2? T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 A2 A2 T1 T2 T2 B1 B2 B2 (ABC) (AB) (AB) C1 Failure Coordinator C A1 T1 B1 Not Found (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 A2 A2 T1 T2 T2 B1 B2 B2 (ABC) (AB) (AB) C1 Failure Not Found Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 A2 B1 DROP T2 (A) (ABC) B2 C1 (AB) B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 Failure Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 A2 T3 T1 T2 B1 B2 (A) (ABC) (AB) C1 B A1 A2 T1 T2 B1 B2 (ABC) (AB) C1 Failure Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 T1 B1 Received A2? (ABC) C1 Failure Coordinator C A1 T1 B1 Received A2? (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 T1 B1 Not Found (ABC) C1 Failure Coordinator C A1 T1 B1 Not Found (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP (A) (ABC) C1 B A1 T1 B1 Not Found (ABC) C1 Failure Not Found Coordinator C A1 T1 B1 (ABC) C1
The Failure Coordinator A A1 A3 T3 T1 B1 DROP Drop A2 (A) (ABC) C1 B A1 T1 B1 Drop A2 (ABC) C1 Failure Coordinator C A1 T1 B1 Drop A2 (ABC) C1
The Failure Coordinator A A1 A3 NO T3 T1 B1 Drop A2 OP (A) (ABC) C1 B A1 T1 B1 Drop A2 (ABC) C1 Failure Coordinator C A1 T1 B1 Drop A2 (ABC) C1
The Failure Coordinator A A1 A3 NO T3 T1 B1 Drop A2 OP (A) (ABC) C1 Drops: A2 B A1 T1 B1 Drop A2 (ABC) C1 Failure Drops: A2 Coordinator C A1 T1 B1 Drop A2 (ABC) C1
Designated Learner and Sequencer Failures Designated learner (DL) failure: • View change based protocol • Ensures new DL learns all committed transactions from previous views Sequencer failure: • Higher epoch number from the new sequencer • Epoch change ensures all replicas across all shards start the new epoch in consistent states
Can we process non-independent transactions efficiently?
Can we process non-independent transactions efficiently? Yes, by dividing them into multiple independent transactions (See the paper!)
Outline 1. Introduction 2. In-Network Concurrency Control 3. Transaction Model 4. Eris Protocol 5. Evaluation
Evaluation Setup • 3-level fat-tree topology testbed • 15 shards, 3 replicas per shard • 2.5 GHz Intel Xeon E5-2680 servers • Middlebox sequencer implementation using Cavium Octeon CN6880 • YCSB+T and TPC-C workloads
Comparison Systems • Lock-Store (2PC + 2PL + Paxos) • TAPIR [SOSP ’15] • Granola [ATC ‘12] • Non-transactional, unreplicated (NT-UR)
Eris performs well on independent transactions Distributed independent transactions 1,200K Throughput (txns/sec) 900K 600K 300K 0K Eris Lock-Store TAPIR Granola NT-UR
Eris performs well on independent transactions Distributed independent transactions 1,200K Throughput (txns/sec) 900K Eris outperforms Lock-Store, TAPIR and 600K Granola by more than 3X 300K 0K Eris Lock-Store TAPIR Granola NT-UR
Eris performs well on independent transactions Distributed independent transactions 1,200K Eris achieves Throughput (txns/sec) throughput within 10% of NT-UR 900K Eris outperforms Lock-Store, TAPIR and 600K Granola by more than 3X 300K 0K Eris Lock-Store TAPIR Granola NT-UR
Recommend
More recommend