SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Kabilesh P R
Co-Founder, Mydbops
May 22nd, 2021
Mydbops Webinar 5
State Transfers With Galera
Interested in Open Source technologies
Building Solutions on MySQL, Cloud & MongoDB
Active Tech Speaker/Blogger 
AWS community Builder
Co-Founder, Mydbops
Kabilesh PR 
About Me
Consulting
Services
Managed
Services
Focuses on Top Opensource database MySQL,
MongoDB and PostgreSQL
Mydbops Services
400 + Clients In 4 Yrs. of Operations
Our Clients
Agenda
What is Galera ?
Highlights
State transfers
Galera .....
Open source replication plugin for synchronous and multi master
replication
Read and write can be made on any node
No complex failover solutions
What is Galera?
WSREP (Write Set REPlication) is an API to connect the Galera
library and control the characteristics of Galera
Implement Certificate based replication and multi master
replication
Galera replication
Node 3
Node 1 Node 2
Highlights .....
(State Transfer)
Synchronous Replication ( Virtually )
Parallel applier threads
Quorum based
Automatic node provisioning
Multi master writes
What is a state transfer ?
State transfer is a way in which the nodes in
clusters connect with each other and transfer
states(data) with each other to come in sync
with each other
When is state transfer needed ?
Network partitions
Node failures
Planned Maintanence
Node addition
Manual state transfers
Human err
Software failures (bug)
Transfer Methods
IST (Incremental State Transfer)
SST (State Snapshot Transfer)
Ports:
IST - 4568
SST - 4444
Incremental State transfer (IST)
As the name indicates it sync back with the incremental changes
from the last seen sequence number of its own(grastate.dat)
Gcache aka Ring Buffer files stores the recent write-set, based
on its size default 128MB
Larger the size of Gcache greater the chances for IST
IST less intrusive and fastest way of joining the node back to
group
Incremental State transfer (IST)
Node 1 Node 2
Donor
Joiner
Grastate.dat
Gcache
Gcache
Request to join
Seq.no=n+m
GTID: Seq.no
GroupID: Seqno
Seq.no=n
Node 1 Node 2
Donor
Joiner
Gcache Gcache
Seq.no=n+m
}
Send IST Events
Grastate.dat
Apply
GroupID: Seqno
Incremental State transfer (IST)
State Snapshot Transfer (SST)
State Snapshot Transfer (SST) is a way for Galera to
transfer a full data copy from an existing node (donor) to
a new node (joiner)
SST is slow and high performance impacting process
SST Method:
	 Mysqldump
	 RSYNC
	 Xtrabackup/Mariabackup
	 Clone(8.0.22)
Logical Transfer
Physical Transfer
Logical Transfer - Mysqldump
Least preferred method of state transfer because of the slowness(dump
restore)
Cause locking in Donor node
Independent of the environment comparing to other methods
Requires the receiving node to have a fully functional database
Needs root creds same as donor and accessibility
Work well for smaller dataset
Physical State Transfer
Transfers physical copy from donor to joiner
No working DB is needed, overwrites disk in joiner node
Physical transfers are usally faster(network)
Depends on the physical layout such as disk,storage engine
SST Method - RSYNC
Uses rsync method for physical transfer
Blocks the donor during copy
Donot require root DB access
Ability to have only change data copy with rsync-wan
(delta transfer algorithm)
Recommended to have same version at both ends
wsrep_sst_method = RSYNC
SST Method - Xtrabackup
Most recommended and popular method
Virtually non-blocking on donor except for MyISAM table
Resource utilisation may go high in donor
Recommended to have exact same version in source
and destination
wsrep_sst_auth = <wsrep_sst_user>:<password>
wsrep_sst_method = xtrabackup
SST Method - Clone
Available from 8.0.22 mysql and 10.5 Mariadb
Based on native clone plugin introduced in 8.0.17
Much faster than xtrabackup
Blocks donor on DDL
wsrep_sst_method=clone
wsrep_sst_auth=<admin user>:<admin password>
SST Methods comparision
Node2
Node1 Joiner
Application Application
Group Communication channel
SST Request
Wsrep_sst_method
Node request to Join
Node1 Donor
Joiner
Group Communication channel
Application Application
RSYNC
Xtrabackup
Clone
State Snapshot Transfer
SST Methods - Summary
Method Speed Blocks Donor Node Avail Type Root Access 
mysqldump slow Blocks Available Logical
 Donor and
Joiner
Rsync Faster Blocks Unavailable Physical  None
Xtrabackup Fast Briefly Unavailable Physical  Only Donor
Clone Fastset On DDL Unavailable Physical Only Donor
Reach Us : Info@mydbops.com
Thank You

