SlideShare a Scribd company logo
1 of 93
Download to read offline
Percona XtraDB Cluster
powered by Galera
Vadim Tkachenko
Percona Inc, co-founder, CTO
www.percona.com
www.mysqlperformanceblog.com
This talk online
• PowerPoint
• http://bit.ly/PXC-meetup
• PDF
• http://bit.ly/PXC-meetup-pdf
• Google Docs
• http://bit.ly/PXC-meetup-gdocs
Percona XtraDB Cluster
This talk
Percona XtraDB Cluster
What is HA
Percona XtraDB Cluster
Availability by redundancy
Percona XtraDB Cluster
Duplicate resources
Percona XtraDB Cluster
Failover
Percona XtraDB Cluster
Percona XtraDB Cluster
Probability of failure
Percona XtraDB Cluster
Easy ?
Not if we deal with databases
Percona XtraDB Cluster
Database
Percona XtraDB Cluster
Redundancy ?
Percona XtraDB Cluster
Database availability is hard
Percona XtraDB Cluster
Replication
Percona XtraDB Cluster
Percona XtraDB Cluster
What is wrong with MySQL
replication ?
Percona XtraDB Cluster
What is wrong with MySQL
replication ?
Percona XtraDB Cluster
What is wrong with MySQL
replication ?
Percona XtraDB Cluster
Async
Percona XtraDB Cluster
Async
Percona XtraDB Cluster
sync
Percona XtraDB Cluster
Didn’t we just reinvent DRBD
?
Percona XtraDB Cluster
DRBD
Percona XtraDB Cluster
Clustering
Percona XtraDB Cluster
Percona XtraDB Cluster
Free and Open Source
Percona XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
Virtually synchronous
http://en.wikipedia.org/wiki/Virtual_synchrony
Percona XtraDB Cluster
Virtually synchronous
Percona XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
Multi-master: MySQL
Percona XtraDB Cluster
Multi-master: XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
Parallel apply: MySQL
Percona XtraDB Cluster
Parallel apply: XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
XtraDB Cluster data consistency
Percona XtraDB Cluster
Percona XtraDB Cluster
Node provisioning
Percona XtraDB Cluster
CAP theorem
http://en.wikipedia.org/wiki/CAP_theorem
Percona XtraDB Cluster
Pick only TWO
Percona XtraDB Cluster
Network failure
Percona XtraDB Cluster
MySQL Replication
Percona XtraDB Cluster
Access to all systems -YES
Data consistency - NO
XtraDB Cluster
Percona XtraDB Cluster
Access to all systems - NO
Data consistency -YES
3 nodes is the minimal
recommended configuration
Percona XtraDB Cluster
Split brain
Percona XtraDB Cluster
Which system to make available ?
Split brain
Percona XtraDB Cluster
But you deal with consequences
You still can have this setup
Choice
Percona XtraDB Cluster
MySQL Replication:
Access to all systems
Data consistency
XtraDB Cluster:
Percona XtraDB Cluster
Percona XtraDB Cluster
details
Percona XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
Percona XtraDB Cluster
So, is this a perfect solution?
Percona XtraDB Cluster
Limitations
some will be solved later
Percona XtraDB Cluster
Only InnoDB tables are
supported
Percona XtraDB Cluster
OPTIMISTIC locking for
transactions on different servers
http://en.wikipedia.org/wiki/Optimistic_concurrency_control
Percona XtraDB Cluster
Traditional locking
Percona XtraDB Cluster
Optimistic locking
Percona XtraDB Cluster
The write performance is
limited by weakest node
Percona XtraDB Cluster
Write performance
Percona XtraDB Cluster
For write intensive applications there
could be datasize limit per node
Not physical but logical
Percona XtraDB Cluster
Join process. Step 1
Percona XtraDB Cluster
Join process. Step 2
Percona XtraDB Cluster
Join process: step 3
Percona XtraDB Cluster
This is software + hardware
solution
Percona XtraDB Cluster
InnoDB write performance
Percona XtraDB Cluster
InnoDB performance + ACID
Percona XtraDB Cluster
Cluster performance
Percona XtraDB Cluster
Join process
Percona XtraDB Cluster
State Transfer
Percona XtraDB Cluster
Snapshot State Transfer
Percona XtraDB Cluster
Incremental State Transfer
Percona XtraDB Cluster
Scaleability
Percona XtraDB Cluster
Percona XtraDB Cluster
Scaleability is similar to availability
Percona XtraDB Cluster
XtraDB Cluster: Reads scalability is
easy
Percona XtraDB Cluster
Write scalability is complicated
Percona XtraDB Cluster
N servers scale to :
Percona XtraDB Cluster
10 servers scale to :
Percona XtraDB Cluster
FAQ
Questions I am asked
Percona XtraDB Cluster
It looks so easy. Why did not
you implement it earlier?
It is not easy.
Computer science of group communication
and distributed transactions.
Credits to Codership Oy
Percona XtraDB Cluster
How fast is it?
Reasonably fast.
Percona XtraDB Cluster
Can I replicate XtraDB
Cluster to MySQL
Replication?
Yes
Percona XtraDB Cluster
Percona XtraDB Cluster
Async MySQL Replication
Would I install it on a
production system?
Yes. I am going to upgrade MySQLPerformanceBlog.com
to use XtraDB Cluster
Percona XtraDB Cluster
How it is compared to
MySQL Cluster?
It is different
Percona XtraDB Cluster
XtraDB
Cluster
MySQL
Cluster
Easy to migrate 
Easy to use 
Cloud / EC2 
Changes in an
application 
Write scaling 
99.999% 
Percona XtraDB Cluster
Resources
• http://www.percona.com/software/percona-xtradb-cluster/
• http://www.codership.com/wiki/doku.php
• Virtual synchrony
• http://en.wikipedia.org/wiki/Virtual_synchrony
• CAP Theorem
• http://en.wikipedia.org/wiki/CAP_theorem
• Optimistic locking
• http://en.wikipedia.org/wiki/Optimistic_concurrency_control
Percona XtraDB Cluster
Credits
• WSREP patches and Galera library is developed by Codership
Oy
Percona XtraDB Cluster
Thank you!
Percona XtraDB Cluster

