SlideShare a Scribd company logo
MARIADB
Clustrix Overview
Robbie Mihalyi Matthew White Peter Friedenbach
VP Engineering – Clustrix Director of Engineering Performance Architect
Scaling
Application
Scaling
 Scales Capacity
 Provides Fault Tolerance
 Dynamic and Flexible
DBMS Server
Load Balancer
Clustrix Scaling
 Scales Reads & Writes
 Provides Fault Tolerance
 Dynamic and Flexible
Clustrix
Load Balancer
MaxScale
SCALE-OUT RDBMS: CLUSTRIX
● Built from the ground-up - Shared nothing architecture
● All nodes are equal – any node can accept connections and can Read / Write
● Fine grained data distribution with data protection – built-in fault tolerance
● Distributed parallel query execution
SCALE-OUT RDBMS: CLUSTRIX
● To the application it looks like one Database System
● DDL and DML SQL statements are MySQL/MariaDB compatible
○ MySQL/MariaDB data types (including JSON support)
○ Referential integrity
○ Transactions – ACID compliant
○ Triggers and Stored Procedures
○ Complex Joins
SCALE-OUT RDBMS: CLUSTRIX
● Administration Features and Capabilities
○ On-line Schema changes
○ Replication
○ On-line Backup / Restore
● Multi-zone scale and availability
MARIADB
Clustrix Technology
Matthew White
Director of Engineering - Clustrix
MariaDB Corporation
Clustrix Technology
DATA DISTRIBUTION
Terminology - REPRESENTATION
26
BASE REPRESENTATION
Primary Key
ID col1 col2 col3
1 16 36 JANUARY
2 17 35 FEBRUARY
3 18 34 MARCH
4 19 33 APRIL
5 20 32 MAY
K1 REP
Index (col2)
col2 ID
32 5
33 4
34 3
35 2
36 1
K2 REP
Index col(3, 1)
col3 col1 ID
APRIL 19 4
FEBRUARY 17 2
JANUARY 16 1
MARCH 18 3
MAY 20 5
Terminology - SLICES
Slicing
● Each representation is split into slices
● The hash of keys mapped to slices
● Distribute representations independently
Independent Key Distribution
● Adapts to diverse access patterns
● Allows for broader range query evaluation
● Query plans scale with node count
Terminology - REPLICAS
Fault Tolerance
● Each slice has one or more copies
○ One node will never contain two replicas for the
same slice
● Replicas created on-line without blocking writes
● Default replicas is 2
● Can have replicas = number of nodes
○ Great for read-heavy tables
● Support for Availability Zones
ClustrixDB
S1 S2
S2
S3
S3
S4
S4
S5
S5
Dynamic Data Distribution
● Tables auto-split into slices
● Every slice has a replica on another node
○ Slices are auto distributed, auto-protected
S1
BillionsofRows
Database
Tables
ClustrixDB
S1
S2
S3
S3
S4
S4
S5
Adding Nodes – Flex Up
● Easy and simple Flex Up & Flex Down
○ Single minimal interruption of service
● Data is automatically rebalanced across the cluster
○ Tables are online for reads & writes
● All servers handle writes + reads
○ Workload is spread across more servers after Flex Up
ClustrixDB Overview 30
S1
ClustrixDB
S2
S5
ClustrixDB
S2
S5
S1
S2
S3
S3
S4
S4
S5
Loss of a Node – Automatic Fault Tolerance
● ClustrixDB detects the loss of a node
○ System automatically re-protects
○ Data is automatically redistributed
● Slices lost on the failed node are rapidly re-protected
○ Re-protection while tables are available for reads & writes
● Automated self-healing
○ After re-protect the cluster is fully protected and operational
ClustrixDB Overview 31
S1
ClustrixDB
S2
S5
S2
S5
Complexity Simplified
Q: How do you ensure data stays well distributed in a clustered environment?
• Initial Data Distributes the data into even slices across nodes
• Failed Nodes Re-protects slices to ensure proper replicas exist
• Data Growth Splits large slices into smaller slices
• Flex-Up/Flex-Down Moves slices to leverage new nodes and/or evacuate nodes
• Skewed Data Re-distributes the data to even out across nodes
• Hot Slice Balancing Finds hot slices and balances then across nodes
• Availability Zone Support Rebalancer will distribute replicas across zones
…while the DB stays open for reads & writesPatent 8,543,538
Patent 8,554,726
A: You let the REBALANCER handle it!
Clustrix Technology
QUERY PROCESSING
Query Processing Model
SQL-based
Applications
HW or SW Load
Balancer
● Load balancer spreads DB connections to all nodes
● A session is established on any node
● Session controls query execution
 Parse
 Plan
 Compile
