eris coordination free consistent transactions using in
play

Eris: Coordination-Free Consistent Transactions Using In-Network - PowerPoint PPT Presentation

Eris: Coordination-Free Consistent Transactions Using In-Network Concurrency Control Jialin Li, Ellis Michael, Dan R. K. Ports Web services and applications rely on distributed storage systems Web services and applications rely on distributed


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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 ?

  7. Outline 1. Introduction 2. In-Network Concurrency Control 3. Transaction Model 4. Eris Protocol 5. Evaluation

  8. Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  9. Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  10. Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  11. Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  12. Normal Case Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  13. Normal Case 1 round trip Client Sequencer Shard 1 Learner Replica Replica Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  14. Normal Case 1 round trip Client Sequencer Shard 1 Learner Replica Replica no coordination Shard 2 Learner Replica Replica Shard 3 Learner Replica Replica

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. 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

  30. 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

  31. 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

  32. 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

  33. 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

  34. 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

  35. 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

  36. Can we process non-independent transactions efficiently?

  37. Can we process non-independent transactions efficiently? Yes, by dividing them into multiple independent transactions (See the paper!)

  38. Outline 1. Introduction 2. In-Network Concurrency Control 3. Transaction Model 4. Eris Protocol 5. Evaluation

  39. 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

  40. Comparison Systems • Lock-Store (2PC + 2PL + Paxos) • TAPIR [SOSP ’15] • Granola [ATC ‘12] • Non-transactional, unreplicated (NT-UR)

  41. 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

  42. 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

  43. 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