More Related Content

More from YUCHENG HU

Confluence 回顾(retrospectives) 蓝图 cwikiossez
Confluence 回顾(retrospectives) 蓝图   cwikiossezConfluence 回顾(retrospectives) 蓝图   cwikiossez
Confluence 回顾(retrospectives) 蓝图 cwikiossez
YUCHENG HU
 

More from YUCHENG HU (20)

Presta shop 1.6 图文安装教程
Presta shop 1.6 图文安装教程Presta shop 1.6 图文安装教程
Presta shop 1.6 图文安装教程
 
V tiger 5.4.0 图文安装教程
V tiger 5.4.0 图文安装教程V tiger 5.4.0 图文安装教程
V tiger 5.4.0 图文安装教程
 
Confluence 回顾(retrospectives) 蓝图 cwikiossez
Confluence 回顾(retrospectives) 蓝图   cwikiossezConfluence 回顾(retrospectives) 蓝图   cwikiossez
Confluence 回顾(retrospectives) 蓝图 cwikiossez
 
Confluence 会议记录(meeting notes)蓝图 cwikiossez
Confluence 会议记录(meeting notes)蓝图   cwikiossezConfluence 会议记录(meeting notes)蓝图   cwikiossez
Confluence 会议记录(meeting notes)蓝图 cwikiossez
 
VTIGER - 销售机会 - CWIKIOSSEZ
VTIGER - 销售机会 - CWIKIOSSEZ VTIGER - 销售机会 - CWIKIOSSEZ
VTIGER - 销售机会 - CWIKIOSSEZ
 
Confluence 使用一个模板新建一个页面 cwikiossez
Confluence 使用一个模板新建一个页面     cwikiossezConfluence 使用一个模板新建一个页面     cwikiossez
Confluence 使用一个模板新建一个页面 cwikiossez
 
Confluence 使用模板
Confluence 使用模板Confluence 使用模板
Confluence 使用模板
 
Cwikiossez confluence 订阅页面更新邮件通知
Cwikiossez confluence 订阅页面更新邮件通知Cwikiossez confluence 订阅页面更新邮件通知
Cwikiossez confluence 订阅页面更新邮件通知
 
Cwikiossez confluence 关注页面 博客页面和空间
Cwikiossez confluence 关注页面 博客页面和空间Cwikiossez confluence 关注页面 博客页面和空间
Cwikiossez confluence 关注页面 博客页面和空间
 
My sql università di enna a.a. 2005-06
My sql   università di enna a.a. 2005-06My sql   università di enna a.a. 2005-06
My sql università di enna a.a. 2005-06
 
My sql would you like transactions
My sql would you like transactionsMy sql would you like transactions
My sql would you like transactions
 
MySQL 指南
MySQL 指南MySQL 指南
MySQL 指南
 
MySQL 简要介绍
MySQL 简要介绍MySQL 简要介绍
MySQL 简要介绍
 
mysql 5.5.25 用户安装备忘
mysql 5.5.25 用户安装备忘mysql 5.5.25 用户安装备忘
mysql 5.5.25 用户安装备忘
 
Sql
SqlSql
Sql
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
 
MySQL 简要介绍
MySQL 简要介绍MySQL 简要介绍
MySQL 简要介绍
 
从 Oracle 合并到 my sql npr 实例分析
从 Oracle 合并到 my sql   npr 实例分析从 Oracle 合并到 my sql   npr 实例分析
从 Oracle 合并到 my sql npr 实例分析
 
更多的 SQL 和 MySQL
更多的 SQL 和 MySQL更多的 SQL 和 MySQL
更多的 SQL 和 MySQL
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
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...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Percona XtraDB 集群