UPDATE users
SET online = 1
WHERE id = 8797;
Session
VM VM
ID: 8797 |…| ONLINE:0
Fragment
VM
Query Processing Model
SQL-based
Applications
HW or SW Load
Balancer
● Load balancer spreads DB connections to all nodes
● A session is established on any node
● Session controls query execution
○ Parse SQL
○ Generate the execution plan
○ Compile into fragments
○ Start the execution of initial fragment
○ Send fragments
○ Coordinate transaction completion
GTM
UPDATE users
SET online = 1
WHERE id = 8797;
Session
VM VM
ID: 8797 |…| ONLINE:1 ID: 8797 |…| ONLINE:1
Commit Commit
Commit
VM
Parallel Query Processing
SQL-based
Applications
HW or SW Load
Balancer
VM VM
SELECT SUM(amount)
FROM donations;
 Parse
 Plan
 Compile
Session
VM
● Load balancer spreads DB connections to all nodes
● A session is established on any node
● Session controls query execution
○ Parse SQL
○ Generate the execution plan
○ Compile into fragments
○ Lookup record(s) location
○ Send fragments
○ Coordinate transaction completion
● Aggregate in parallel on all nodes
FragmentFragment
Parallel Query Processing
SQL-based
Applications
VM VM
Session
VM
● Load balancer spreads DB connections to all nodes
● A session is established on any node
● Session controls query execution
○ Parse SQL
○ Generate the execution plan
○ Compile into fragments
○ Lookup record(s) location
○ Send fragments
○ Coordinate transaction completion
● Aggregate in parallel on all nodes
AGGREGATE
LOCALLY
AGGREGATE
LOCALLY
AGGREGATE
LOCALLY
AGGREGATE
RESULTS
SELECT SUM(amount)
FROM donations;
HW or SW Load
Balancer
Clustrix Technology
ADMINISTRATION
Table
Online Schema Change
● Allows reads & writes during
ALTER TABLE operations
Table
QueueQueueQueue
MYTABLE __building_MYTABLE
Atomic Flip
Reads & Writes
ALTER TABLE mytable ADD (foo int);
 Queue is created to track changes
 Table is copied with new column
 Queues are applied to new copy until empty
 Atomic flip to new table
Table
Online Schema Change
● Allows reads & writes during
ALTER TABLE operations
Table
MYTABLE__retiring_MYTABLE
Atomic Flip
Reads & Writes
ALTER TABLE mytable ADD (foo int);

 Queue is created to track changes
 Table is copied with new column
 Queues are applied to new copy until empty
 Atomic flip to new table
 Original table is deleted
Backup, Replication & Disaster Recovery
Asynchronous multi-point Replication
ClustrixDB
Parallel Backup
Replicate to any cloud, any datacenter, anywhere
ClustrixGUI: Performance Monitoring
MARIADB
Clustrix Live Demo
Peter Friedenbach
Performance Architect
MariaDB Corporation
THANK YOU!

More Related Content

What's hot

What's hot (20)

Auto Europe's ongoing journey with MariaDB and open source
Auto Europe's ongoing journey with MariaDB and open sourceAuto Europe's ongoing journey with MariaDB and open source
Auto Europe's ongoing journey with MariaDB and open source
 
Configuring workload-based storage and topologies
Configuring workload-based storage and topologiesConfiguring workload-based storage and topologies
Configuring workload-based storage and topologies
 
The architecture of SkySQL
The architecture of SkySQLThe architecture of SkySQL
The architecture of SkySQL
 
