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

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
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
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Percona XtraDB 集群