Percona XtraDB Cluster
powered by Galera
Vadim Tkachenko
Percona Inc, co-founder, CTO
www.percona.com
www.mysqlperformance...
This talk online
• PowerPoint
• http://bit.ly/PXC-meetup
• PDF
• http://bit.ly/PXC-meetup-pdf
• Google Docs
• http://bit.l...
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
Perco...
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 distri...
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
Perco...
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....
Resources
• http://www.percona.com/software/percona-xtradb-cluster/
• http://www.codership.com/wiki/doku.php
• Virtual syn...
Credits
• WSREP patches and Galera library is developed by Codership
Oy
Percona XtraDB Cluster
Thank you!
Percona XtraDB Cluster
Percona XtraDB 集群
Upcoming SlideShare
Loading in...5
×

Percona XtraDB 集群

434

Published on

Percona XtraDB 集群

http://www.ossez.com/forum.php?mod=viewthread&tid=26861&fromuid=426
(出处: OSSEZ)

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
434
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Percona XtraDB 集群

  1. 1. Percona XtraDB Cluster powered by Galera Vadim Tkachenko Percona Inc, co-founder, CTO www.percona.com www.mysqlperformanceblog.com
  2. 2. 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
  3. 3. This talk Percona XtraDB Cluster
  4. 4. What is HA Percona XtraDB Cluster
  5. 5. Availability by redundancy Percona XtraDB Cluster
  6. 6. Duplicate resources Percona XtraDB Cluster
  7. 7. Failover Percona XtraDB Cluster
  8. 8. Percona XtraDB Cluster
  9. 9. Probability of failure Percona XtraDB Cluster
  10. 10. Easy ? Not if we deal with databases Percona XtraDB Cluster
  11. 11. Database Percona XtraDB Cluster
  12. 12. Redundancy ? Percona XtraDB Cluster
  13. 13. Database availability is hard Percona XtraDB Cluster
  14. 14. Replication Percona XtraDB Cluster
  15. 15. Percona XtraDB Cluster
  16. 16. What is wrong with MySQL replication ? Percona XtraDB Cluster
  17. 17. What is wrong with MySQL replication ? Percona XtraDB Cluster
  18. 18. What is wrong with MySQL replication ? Percona XtraDB Cluster
  19. 19. Async Percona XtraDB Cluster
  20. 20. Async Percona XtraDB Cluster
  21. 21. sync Percona XtraDB Cluster
  22. 22. Didn’t we just reinvent DRBD ? Percona XtraDB Cluster
  23. 23. DRBD Percona XtraDB Cluster
  24. 24. Clustering Percona XtraDB Cluster
  25. 25. Percona XtraDB Cluster Free and Open Source Percona XtraDB Cluster
  26. 26. Percona XtraDB Cluster Percona XtraDB Cluster
  27. 27. Virtually synchronous http://en.wikipedia.org/wiki/Virtual_synchrony Percona XtraDB Cluster
  28. 28. Virtually synchronous Percona XtraDB Cluster
  29. 29. Percona XtraDB Cluster
  30. 30. Percona XtraDB Cluster
  31. 31. Multi-master: MySQL Percona XtraDB Cluster
  32. 32. Multi-master: XtraDB Cluster Percona XtraDB Cluster
  33. 33. Percona XtraDB Cluster
  34. 34. Parallel apply: MySQL Percona XtraDB Cluster
  35. 35. Parallel apply: XtraDB Cluster Percona XtraDB Cluster
  36. 36. Percona XtraDB Cluster
  37. 37. XtraDB Cluster data consistency Percona XtraDB Cluster
  38. 38. Percona XtraDB Cluster
  39. 39. Node provisioning Percona XtraDB Cluster
  40. 40. CAP theorem http://en.wikipedia.org/wiki/CAP_theorem Percona XtraDB Cluster
  41. 41. Pick only TWO Percona XtraDB Cluster
  42. 42. Network failure Percona XtraDB Cluster
  43. 43. MySQL Replication Percona XtraDB Cluster Access to all systems -YES Data consistency - NO
  44. 44. XtraDB Cluster Percona XtraDB Cluster Access to all systems - NO Data consistency -YES
  45. 45. 3 nodes is the minimal recommended configuration Percona XtraDB Cluster
  46. 46. Split brain Percona XtraDB Cluster Which system to make available ?
  47. 47. Split brain Percona XtraDB Cluster But you deal with consequences You still can have this setup
  48. 48. Choice Percona XtraDB Cluster MySQL Replication: Access to all systems Data consistency XtraDB Cluster:
  49. 49. Percona XtraDB Cluster
  50. 50. Percona XtraDB Cluster details Percona XtraDB Cluster
  51. 51. Percona XtraDB Cluster
  52. 52. Percona XtraDB Cluster
  53. 53. Percona XtraDB Cluster
  54. 54. Percona XtraDB Cluster
  55. 55. So, is this a perfect solution? Percona XtraDB Cluster
  56. 56. Limitations some will be solved later Percona XtraDB Cluster
  57. 57. Only InnoDB tables are supported Percona XtraDB Cluster
  58. 58. OPTIMISTIC locking for transactions on different servers http://en.wikipedia.org/wiki/Optimistic_concurrency_control Percona XtraDB Cluster
  59. 59. Traditional locking Percona XtraDB Cluster
  60. 60. Optimistic locking Percona XtraDB Cluster
  61. 61. The write performance is limited by weakest node Percona XtraDB Cluster
  62. 62. Write performance Percona XtraDB Cluster
  63. 63. For write intensive applications there could be datasize limit per node Not physical but logical Percona XtraDB Cluster
  64. 64. Join process. Step 1 Percona XtraDB Cluster
  65. 65. Join process. Step 2 Percona XtraDB Cluster
  66. 66. Join process: step 3 Percona XtraDB Cluster
  67. 67. This is software + hardware solution Percona XtraDB Cluster
  68. 68. InnoDB write performance Percona XtraDB Cluster
  69. 69. InnoDB performance + ACID Percona XtraDB Cluster
  70. 70. Cluster performance Percona XtraDB Cluster
  71. 71. Join process Percona XtraDB Cluster
  72. 72. State Transfer Percona XtraDB Cluster
  73. 73. Snapshot State Transfer Percona XtraDB Cluster
  74. 74. Incremental State Transfer Percona XtraDB Cluster
  75. 75. Scaleability Percona XtraDB Cluster
  76. 76. Percona XtraDB Cluster
  77. 77. Scaleability is similar to availability Percona XtraDB Cluster
  78. 78. XtraDB Cluster: Reads scalability is easy Percona XtraDB Cluster
  79. 79. Write scalability is complicated Percona XtraDB Cluster
  80. 80. N servers scale to : Percona XtraDB Cluster
  81. 81. 10 servers scale to : Percona XtraDB Cluster
  82. 82. FAQ Questions I am asked Percona XtraDB Cluster
  83. 83. 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
  84. 84. How fast is it? Reasonably fast. Percona XtraDB Cluster
  85. 85. Can I replicate XtraDB Cluster to MySQL Replication? Yes Percona XtraDB Cluster
  86. 86. Percona XtraDB Cluster Async MySQL Replication
  87. 87. Would I install it on a production system? Yes. I am going to upgrade MySQLPerformanceBlog.com to use XtraDB Cluster Percona XtraDB Cluster
  88. 88. How it is compared to MySQL Cluster? It is different Percona XtraDB Cluster
  89. 89. XtraDB Cluster MySQL Cluster Easy to migrate  Easy to use  Cloud / EC2  Changes in an application  Write scaling  99.999%  Percona XtraDB Cluster
  90. 90. 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
  91. 91. Credits • WSREP patches and Galera library is developed by Codership Oy Percona XtraDB Cluster
  92. 92. Thank you! Percona XtraDB Cluster
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×