Scylla Summit 2016: Why Kenshoo is about to displace Cassandra with Scylla
Scylla Summit 2016: Why Kenshoo is about to displace Cassandra with ScyllaScylla Summit 2016: Why Kenshoo is about to displace Cassandra with Scylla
Scylla Summit 2016: Why Kenshoo is about to displace Cassandra with Scylla
 
How Pixid dropped Oracle and went hybrid with MariaDB
How Pixid dropped Oracle and went hybrid with MariaDBHow Pixid dropped Oracle and went hybrid with MariaDB
How Pixid dropped Oracle and went hybrid with MariaDB
 
How QBerg scaled to store data longer, query it faster
How QBerg scaled to store data longer, query it fasterHow QBerg scaled to store data longer, query it faster
How QBerg scaled to store data longer, query it faster
 
CCV: migrating our payment processing system to MariaDB
CCV: migrating our payment processing system to MariaDBCCV: migrating our payment processing system to MariaDB
CCV: migrating our payment processing system to MariaDB
 
Scylla Summit 2016: ScyllaDB, Present and Future
Scylla Summit 2016: ScyllaDB, Present and FutureScylla Summit 2016: ScyllaDB, Present and Future
Scylla Summit 2016: ScyllaDB, Present and Future
 
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
Scylla Summit 2022: How ScyllaDB Powers This Next Tech CycleScylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
 
What to expect from MariaDB Platform X5, part 1
What to expect from MariaDB Platform X5, part 1What to expect from MariaDB Platform X5, part 1
What to expect from MariaDB Platform X5, part 1
 
Cisco: Cassandra adoption on Cisco UCS & OpenStack
Cisco: Cassandra adoption on Cisco UCS & OpenStackCisco: Cassandra adoption on Cisco UCS & OpenStack
Cisco: Cassandra adoption on Cisco UCS & OpenStack
 
MariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introduction
 
How Orwell built a geo-distributed Bank-as-a-Service with microservices
How Orwell built a geo-distributed Bank-as-a-Service with microservicesHow Orwell built a geo-distributed Bank-as-a-Service with microservices
How Orwell built a geo-distributed Bank-as-a-Service with microservices
 
Writing powerful stored procedures in PL/SQL
Writing powerful stored procedures in PL/SQLWriting powerful stored procedures in PL/SQL
Writing powerful stored procedures in PL/SQL
 
Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?
 
What to expect from MariaDB Platform X5, part 2
What to expect from MariaDB Platform X5, part 2What to expect from MariaDB Platform X5, part 2
What to expect from MariaDB Platform X5, part 2
 
Introducing the ultimate MariaDB cloud, SkySQL
Introducing the ultimate MariaDB cloud, SkySQLIntroducing the ultimate MariaDB cloud, SkySQL
Introducing the ultimate MariaDB cloud, SkySQL
 
Shift: Real World Migration from MongoDB to Cassandra
Shift: Real World Migration from MongoDB to CassandraShift: Real World Migration from MongoDB to Cassandra
Shift: Real World Migration from MongoDB to Cassandra
 
Introducing workload analysis
Introducing workload analysisIntroducing workload analysis
Introducing workload analysis
 
Under the hood: SkySQL monitoring
Under the hood: SkySQL monitoringUnder the hood: SkySQL monitoring
Under the hood: SkySQL monitoring
 

Similar to ClustrixDB: how distributed databases scale out

Similar to ClustrixDB: how distributed databases scale out (20)

Introduction to ClustrixDB
Introduction to ClustrixDBIntroduction to ClustrixDB
Introduction to ClustrixDB
 
Modeling Data and Queries for Wide Column NoSQL
Modeling Data and Queries for Wide Column NoSQLModeling Data and Queries for Wide Column NoSQL
Modeling Data and Queries for Wide Column NoSQL
 
Introduction to Postrges-XC
Introduction to Postrges-XCIntroduction to Postrges-XC
Introduction to Postrges-XC
 
The Hows and Whys of a Distributed SQL Database - Strange Loop 2017
The Hows and Whys of a Distributed SQL Database - Strange Loop 2017The Hows and Whys of a Distributed SQL Database - Strange Loop 2017
The Hows and Whys of a Distributed SQL Database - Strange Loop 2017
 
Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019
 