Mais conteúdo relacionado

Mais procurados

PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
elliando dias
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
PostgreSQL-Consulting
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
Wagner Bianchi
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
Colin Charles
 

Mais procurados (20)

Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problems
 
Vacuum in PostgreSQL
Vacuum in PostgreSQLVacuum in PostgreSQL
Vacuum in PostgreSQL
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 
Introduction to Vacuum Freezing and XID
Introduction to Vacuum Freezing and XIDIntroduction to Vacuum Freezing and XID
Introduction to Vacuum Freezing and XID
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
MongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To TransactionsMongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To Transactions
 
Introduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparound
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
 
ProxySQL for MySQL
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQL
 
PGConf.ASIA 2017 Logical Replication Internals (English)
PGConf.ASIA 2017 Logical Replication Internals (English)PGConf.ASIA 2017 Logical Replication Internals (English)
PGConf.ASIA 2017 Logical Replication Internals (English)
 
MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 

Semelhante a State transfer With Galera

CS 542 Parallel DBs, NoSQL, MapReduce
CS 542 Parallel DBs, NoSQL, MapReduceCS 542 Parallel DBs, NoSQL, MapReduce
CS 542 Parallel DBs, NoSQL, MapReduce
J Singh
 
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
DataWorks Summit
 
Spinnaker VLDB 2011
Spinnaker VLDB 2011Spinnaker VLDB 2011
Spinnaker VLDB 2011
sandeep_tata
 
Postgresql_Replication.pptx
Postgresql_Replication.pptxPostgresql_Replication.pptx
Postgresql_Replication.pptx
StephenEfange3
 

Semelhante a State transfer With Galera (20)

eBay Cloud CMS based on NOSQL
eBay Cloud CMS based on NOSQLeBay Cloud CMS based on NOSQL
eBay Cloud CMS based on NOSQL
 
CS 542 Parallel DBs, NoSQL, MapReduce
CS 542 Parallel DBs, NoSQL, MapReduceCS 542 Parallel DBs, NoSQL, MapReduce
CS 542 Parallel DBs, NoSQL, MapReduce
 
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
 
Oracle Coherence
Oracle CoherenceOracle Coherence
Oracle Coherence
 
Talon systems - Distributed multi master replication strategy
Talon systems - Distributed multi master replication strategyTalon systems - Distributed multi master replication strategy
Talon systems - Distributed multi master replication strategy
 
MYSQL
MYSQLMYSQL
MYSQL
 
Spinnaker VLDB 2011
Spinnaker VLDB 2011Spinnaker VLDB 2011
Spinnaker VLDB 2011
 
Postgresql_Replication.pptx
Postgresql_Replication.pptxPostgresql_Replication.pptx
Postgresql_Replication.pptx
 
Parallel Processing (Part 2)
Parallel Processing (Part 2)Parallel Processing (Part 2)
Parallel Processing (Part 2)
 
Handling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsHandling Data in Mega Scale Systems
Handling Data in Mega Scale Systems
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability Methods
 
Neo4j 3.2 Launch
Neo4j 3.2 LaunchNeo4j 3.2 Launch
Neo4j 3.2 Launch
 
Migrating your Databases to Aurora - AWS April 2016 Webinar Series
Migrating your Databases to Aurora - AWS April 2016 Webinar Series Migrating your Databases to Aurora - AWS April 2016 Webinar Series
Migrating your Databases to Aurora - AWS April 2016 Webinar Series
 
Migrating your Databases to Amazon Aurora - AWS April 2016 Webinar Series
Migrating your Databases to Amazon Aurora - AWS April 2016 Webinar SeriesMigrating your Databases to Amazon Aurora - AWS April 2016 Webinar Series
Migrating your Databases to Amazon Aurora - AWS April 2016 Webinar Series
 
High Availability With InnoDB Clusters
High Availability With InnoDB ClustersHigh Availability With InnoDB Clusters
High Availability With InnoDB Clusters
 
Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?
 
Hadoop for Scientific Workloads__HadoopSummit2010
Hadoop for Scientific Workloads__HadoopSummit2010Hadoop for Scientific Workloads__HadoopSummit2010
Hadoop for Scientific Workloads__HadoopSummit2010
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
 
Presentation on Large Scale Data Management
Presentation on Large Scale Data ManagementPresentation on Large Scale Data Management
Presentation on Large Scale Data Management
 
NoSQL_Night
NoSQL_NightNoSQL_Night
NoSQL_Night
 

Mais de Mydbops

Efficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL ExplainEfficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL Explain
Mydbops
 

Mais de Mydbops (20)

Efficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL ExplainEfficient MySQL Indexing and what's new in MySQL Explain
Efficient MySQL Indexing and what's new in MySQL Explain
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
 
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
 
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
 
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventData-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
 
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQL
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDB
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificates
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQL
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

State transfer With Galera

  • 1. Kabilesh P R Co-Founder, Mydbops May 22nd, 2021 Mydbops Webinar 5 State Transfers With Galera
  • 2. Interested in Open Source technologies Building Solutions on MySQL, Cloud & MongoDB Active Tech Speaker/Blogger  AWS community Builder Co-Founder, Mydbops Kabilesh PR  About Me
  • 3. Consulting Services Managed Services Focuses on Top Opensource database MySQL, MongoDB and PostgreSQL Mydbops Services
  • 4. 400 + Clients In 4 Yrs. of Operations Our Clients
  • 5. Agenda What is Galera ? Highlights State transfers
  • 7. Open source replication plugin for synchronous and multi master replication Read and write can be made on any node No complex failover solutions What is Galera? WSREP (Write Set REPlication) is an API to connect the Galera library and control the characteristics of Galera Implement Certificate based replication and multi master replication
  • 10. (State Transfer) Synchronous Replication ( Virtually ) Parallel applier threads Quorum based Automatic node provisioning Multi master writes
  • 11. What is a state transfer ? State transfer is a way in which the nodes in clusters connect with each other and transfer states(data) with each other to come in sync with each other
  • 12. When is state transfer needed ? Network partitions Node failures Planned Maintanence Node addition Manual state transfers Human err Software failures (bug)
  • 13. Transfer Methods IST (Incremental State Transfer) SST (State Snapshot Transfer) Ports: IST - 4568 SST - 4444
  • 14. Incremental State transfer (IST) As the name indicates it sync back with the incremental changes from the last seen sequence number of its own(grastate.dat) Gcache aka Ring Buffer files stores the recent write-set, based on its size default 128MB Larger the size of Gcache greater the chances for IST IST less intrusive and fastest way of joining the node back to group
  • 15. Incremental State transfer (IST) Node 1 Node 2 Donor Joiner Grastate.dat Gcache Gcache Request to join Seq.no=n+m GTID: Seq.no GroupID: Seqno Seq.no=n
  • 16. Node 1 Node 2 Donor Joiner Gcache Gcache Seq.no=n+m } Send IST Events Grastate.dat Apply GroupID: Seqno Incremental State transfer (IST)
  • 17. State Snapshot Transfer (SST) State Snapshot Transfer (SST) is a way for Galera to transfer a full data copy from an existing node (donor) to a new node (joiner) SST is slow and high performance impacting process SST Method: Mysqldump RSYNC Xtrabackup/Mariabackup Clone(8.0.22) Logical Transfer Physical Transfer
  • 18. Logical Transfer - Mysqldump Least preferred method of state transfer because of the slowness(dump restore) Cause locking in Donor node Independent of the environment comparing to other methods Requires the receiving node to have a fully functional database Needs root creds same as donor and accessibility Work well for smaller dataset
  • 19. Physical State Transfer Transfers physical copy from donor to joiner No working DB is needed, overwrites disk in joiner node Physical transfers are usally faster(network) Depends on the physical layout such as disk,storage engine
  • 20. SST Method - RSYNC Uses rsync method for physical transfer Blocks the donor during copy Donot require root DB access Ability to have only change data copy with rsync-wan (delta transfer algorithm) Recommended to have same version at both ends wsrep_sst_method = RSYNC
  • 21. SST Method - Xtrabackup Most recommended and popular method Virtually non-blocking on donor except for MyISAM table Resource utilisation may go high in donor Recommended to have exact same version in source and destination wsrep_sst_auth = <wsrep_sst_user>:<password> wsrep_sst_method = xtrabackup
  • 22. SST Method - Clone Available from 8.0.22 mysql and 10.5 Mariadb Based on native clone plugin introduced in 8.0.17 Much faster than xtrabackup Blocks donor on DDL wsrep_sst_method=clone wsrep_sst_auth=<admin user>:<admin password>
  • 24. Node2 Node1 Joiner Application Application Group Communication channel SST Request Wsrep_sst_method Node request to Join
  • 25. Node1 Donor Joiner Group Communication channel Application Application RSYNC Xtrabackup Clone State Snapshot Transfer
  • 26. SST Methods - Summary Method Speed Blocks Donor Node Avail Type Root Access  mysqldump slow Blocks Available Logical  Donor and Joiner Rsync Faster Blocks Unavailable Physical  None Xtrabackup Fast Briefly Unavailable Physical  Only Donor Clone Fastset On DDL Unavailable Physical Only Donor
  • 27. Reach Us : Info@mydbops.com Thank You