Your SlideShare is downloading. ×
ACIDic Clusters: Review of current relation databases with synchronous replication
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

ACIDic Clusters: Review of current relation databases with synchronous replication

698
views

Published on

These are the slides from the talk given at Percona Live 2014 MySQL Conference and Expo (PLMCE): …

These are the slides from the talk given at Percona Live 2014 MySQL Conference and Expo (PLMCE): http://www.percona.com/live/mysql-conference-2014/sessions/acidic-clusters-review-current-relational-databases-synchronous-replication

Published in: Engineering, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
698
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ACIDic Clusters Review of current relational databases with synchronous replication. Raghavendra Prabhu raghavendra.prabhu@percona.com Percona LLC 2nd April, 2014 Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  • 2. Outline 1 Introduction Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  • 3. Outline 1 Introduction 2 Review Architecture Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  • 4. Outline 1 Introduction 2 Review Architecture 3 Epilogue Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  • 5. Introduction Introduction A twist on CAP Pick any Two? ACID Relational Database Synchronous replication Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 2 / 29
  • 6. Introduction Introduction A twist on CAP Pick any Two? ACID Relational Database Synchronous replication Solution: Don’t have to pick Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 2 / 29
  • 7. Introduction Introduction A twist on CAP Pick any Two? ACID Relational Database Synchronous replication Solution: Don’t have to pick Interdependency CAP and latency Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 2 / 29
  • 8. Introduction RAS Why Synchronous Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 9. Introduction RAS Why Synchronous Symmetry Easier to manage and conceive Build once, deploy everywhere! Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 10. Introduction RAS Why Synchronous Symmetry Easier to manage and conceive Build once, deploy everywhere! Latency! Do we need ACID? Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 11. Introduction RAS Why Synchronous Symmetry Easier to manage and conceive Build once, deploy everywhere! Latency! Do we need ACID? Depends! Concurrent workload Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 12. Introduction RAS Why Synchronous Symmetry Easier to manage and conceive Build once, deploy everywhere! Latency! Do we need ACID? Depends! Concurrent workload Relational database Can it be a KV/document store? Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 13. Introduction RAS Why Synchronous Symmetry Easier to manage and conceive Build once, deploy everywhere! Latency! Do we need ACID? Depends! Concurrent workload Relational database Can it be a KV/document store? Everyone wants SQL though. Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 14. Introduction RAS Why Synchronous Symmetry Easier to manage and conceive Build once, deploy everywhere! Latency! Do we need ACID? Depends! Concurrent workload Relational database Can it be a KV/document store? Everyone wants SQL though. Beats every other API! Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  • 15. Review Contemporary systems PXC/Galera NDB Cluster Google F1 Others - PostGreSQL, VoltDB, FoundationDB Not talking of comparisons/benchmarks. Apples and Pineapples! (Since they are all clusters) Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 4 / 29
  • 16. Review Family of Synchronous Systems Transactional replication Overhead and workarounds One-copy equivalence NDB: 2 PC Virtual Synchrony Extended Virtual Synchrony: Galera Multi-phase Paxos: Google F1 Also 2PC Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 5 / 29
  • 17. Review Architecture Layers Necessity Strengths Degrees of freedom Monolithic v/s Layered Monolithic - Galera Layered - F1/Spanner, NDB(?) Implications Failures Debugging Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 6 / 29
  • 18. Review Architecture Storage Unbundling of translation and data Different strategies Spanner CFS underneath Provides guarantees in replication Makes it more of a binary system Hierarchical storage NDB Separatation of data and management nodes Still a storage engine Hybrid storage Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 7 / 29
  • 19. Review Architecture Storage WSREP Plugin system for Galera Provider Provides the storage - InnoDB More tightly bound In-memory and ring-buffers Transaction awareness Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 8 / 29
  • 20. Review Architecture Storage Statelessness Virtual Synchrony Causality Loose/Tight Binding Consequences Co-ordination issue Flexibility Transitive support of features Uncoupled relation Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 9 / 29
  • 21. Review Architecture Relational Database NoSQL / NewSQL / OldSQL New wine in old bottle? Approach of NewSQL and SQL wrt. ACIDity. Pros and Cons Does it fit Does NoSQL meet RAS Adventures with eventual consistency Strict definitions of it Instrumentation Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 10 / 29
  • 22. Review Architecture Relational Database Role of API Presence of Layer Nature of storage API defines data model? NoSQL access to SQL ORM Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 11 / 29
  • 23. Review Architecture Degree of Synchronicity Latency is a killer! Amortization of latency Does Synchronicity imply Causality? Commutative writesets Role of Applications/Architecture Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 12 / 29
  • 24. Review Architecture ACIDity ACIDity test? MVCC Strong relation with Synchronous Replication Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 13 / 29
  • 25. Review Architecture ACIDity Does ACID require synchronous OR Does Synchronous demand ACIDity? Reconciliation requires it. Can be very expensive without it. Rollbacks need to be handled correctly. Cost of this. is ACID possible without Relational semantics? Can filesystems with replication work without substrate of ACID database? Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 14 / 29
  • 26. Review Architecture Locking Optimistic Concurrency Reduce communication WWW/HTTP Software Transactional Memory Lock elision More natural to Databases Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 15 / 29
  • 27. Review Architecture Locking Conflicts and Deadlocks Limiting factor: Amdahl’s Scales with number of nodes and size of transactions => Not linearly - quadratic and quinary in some cases => Cannot be strictly bound - other factors => Only a strict lower bound Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 16 / 29
  • 28. Review Architecture Locking Pessimistic Locking Performance Network Overhead More roundtrips Pipeline/Batching Hybrid approach Switching Granularity of Locking Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 17 / 29
  • 29. Review Architecture Locking Externalities GPS clock - Google F1 Controlled conditions Limitations Lock Managers: Zookeeper, Chubby Lamport timestamps! A Zeitgeiber! Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 18 / 29
  • 30. Review Architecture Integration Scaling the system upwards Composable Transactions XA Support Extensibility Adding other storage engines: PSA Geographic Replication Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 19 / 29
  • 31. Review Architecture Sharding Systems that support it Issues of Quorum Adding support externally Spider Engine Cluster of clusters MySQL Fabric? Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 20 / 29
  • 32. Review Architecture Transition From single node to a cluster Idempotency of transactions Change of mind Integration with Async replication Loss of key parts Degree of ACIDity Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 21 / 29
  • 33. Review Architecture Operational usage Resource Manager Moving parts Reduces the confusion Backups Impact on cluster operations Logical backups Physical backups NoSQL interface Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 22 / 29
  • 34. Review Architecture Operational usage Integration with other HA Load balancers and Proxies Fencing / STONITH Resource Managers Pacemaker Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 23 / 29
  • 35. Review Architecture Qualitative Analysis Active analysis System-centric Convergence time Passive analysis Distributed tracing Dangling reads Client-centric Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 24 / 29
  • 36. Review Architecture Qualitative Analysis Guarantees Latency and staleness Monotonic reads Causality k|delta - atomicity Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 25 / 29
  • 37. Epilogue Limitations None! Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 26 / 29
  • 38. Epilogue Limitations None! Silver bullet? Where you may want Async Where delay can help Schema changes Compromise on strictness/features Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 26 / 29
  • 39. Epilogue Further Reading Is this a solved problem? Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 27 / 29
  • 40. Epilogue Further Reading Is this a solved problem? May be not. The Dangers of Replication and a Solution Replication Using Group Communication Over a Partitioned Network Transaction Processing: Concepts and Techniques F1: A Distributed SQL Database That Scales Eventually Consistent: Not What You Were Expecting? The Layer Concept Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 27 / 29
  • 41. Epilogue Related Talks Percona XtraDB Cluster / Galera in Practice - 2014 edition F1: Google’s Next Generation RDBMS Galera Cluster New Features Write Conflicts in Multi-Master Replication Topologies Migrate an infrastructure to Galera Cluster Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 28 / 29
  • 42. Epilogue Summary Questions Theories Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 29 / 29