An Introduction to Apache Cassandra
An Introduction to Apache CassandraAn Introduction to Apache Cassandra
An Introduction to Apache Cassandra
 
Cassandra
CassandraCassandra
Cassandra
 
NewSQL - The Future of Databases?
NewSQL - The Future of Databases?NewSQL - The Future of Databases?
NewSQL - The Future of Databases?
 
BigData Developers MeetUp
BigData Developers MeetUpBigData Developers MeetUp
BigData Developers MeetUp
 
MongoDB 4.0 새로운 기능 소개
MongoDB 4.0 새로운 기능 소개MongoDB 4.0 새로운 기능 소개
MongoDB 4.0 새로운 기능 소개
 
MySQL NDB Cluster 8.0
MySQL NDB Cluster 8.0MySQL NDB Cluster 8.0
MySQL NDB Cluster 8.0
 
Database Architecture & Scaling Strategies, in the Cloud & on the Rack
Database Architecture & Scaling Strategies, in the Cloud & on the Rack Database Architecture & Scaling Strategies, in the Cloud & on the Rack
Database Architecture & Scaling Strategies, in the Cloud & on the Rack
 
MySQL NDB Cluster 101
MySQL NDB Cluster 101MySQL NDB Cluster 101
MySQL NDB Cluster 101
 
Tech Talk Series, Part 2: Why is sharding not smart to do in MySQL?
Tech Talk Series, Part 2: Why is sharding not smart to do in MySQL?Tech Talk Series, Part 2: Why is sharding not smart to do in MySQL?
Tech Talk Series, Part 2: Why is sharding not smart to do in MySQL?
 
Cassandra training
Cassandra trainingCassandra training
Cassandra training
 
Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep Dive
 
NewSQL - Deliverance from BASE and back to SQL and ACID
NewSQL - Deliverance from BASE and back to SQL and ACIDNewSQL - Deliverance from BASE and back to SQL and ACID
NewSQL - Deliverance from BASE and back to SQL and ACID
 
Azure CosmosDB the new frontier of big data and nosql
Azure CosmosDB the new frontier of big data and nosqlAzure CosmosDB the new frontier of big data and nosql
Azure CosmosDB the new frontier of big data and nosql
 
Change data capture
Change data captureChange data capture
Change data capture
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 

More from MariaDB plc

More from MariaDB plc (19)

MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - MaxScale 23.02.xMariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
 
MariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - NewpharmaMariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - Newpharma
 
MariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - CloudMariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - Cloud
 
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB EnterpriseMariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB Enterprise
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance Optimization
 
MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - MaxScale MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - MaxScale
 
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - novadys presentationMariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - novadys presentation
 
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentationMariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentation
 
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
 
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-BackupMariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
 
Einführung : MariaDB Tech und Business Update Hamburg 2023
Einführung : MariaDB Tech und Business Update Hamburg 2023Einführung : MariaDB Tech und Business Update Hamburg 2023
Einführung : MariaDB Tech und Business Update Hamburg 2023
 
Hochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDBHochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDB
 
Die Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise ServerDie Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise Server
 
Introducing the R2DBC async Java connector
Introducing the R2DBC async Java connectorIntroducing the R2DBC async Java connector
Introducing the R2DBC async Java connector
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBFaster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
 
What’s new in Galera 4
What’s new in Galera 4What’s new in Galera 4
What’s new in Galera 4
 
Beyond the basics: advanced SQL with MariaDB
Beyond the basics: advanced SQL with MariaDBBeyond the basics: advanced SQL with MariaDB
Beyond the basics: advanced SQL with MariaDB
 
Inside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at TencentInside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at Tencent
 
Migrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMigrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at Facebook
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Recently uploaded (20)

SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 

