Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ACIDic Clusters
Review of current relational databases with synchronous replication.
Raghavendra Prabhu
raghavendra.prabhu...
Outline
1 Introduction
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
Outline
1 Introduction
2 Review
Architecture
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
Outline
1 Introduction
2 Review
Architecture
3 Epilogue
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
Introduction
Introduction
A twist on CAP
Pick any Two?
ACID
Relational Database
Synchronous replication
Raghavendra Prabhu...
Introduction
Introduction
A twist on CAP
Pick any Two?
ACID
Relational Database
Synchronous replication
Solution: Don’t ha...
Introduction
Introduction
A twist on CAP
Pick any Two?
ACID
Relational Database
Synchronous replication
Solution: Don’t ha...
Introduction
RAS
Why Synchronous
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
Introduction
RAS
Why Synchronous
Symmetry
Easier to manage and conceive
Build once, deploy everywhere!
Raghavendra Prabhu ...
Introduction
RAS
Why Synchronous
Symmetry
Easier to manage and conceive
Build once, deploy everywhere!
Latency!
Do we need...
Introduction
RAS
Why Synchronous
Symmetry
Easier to manage and conceive
Build once, deploy everywhere!
Latency!
Do we need...
Introduction
RAS
Why Synchronous
Symmetry
Easier to manage and conceive
Build once, deploy everywhere!
Latency!
Do we need...
Introduction
RAS
Why Synchronous
Symmetry
Easier to manage and conceive
Build once, deploy everywhere!
Latency!
Do we need...
Introduction
RAS
Why Synchronous
Symmetry
Easier to manage and conceive
Build once, deploy everywhere!
Latency!
Do we need...
Review
Contemporary systems
PXC/Galera
NDB Cluster
Google F1
Others - PostGreSQL, VoltDB, FoundationDB
Not talking of comp...
Review
Family of Synchronous Systems
Transactional replication
Overhead and workarounds
One-copy equivalence
NDB: 2 PC
Vir...
Review Architecture
Layers
Necessity
Strengths
Degrees of freedom
Monolithic v/s Layered
Monolithic - Galera
Layered - F1/...
Review Architecture
Storage
Unbundling of translation and data
Different strategies
Spanner
CFS underneath
Provides guarant...
Review Architecture
Storage
WSREP
Plugin system for Galera Provider
Provides the storage - InnoDB
More tightly bound
In-me...
Review Architecture
Storage
Statelessness
Virtual Synchrony
Causality
Loose/Tight Binding
Consequences
Co-ordination issue...
Review Architecture
Relational Database
NoSQL / NewSQL / OldSQL
New wine in old bottle?
Approach of NewSQL and SQL wrt. AC...
Review Architecture
Relational Database
Role of API
Presence of Layer
Nature of storage
API defines data model?
NoSQL acces...
Review Architecture
Degree of Synchronicity
Latency is a killer!
Amortization of latency
Does Synchronicity imply Causalit...
Review Architecture
ACIDity
ACIDity test?
MVCC
Strong relation with Synchronous Replication
Raghavendra Prabhu (Percona) A...
Review Architecture
ACIDity
Does ACID require synchronous OR
Does Synchronous demand ACIDity?
Reconciliation requires it.
...
Review Architecture
Locking
Optimistic Concurrency
Reduce communication
WWW/HTTP
Software Transactional Memory
Lock elisio...
Review Architecture
Locking
Conflicts and Deadlocks
Limiting factor: Amdahl’s
Scales with number of nodes and size of trans...
Review Architecture
Locking
Pessimistic Locking
Performance
Network Overhead
More roundtrips
Pipeline/Batching
Hybrid appr...
Review Architecture
Locking
Externalities
GPS clock - Google F1
Controlled conditions
Limitations
Lock Managers: Zookeeper...
Review Architecture
Integration
Scaling the system upwards
Composable Transactions
XA Support
Extensibility
Adding other s...
Review Architecture
Sharding
Systems that support it
Issues of Quorum
Adding support externally
Spider Engine
Cluster of c...
Review Architecture
Transition
From single node to a cluster
Idempotency of transactions
Change of mind
Integration with A...
Review Architecture
Operational usage
Resource Manager
Moving parts
Reduces the confusion
Backups
Impact on cluster operat...
Review Architecture
Operational usage
Integration with other HA
Load balancers and Proxies
Fencing / STONITH
Resource Mana...
Review Architecture
Qualitative Analysis
Active analysis
System-centric
Convergence time
Passive analysis
Distributed trac...
Review Architecture
Qualitative Analysis
Guarantees
Latency and staleness
Monotonic reads
Causality
k|delta - atomicity
Ra...
Epilogue
Limitations
None!
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 26 / 29
Epilogue
Limitations
None!
Silver bullet?
Where you may want Async
Where delay can help
Schema changes
Compromise on stric...
Epilogue
Further Reading
Is this a solved problem?
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 27 / 29
Epilogue
Further Reading
Is this a solved problem? May be not.
The Dangers of Replication and a Solution
Replication Using...
Epilogue
Related Talks
Percona XtraDB Cluster / Galera in Practice - 2014 edition
F1: Google’s Next Generation RDBMS
Galer...
Epilogue
Summary
Questions
Theories
Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 29 / 29
Upcoming SlideShare
Loading in …5
×

of

ACIDic Clusters: Review of current relation databases with synchronous replication Slide 1 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 2 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 3 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 4 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 5 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 6 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 7 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 8 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 9 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 10 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 11 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 12 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 13 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 14 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 15 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 16 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 17 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 18 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 19 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 20 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 21 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 22 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 23 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 24 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 25 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 26 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 27 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 28 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 29 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 30 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 31 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 32 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 33 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 34 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 35 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 36 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 37 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 38 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 39 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 40 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 41 ACIDic Clusters: Review of current relation databases with synchronous replication Slide 42
Upcoming SlideShare
Bark and Co Solicitors London: The Firm, bark & co solicitors, giles bark jones, fred bunn, about bark & co solicitors london, legal 500 firms profile
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

ACIDic Clusters: Review of current relation databases with synchronous replication

Download to read offline

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

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

ACIDic Clusters: Review of current relation databases with synchronous replication

  1. 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. 2. Outline 1 Introduction Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  3. 3. Outline 1 Introduction 2 Review Architecture Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  4. 4. Outline 1 Introduction 2 Review Architecture 3 Epilogue Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 1 / 29
  5. 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. 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. 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. 8. Introduction RAS Why Synchronous Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 3 / 29
  9. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 24. Review Architecture ACIDity ACIDity test? MVCC Strong relation with Synchronous Replication Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 13 / 29
  25. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 37. Epilogue Limitations None! Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 26 / 29
  38. 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. 39. Epilogue Further Reading Is this a solved problem? Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 27 / 29
  40. 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. 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. 42. Epilogue Summary Questions Theories Raghavendra Prabhu (Percona) ACIDic Clusters 2nd April, 2014 29 / 29

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

Views

Total views

1,561

On Slideshare

0

From embeds

0

Number of embeds

725

Actions

Downloads

9

Shares

0

Comments

0

Likes

0

×