ClustrixDB: how distributed databases scale out

  • 1. MARIADB Clustrix Overview Robbie Mihalyi Matthew White Peter Friedenbach VP Engineering – Clustrix Director of Engineering Performance Architect
  • 3. Application Scaling  Scales Capacity  Provides Fault Tolerance  Dynamic and Flexible DBMS Server Load Balancer
  • 4. Clustrix Scaling  Scales Reads & Writes  Provides Fault Tolerance  Dynamic and Flexible Clustrix Load Balancer MaxScale
  • 5. SCALE-OUT RDBMS: CLUSTRIX ● Built from the ground-up - Shared nothing architecture ● All nodes are equal – any node can accept connections and can Read / Write ● Fine grained data distribution with data protection – built-in fault tolerance ● Distributed parallel query execution
  • 6. SCALE-OUT RDBMS: CLUSTRIX ● To the application it looks like one Database System ● DDL and DML SQL statements are MySQL/MariaDB compatible ○ MySQL/MariaDB data types (including JSON support) ○ Referential integrity ○ Transactions – ACID compliant ○ Triggers and Stored Procedures ○ Complex Joins
  • 7. SCALE-OUT RDBMS: CLUSTRIX ● Administration Features and Capabilities ○ On-line Schema changes ○ Replication ○ On-line Backup / Restore ● Multi-zone scale and availability
  • 8. MARIADB Clustrix Technology Matthew White Director of Engineering - Clustrix MariaDB Corporation
  • 10. Terminology - REPRESENTATION 26 BASE REPRESENTATION Primary Key ID col1 col2 col3 1 16 36 JANUARY 2 17 35 FEBRUARY 3 18 34 MARCH 4 19 33 APRIL 5 20 32 MAY K1 REP Index (col2) col2 ID 32 5 33 4 34 3 35 2 36 1 K2 REP Index col(3, 1) col3 col1 ID APRIL 19 4 FEBRUARY 17 2 JANUARY 16 1 MARCH 18 3 MAY 20 5
  • 11. Terminology - SLICES Slicing ● Each representation is split into slices ● The hash of keys mapped to slices ● Distribute representations independently Independent Key Distribution ● Adapts to diverse access patterns ● Allows for broader range query evaluation ● Query plans scale with node count
  • 12. Terminology - REPLICAS Fault Tolerance ● Each slice has one or more copies ○ One node will never contain two replicas for the same slice ● Replicas created on-line without blocking writes ● Default replicas is 2 ● Can have replicas = number of nodes ○ Great for read-heavy tables ● Support for Availability Zones
  • 13. ClustrixDB S1 S2 S2 S3 S3 S4 S4 S5 S5 Dynamic Data Distribution ● Tables auto-split into slices ● Every slice has a replica on another node ○ Slices are auto distributed, auto-protected S1 BillionsofRows Database Tables
  • 14. ClustrixDB S1 S2 S3 S3 S4 S4 S5 Adding Nodes – Flex Up ● Easy and simple Flex Up & Flex Down ○ Single minimal interruption of service ● Data is automatically rebalanced across the cluster ○ Tables are online for reads & writes ● All servers handle writes + reads ○ Workload is spread across more servers after Flex Up ClustrixDB Overview 30 S1 ClustrixDB S2 S5
  • 15. ClustrixDB S2 S5 S1 S2 S3 S3 S4 S4 S5 Loss of a Node – Automatic Fault Tolerance ● ClustrixDB detects the loss of a node ○ System automatically re-protects ○ Data is automatically redistributed ● Slices lost on the failed node are rapidly re-protected ○ Re-protection while tables are available for reads & writes ● Automated self-healing ○ After re-protect the cluster is fully protected and operational ClustrixDB Overview 31 S1 ClustrixDB S2 S5 S2 S5
  • 16. Complexity Simplified Q: How do you ensure data stays well distributed in a clustered environment? • Initial Data Distributes the data into even slices across nodes • Failed Nodes Re-protects slices to ensure proper replicas exist • Data Growth Splits large slices into smaller slices • Flex-Up/Flex-Down Moves slices to leverage new nodes and/or evacuate nodes • Skewed Data Re-distributes the data to even out across nodes • Hot Slice Balancing Finds hot slices and balances then across nodes • Availability Zone Support Rebalancer will distribute replicas across zones …while the DB stays open for reads & writesPatent 8,543,538 Patent 8,554,726 A: You let the REBALANCER handle it!
  • 18. Query Processing Model SQL-based Applications HW or SW Load Balancer ● Load balancer spreads DB connections to all nodes ● A session is established on any node ● Session controls query execution  Parse  Plan  Compile UPDATE users SET online = 1 WHERE id = 8797; Session VM VM ID: 8797 |…| ONLINE:0 Fragment VM
  • 19. Query Processing Model SQL-based Applications HW or SW Load Balancer ● Load balancer spreads DB connections to all nodes ● A session is established on any node ● Session controls query execution ○ Parse SQL ○ Generate the execution plan ○ Compile into fragments ○ Start the execution of initial fragment ○ Send fragments ○ Coordinate transaction completion GTM UPDATE users SET online = 1 WHERE id = 8797; Session VM VM ID: 8797 |…| ONLINE:1 ID: 8797 |…| ONLINE:1 Commit Commit Commit VM
  • 20. Parallel Query Processing SQL-based Applications HW or SW Load Balancer VM VM SELECT SUM(amount) FROM donations;  Parse  Plan  Compile Session VM ● Load balancer spreads DB connections to all nodes ● A session is established on any node ● Session controls query execution ○ Parse SQL ○ Generate the execution plan ○ Compile into fragments ○ Lookup record(s) location ○ Send fragments ○ Coordinate transaction completion ● Aggregate in parallel on all nodes FragmentFragment
  • 21. Parallel Query Processing SQL-based Applications VM VM Session VM ● Load balancer spreads DB connections to all nodes ● A session is established on any node ● Session controls query execution ○ Parse SQL ○ Generate the execution plan ○ Compile into fragments ○ Lookup record(s) location ○ Send fragments ○ Coordinate transaction completion ● Aggregate in parallel on all nodes AGGREGATE LOCALLY AGGREGATE LOCALLY AGGREGATE LOCALLY AGGREGATE RESULTS SELECT SUM(amount) FROM donations; HW or SW Load Balancer
  • 23. Table Online Schema Change ● Allows reads & writes during ALTER TABLE operations Table QueueQueueQueue MYTABLE __building_MYTABLE Atomic Flip Reads & Writes ALTER TABLE mytable ADD (foo int);  Queue is created to track changes  Table is copied with new column  Queues are applied to new copy until empty  Atomic flip to new table
  • 24. Table Online Schema Change ● Allows reads & writes during ALTER TABLE operations Table MYTABLE__retiring_MYTABLE Atomic Flip Reads & Writes ALTER TABLE mytable ADD (foo int);   Queue is created to track changes  Table is copied with new column  Queues are applied to new copy until empty  Atomic flip to new table  Original table is deleted
  • 25. Backup, Replication & Disaster Recovery Asynchronous multi-point Replication ClustrixDB Parallel Backup Replicate to any cloud, any datacenter, anywhere
  • 27. MARIADB Clustrix Live Demo Peter Friedenbach Performance Architect MariaDB Corporation

Editor's Notes

  1. Title Slide for OpenWorks
  2. Note that DB in MariaDB is not bolded
  3. Note that DB in MariaDB is not bolded
  4. Title Slide for OpenWorks
  5. Note that DB in MariaDB is not bolded
  6. Simple queries Fielded by any node Routed to data node Complex queries Split into query fragments Process fragments in parallel
  7. Simple queries Fielded by any node Routed to data node Complex queries Split into query fragments Process fragments in parallel
  8. Simple queries Fielded by any node Routed to data node Complex queries Split into query fragments Process fragments in parallel
  9. Note that DB in MariaDB is not bolded
  10. Note that DB in MariaDB is not bolded
  11. Clustrix support MySQL replication both as master and slave – so you can replicate both ways. Within a cluster we saw earlier that all data has multiple copies For Disaster Recovery (when a whole region loses power) Clustrix has 2 options Fast Parallel Backup – This is in addition to slower MySqlDump backup Fast Parallel Replication – This is asynchronous across two Clustrix Clusters
  12. Title Slide for OpenWorks
  13. OpenWorks End Slide