SlideShare uma empresa Scribd logo
1 de 93
Percona XtraDB Cluster
       powered by Galera

                   Vadim Tkachenko
        Percona Inc, co-founder, CTO
                   www.percona.com
      www.mysqlperformanceblog.com
Percona XtraDB Cluster




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

 High Availability

 Replication

 Cluster
Percona XtraDB Cluster




What is HA

Availability

   Avail ~ Ability

     Ability to Avail
Percona XtraDB Cluster




Availability by redundancy
Percona XtraDB Cluster




Duplicate resources
Percona XtraDB Cluster




Failover
Percona XtraDB Cluster




Probability of failure

 Single         Two
server: P   servers: P/2

             X servers:
                P/X
Percona XtraDB Cluster




Probability of failure
Probability of failure




                         1   2   3   4    5       6     7   8   9       10
                                         N of servers
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




 Service               Data
availability         availability
Percona XtraDB Cluster




Replication
Percona XtraDB Cluster
Percona XtraDB Cluster



What is wrong with MySQL
replication ?




              “a”
Percona XtraDB Cluster



What is wrong with MySQL
replication ?




        “a” in async
Percona XtraDB Cluster



What is wrong with MySQL
replication ?

            “async”

               vs

            “sync”
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




synchronous    multi-master
 replication    replication

  parallel
                  data
applying on
               consistency
  slaves

        automatic
          node
       provisioning
Percona XtraDB Cluster




synchronous    multi-master
 replication    replication

  parallel
                  data
applying on
               consistency
  slaves

        automatic
          node
       provisioning
Percona XtraDB Cluster




Multi-master: MySQL
Percona XtraDB Cluster




Multi-master: XtraDB Cluster
Percona XtraDB Cluster




synchronous    multi-master
 replication    replication

  parallel
                  data
applying on
               consistency
  slaves

        automatic
          node
       provisioning
Percona XtraDB Cluster




Parallel apply: MySQL
Percona XtraDB Cluster




Parallel apply: XtraDB Cluster
Percona XtraDB Cluster




synchronous    multi-master
 replication    replication

  parallel
                  data
applying on
               consistency
  slaves

        automatic
          node
       provisioning
Percona XtraDB Cluster




XtraDB Cluster data consistency
Percona XtraDB Cluster




synchronous    multi-master
 replication    replication

  parallel
                  data
applying on
               consistency
  slaves

        automatic
          node
       provisioning
Percona XtraDB Cluster




Node provisioning
Percona XtraDB Cluster




CAP theorem
http://en.wikipedia.org/wiki/CAP_theorem
Percona XtraDB Cluster




Pick only TWO

                   Node
 Consistency
                 availability


           Partition
          Tolerance
Percona XtraDB Cluster




Network failure
Percona XtraDB Cluster




MySQL Replication

               Access to all systems -
               YES
               Data consistency -
               NO
Percona XtraDB Cluster




XtraDB Cluster

                 Access to all systems -
                 NO
                 Data consistency -
                 YES
Percona XtraDB Cluster




3 nodes is the minimal
recommended configuration
Percona XtraDB Cluster




Split brain




     Which system to make available
                   ?
Percona XtraDB Cluster




Split brain




       You still can have this setup
     But you deal with consequences
Percona XtraDB Cluster




Choice

         MySQL Replication:
         Access to all systems



         XtraDB Cluster:
         Data consistency
Percona XtraDB Cluster




                          MHA

MMM
      MySQL replication
          based



                            Flipper



       PRM
Percona XtraDB Cluster




Percona XtraDB Cluster
details
Percona XtraDB Cluster




                   Percona
                    Server

   Percona         WSREP
XtraDB Cluster     patches


                 Galera library
Percona XtraDB Cluster




     Full
compatibility
with existing
  systems
Percona XtraDB Cluster




Minimal
efforts to
migrate
Percona XtraDB Cluster




   Minimal
   efforts to
return back to
   MySQL
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_cont
rol
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

         •10 GigE
 Network •Infiniband

         •SSD
 Storage •PCI-e Flash
Percona XtraDB Cluster




Join process
Percona XtraDB Cluster




State Transfer
      Full data       Incremental
        SST               IST

                            Node
        New node        disconnected
                          short time

         Node long
           time
       disconnected
Percona XtraDB Cluster




Snapshot State Transfer

Mysqldump      Rsync           XtraBackup

                   Donor             Donor
    Small
               disconnected      disconnected
  databases
               for copy time     for short time



                  faster            slower
Percona XtraDB Cluster




Incremental State Transfer
            Node was
            in cluster
               Disconnected
                    for
               maintenance


               Node Crashed
                  (work in
                 progress)
Percona XtraDB Cluster




Scaleability
Percona XtraDB Cluster




Scaleability

  Scale ~ Ability

    Ability to Scale
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 :
100% reads    •N factor
     …        •…
   50/50      •N/2 factor
     …        •…
100% writes   •1 or const
Percona XtraDB Cluster




10 servers scale to :

  100%      • 1 server: 100 q/s
            • 10 servers: 1000 q/s
  reads
            • 1 server: 100 q/s
  50/50     • 10 servers: 500 q/s



  100%      • 1 server: 100 q/s
            • 10 servers: 100 q/s
  writes      (can be more)
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




Async MySQL Replication
Percona XtraDB Cluster




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    MySQL
                  Cluster   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!


 Questions ?

 You can try Percona
 XtraDB Cluster today!

Mais conteúdo relacionado

Mais procurados

Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6Severalnines
 
Introduction to Galera
Introduction to GaleraIntroduction to Galera
Introduction to GaleraHenrik Ingo
 
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...Severalnines
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - SlidesSeveralnines
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLKenny Gryp
 
Galera Replication Demystified: How Does It Work?
Galera Replication Demystified: How Does It Work?Galera Replication Demystified: How Does It Work?
Galera Replication Demystified: How Does It Work?Frederic Descamps
 
Galera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slidesGalera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slidesSeveralnines
 
Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)Henrik Ingo
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3Marco Tusa
 
3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北
3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北
3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北Ivan Tu
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMakerKris Buytaert
 
MariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly AvailableMariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly AvailableMariaDB Corporation
 
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
High Availability with Galera Cluster - SkySQL Road Show 2013 in BerlinHigh Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
High Availability with Galera Cluster - SkySQL Road Show 2013 in BerlinMariaDB Corporation
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellFrederic Descamps
 
Plny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesPlny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesDimas Prasetyo
 
Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Marco Tusa
 
合并到 XtraDB 存储引擎集群
合并到 XtraDB 存储引擎集群合并到 XtraDB 存储引擎集群
合并到 XtraDB 存储引擎集群YUCHENG HU
 
Mysql high availability and scalability
Mysql high availability and scalabilityMysql high availability and scalability
Mysql high availability and scalabilityyin gong
 

Mais procurados (20)

Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
 
Introduction to Galera
Introduction to GaleraIntroduction to Galera
Introduction to Galera
 
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
 
Galera Replication Demystified: How Does It Work?
Galera Replication Demystified: How Does It Work?Galera Replication Demystified: How Does It Work?
Galera Replication Demystified: How Does It Work?
 
Galera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slidesGalera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slides
 
Oss4b - pxc introduction
Oss4b   - pxc introductionOss4b   - pxc introduction
Oss4b - pxc introduction
 
Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3
 
3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北
3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北
3 周彦偉-隨需而變 我所經歷的my sql架構變遷﹣周彥偉﹣acmug@2015.12台北
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMaker
 
MariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly AvailableMariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly Available
 
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
High Availability with Galera Cluster - SkySQL Road Show 2013 in BerlinHigh Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
 
Plny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesPlny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practices
 
Galera Cluster 3.0 Features
Galera Cluster 3.0 FeaturesGalera Cluster 3.0 Features
Galera Cluster 3.0 Features
 
Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2
 
合并到 XtraDB 存储引擎集群
合并到 XtraDB 存储引擎集群合并到 XtraDB 存储引擎集群
合并到 XtraDB 存储引擎集群
 
Mysql high availability and scalability
Mysql high availability and scalabilityMysql high availability and scalability
Mysql high availability and scalability
 

Destaque

BlazeClan Company Presentation
BlazeClan Company PresentationBlazeClan Company Presentation
BlazeClan Company Presentationveerajthaploo
 
Account-Based Marketing Automation
Account-Based Marketing AutomationAccount-Based Marketing Automation
Account-Based Marketing AutomationRon Corbisier
 
Performance Engineering Sterling MCS-OM - An Accenture Capability (3)
Performance Engineering Sterling MCS-OM - An Accenture Capability (3)Performance Engineering Sterling MCS-OM - An Accenture Capability (3)
Performance Engineering Sterling MCS-OM - An Accenture Capability (3)Guruprasad Nagaraja
 
Why You Will Love Working at Pythian
Why You Will Love Working at PythianWhy You Will Love Working at Pythian
Why You Will Love Working at PythianPythian
 
Account Based Marketing Overview
Account Based Marketing OverviewAccount Based Marketing Overview
Account Based Marketing OverviewRon Corbisier
 
Building enterprise advance analytics platform
Building enterprise advance analytics platformBuilding enterprise advance analytics platform
Building enterprise advance analytics platformHaoran Du
 
Implementing Mobile Reports in SQL Sserver 2016 Reporting Services
Implementing Mobile Reports in SQL Sserver 2016 Reporting ServicesImplementing Mobile Reports in SQL Sserver 2016 Reporting Services
Implementing Mobile Reports in SQL Sserver 2016 Reporting ServicesAntonios Chatzipavlis
 
Prolifics Managed Services Offering
Prolifics Managed Services OfferingProlifics Managed Services Offering
Prolifics Managed Services Offeringvenkata burra
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
MySQL - High Availability - Load Balacing - Cluster
MySQL - High Availability - Load Balacing - ClusterMySQL - High Availability - Load Balacing - Cluster
MySQL - High Availability - Load Balacing - ClusterMiguel Angel Nieto
 
DevOps-as-a-Service: Towards Automating the Automation
DevOps-as-a-Service: Towards Automating the AutomationDevOps-as-a-Service: Towards Automating the Automation
DevOps-as-a-Service: Towards Automating the AutomationKeith Pleas
 
Cognizant's HCM Capabilities
Cognizant's HCM CapabilitiesCognizant's HCM Capabilities
Cognizant's HCM CapabilitiesArlene DeMita
 
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and TableauAnalyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and TableauDATAVERSITY
 
Increasing agility to fuel growth and competitiveness - Accenture
Increasing agility to fuel growth and competitiveness - AccentureIncreasing agility to fuel growth and competitiveness - Accenture
Increasing agility to fuel growth and competitiveness - AccentureAccenture ASEAN
 
Leading In The Spotlight 2016 Accenture Strategy C-Suite Survey
Leading In The Spotlight 2016 Accenture Strategy C-Suite SurveyLeading In The Spotlight 2016 Accenture Strategy C-Suite Survey
Leading In The Spotlight 2016 Accenture Strategy C-Suite Surveyaccenture
 

Destaque (20)

BlazeClan Company Presentation
BlazeClan Company PresentationBlazeClan Company Presentation
BlazeClan Company Presentation
 
Account-Based Marketing Automation
Account-Based Marketing AutomationAccount-Based Marketing Automation
Account-Based Marketing Automation
 
Performance Engineering Sterling MCS-OM - An Accenture Capability (3)
Performance Engineering Sterling MCS-OM - An Accenture Capability (3)Performance Engineering Sterling MCS-OM - An Accenture Capability (3)
Performance Engineering Sterling MCS-OM - An Accenture Capability (3)
 
Why You Will Love Working at Pythian
Why You Will Love Working at PythianWhy You Will Love Working at Pythian
Why You Will Love Working at Pythian
 
Account Based Marketing Overview
Account Based Marketing OverviewAccount Based Marketing Overview
Account Based Marketing Overview
 
Building enterprise advance analytics platform
Building enterprise advance analytics platformBuilding enterprise advance analytics platform
Building enterprise advance analytics platform
 
Implementing Mobile Reports in SQL Sserver 2016 Reporting Services
Implementing Mobile Reports in SQL Sserver 2016 Reporting ServicesImplementing Mobile Reports in SQL Sserver 2016 Reporting Services
Implementing Mobile Reports in SQL Sserver 2016 Reporting Services
 
Cognizant PPT
Cognizant PPTCognizant PPT
Cognizant PPT
 
Why Pythian?
Why Pythian?Why Pythian?
Why Pythian?
 
Prolifics Managed Services Offering
Prolifics Managed Services OfferingProlifics Managed Services Offering
Prolifics Managed Services Offering
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
Ssn0020 ssis 2012 for beginners
Ssn0020   ssis 2012 for beginnersSsn0020   ssis 2012 for beginners
Ssn0020 ssis 2012 for beginners
 
ACCENTURE
ACCENTUREACCENTURE
ACCENTURE
 
MySQL - High Availability - Load Balacing - Cluster
MySQL - High Availability - Load Balacing - ClusterMySQL - High Availability - Load Balacing - Cluster
MySQL - High Availability - Load Balacing - Cluster
 
Cognizant details
Cognizant detailsCognizant details
Cognizant details
 
DevOps-as-a-Service: Towards Automating the Automation
DevOps-as-a-Service: Towards Automating the AutomationDevOps-as-a-Service: Towards Automating the Automation
DevOps-as-a-Service: Towards Automating the Automation
 
Cognizant's HCM Capabilities
Cognizant's HCM CapabilitiesCognizant's HCM Capabilities
Cognizant's HCM Capabilities
 
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and TableauAnalyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
Analyzing Billions of Data Rows with Alteryx, Amazon Redshift, and Tableau
 
Increasing agility to fuel growth and competitiveness - Accenture
Increasing agility to fuel growth and competitiveness - AccentureIncreasing agility to fuel growth and competitiveness - Accenture
Increasing agility to fuel growth and competitiveness - Accenture
 
Leading In The Spotlight 2016 Accenture Strategy C-Suite Survey
Leading In The Spotlight 2016 Accenture Strategy C-Suite SurveyLeading In The Spotlight 2016 Accenture Strategy C-Suite Survey
Leading In The Spotlight 2016 Accenture Strategy C-Suite Survey
 

Semelhante a Percona XtraDB Cluster SF Meetup

Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Clusterhybris2000
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档YUCHENG HU
 
Cassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWSCassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWSAdrian Cockcroft
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
How to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation SavingsHow to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation SavingsIsaac Christoffersen
 
Netezza vs Teradata vs Exadata
Netezza vs Teradata vs ExadataNetezza vs Teradata vs Exadata
Netezza vs Teradata vs ExadataAsis Mohanty
 
Cassandra Operations at Netflix
Cassandra Operations at NetflixCassandra Operations at Netflix
Cassandra Operations at Netflixgreggulrich
 
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDB
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDBComparing Apache Cassandra 4.0, 3.0, and ScyllaDB
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDBScyllaDB
 
Cassandra for Sysadmins
Cassandra for SysadminsCassandra for Sysadmins
Cassandra for SysadminsNathan Milford
 
Rich placement constraints: Who said YARN cannot schedule services?
Rich placement constraints: Who said YARN cannot schedule services?Rich placement constraints: Who said YARN cannot schedule services?
Rich placement constraints: Who said YARN cannot schedule services?DataWorks Summit
 
Understanding Data Consistency in Apache Cassandra
Understanding Data Consistency in Apache CassandraUnderstanding Data Consistency in Apache Cassandra
Understanding Data Consistency in Apache CassandraDataStax
 
Open stack ha design & deployment kilo
Open stack ha design & deployment   kiloOpen stack ha design & deployment   kilo
Open stack ha design & deployment kiloSteven Li
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesBernd Ocklin
 
OpenStack HA
OpenStack HAOpenStack HA
OpenStack HAtcp cloud
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High AvailabilityJakub Pavlik
 
Chester County Interlink
Chester County InterlinkChester County Interlink
Chester County Interlinkbooomer1265
 

Semelhante a Percona XtraDB Cluster SF Meetup (20)

Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档
 
Cassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWSCassandra Performance and Scalability on AWS
Cassandra Performance and Scalability on AWS
 
Cassandra
CassandraCassandra
Cassandra
 
Super cluster oracleday cl 7
Super cluster oracleday cl 7Super cluster oracleday cl 7
Super cluster oracleday cl 7
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
How to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation SavingsHow to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation Savings
 
Netezza vs Teradata vs Exadata
Netezza vs Teradata vs ExadataNetezza vs Teradata vs Exadata
Netezza vs Teradata vs Exadata
 
Cassandra Operations at Netflix
Cassandra Operations at NetflixCassandra Operations at Netflix
Cassandra Operations at Netflix
 
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDB
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDBComparing Apache Cassandra 4.0, 3.0, and ScyllaDB
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDB
 
NoSQL
NoSQLNoSQL
NoSQL
 
Cassandra for Sysadmins
Cassandra for SysadminsCassandra for Sysadmins
Cassandra for Sysadmins
 
Rich placement constraints: Who said YARN cannot schedule services?
Rich placement constraints: Who said YARN cannot schedule services?Rich placement constraints: Who said YARN cannot schedule services?
Rich placement constraints: Who said YARN cannot schedule services?
 
Understanding Data Consistency in Apache Cassandra
Understanding Data Consistency in Apache CassandraUnderstanding Data Consistency in Apache Cassandra
Understanding Data Consistency in Apache Cassandra
 
Open stack ha design & deployment kilo
Open stack ha design & deployment   kiloOpen stack ha design & deployment   kilo
Open stack ha design & deployment kilo
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
 
OpenStack HA
OpenStack HAOpenStack HA
OpenStack HA
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
 
Chester County Interlink
Chester County InterlinkChester County Interlink
Chester County Interlink
 
Cassandra勉強会
Cassandra勉強会Cassandra勉強会
Cassandra勉強会
 

Último

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Percona XtraDB Cluster SF Meetup

Notas do Editor

  1. Today I want to focus on High Availability questions.I personally define the current MySQL era as era of High Availability.While there are many materials how to setup and tune single server, HA for MySQL is still on the initial but raising stage.You may see an increasing interest to many third party software and scripts, like Continuent, MHA, MMM, Flipper, Percona Replication Manager, etc
  2. So what is High Availablity. Availability refers to the ability of the user community to access the system, whether to submit new work, update or alter existing work, or collect the results of previous work. If a user cannot access the system, it is said to be unavailable. (Wikipedia)Word “High” refers to some pre-arranged level of performance during long period of time
  3. An usual approach to provide availability is to have redundant systems. This is especially useful for services like web server or application server
  4. Basically we duplicate resources
  5. And a failover procedure is very simple. When one system is down, we redirect user requests to second system.
  6. It apply to more than twosystems, having multiple servers for redundancy we can manage a probability of failure.If single system has probability P. then two servers have probability P/2,And for X servers: P/X
  7. Or graphically we have an Inversely Proportional function – the more server you have, the less probability of failure
  8. Was that easy ?Not, if we deal with databases
  9. Databases is more complicated. There are two parts: a system (server) and data
  10. And beside a system redundancy we need to provide a data redundancy
  11. To provide availability for database, we need to provide availability for two components: service + data
  12. This is where a replication comes into play. The replication is a process of sharing events between resources. When one of systems updates data, it informs other systems.
  13. And MySQL Replication is of course is most known in MySQL world
  14. When we speak Availability and it is based on MySQL replication, I have this picture in my mind. This systems works, but also it has many life-support elements, and if you do something wrong, your system fails.Well, yes, I exaggerate this a little, but I am doing it to draw your attention.There is a lot of MySQL replication setups which are to serve HA purposes, and they are doing great job.What is wrong with it – I will explain myself just in couple minutes.MySQL Replication is a great tool, no questions. Simple and easy to understand. This all made MySQL and MySQL Replication very popular. And MySQL Replication is one of factors why MySQL is most popular Open Source database. The lack of a good replication was the biggest issue for PostgreSQLusers.
  15. So what’s wrong with MySQL Replication ? This is as simple as “a”
  16. “a” in asynchronous
  17. MySQL replication is asynchronous
  18. asynchronous means that there is no a confirmation or a guarantee when an event will be applied on the replicated system.By its nature it assumes that there is a delay between a slave and a master. And the delay can be microseconds or hours…
  19. In a simple term: asynchronous does not guarantee that your data is the same in this given point of time.
  20. Synchronous communication is different. It assumes a confirmation process. The first systems are waiting on confirmation.
  21. Wait, is not it how DRBD works?
  22. Yes, DRBD. However we with DRBD we have a different problem. While data is always available, the system is not. DRBD only works in active-passive mode. Failover time depends on how fast you can wake up your system. And it cannot be 0 time.
  23. On this step we are coming to Clustering solutions
  24. And namely our solutions: PerconaXtraDB Cluster.As usually our soft is free and open source.You are free to install, use, uninstall, copy and distribute, provide commercial support, whatever you want.
  25. In XtraDB Cluster the nodes are connected through group communication, and interexchange events synchronous
  26. Well, in fact the process is not fully synchronous,but “Virtually synchronous”. I will not go in details now, it is fairly complicated, the good reading is by following link: http://en.wikipedia.org/wiki/Virtual_synchrony
  27. I tried to simplify the process, and this is the simplest one I could come up with.Important points: The network interaction happens when you issue COMMIT statement. At this time the NODE performs network communication and certification of transaction. On an intercontinental communication between nodes the network roundtrip can be significant ( e.g. 0.18 sec for nodes on Amazon-California and Amazon-Europe zone).Also important to note that Slave still can have a short period of time (i.e. less than 1 sec) when it is out of sync with master. The difference come from: Applying event on slave make take longer than COMMIT on the master.
  28. So there is list of benefits that XtraDB Cluster provides.1. Is synchronous replication, the importance of this I already covered
  29. Second, Multi-master replication
  30. In a regular MySQL replication writes to several servers are possible, but you are looking for big troubles.This comes from the fact I already mentioned: being asynchronous, the second server may be behind, and updating it we may update a stale data.
  31. With XtraDB Cluster it is different: you can update any server in the Cluster
  32. Third benefit is: Parallel replication
  33. It is well know limitation of MySQL that slave is only single threaded, and it is an additional factor why a slave may get behind a master. On modern servers with 32 cores, the master can perform much more updates per second than the slave with single thread can handle.
  34. Fourth benefit is: data consistency.
  35. In XtraDB Cluster we guarantee that data is equal on all nodes. A transaction is either committed on all nodes or not committed at all.
  36. And Fifth, Automatic node provisioning
  37. When a new node joins the Cluster, it automatically copies data from an existing node
  38. Finishing with benefits, I want to give some attention to CAP theorem. You probably heard about it, especially how it is applied to different NOSQL distributed system. I will try to use to explain a difference between MySQL Replication and XtraDB Cluster using CAP theorem.
  39. I will simplifythe theorem to next statement:In a distributed system you can have only two from following choice:Data consistencyNode availabilityPartition Tolerance
  40. I understand that still sounds somewhat fuzzy, let me show the following example:Imagine in a system with three nodes, we have a network failure to one of nodes.
  41. In this case MySQL Replication will provide you access to all nodes. Even the node disconnected from other nodes, you still are able to connect to MySQL locally or through available connection and extract and change even change data. However as you understand, the node will not receive updates from Cluster. The Data consistency is compromised.
  42. WithXtraDB Cluster, we guarantee data consistency, but as a downside we can’t allow access to a node that disconnected from the cluster
  43. As consequence: minimal recommended configuration is 3 modes, why ? Let’s see what we have with 2 nodes:
  44. In 2 nodes configuration, in case of link failure, we have a case which has a special name “Split brain”.We can’t pretty much decide which node accepts queries and which is not.By default, if that happens: both nodes will refuse queries.
  45. There is however a special option that allows you to have this schema, but you take responsibility on yourself.You need to make sure that you one and only one master, that is a server that executes update queries.
  46. Once again, back to our theorem. It shows a principal difference between MySQL Replication and XtraDB Cluster.MySQL Replication provides you an access to all systems. XtraDB Cluster prioritize Data Consistency.
  47. This applies to all external software and scripts that are based on MySQL replications.As long as MySQL replication is asynchronous, it does not guarantee a Data Consistency
  48. On this stage I want to give a little more details about XtraDB Cluster
  49. PerconaXtraDB Cluster is old good Percona Server + special replication patches + Galera library.The patches and Galera library are developed by Finnish company CodershipOy.
  50. The fact, that XtraDB Cluster is based on Percona Server, which is compatible with MySQL, means that XtraDB Cluster is compatible with MySQL setups. You use the same InnoDB storage engine, and database server behaves the same way: queries have the same execution plan, you use the same configurations and the same optimization techniques.
  51. There are also minimal efforts to migrate from existing working systems to system running XtraDB Cluster. It is not much harder than to upgrade from MySQL to Percona Server. If you did it, you know that is quite easy: you just replace old binaries by new binaries files. For XtraDB Cluster you will need to make couple changes to configuration file.
  52. And also important, there is no lock-in, which for me is an quite important factor. If you do not like this solution by some reason there is always an easy way to return to previous setup.
  53. This allsounds so good, so is this a perfect solution? I want to answer “Yes”, but you won’t believe me. Of course there are limitations.
  54. It is a new product and new solution and there are limitations, some of them will be resolved later and we are already working on.
  55. The first limitation is that only InnoDB tables are supported. Changes to MyISAM tables are not replication, so you need to make sure you have only InnoDB when you test XtraDB Cluster.
  56. The second limitation or incompatibility for applications is that XtraDB Cluster introduces OPTIMISTIC locking. This locking is applied not to all cases but to transactions that running on different servers. Let me explain what does it mean for you.
  57. First, traditionalInnoDB locking, for transactions on the same server.When two transactions are trying to update the same row, the second transaction waits until first COMMITs or ROLLBACKs
  58. In XtraDB Cluster running transactions on different servers (multi-master) we can get Error on COMMIT statement.Once again, this applies for different servers. If we run on the same server, we have a traditional InnoDB locking.On different servers, however, we get so named “OPTIMISTIC locking”. Two transactions are running lockless, as they assume there is no conflicts, and later, only on COMMIT stage transactions are communicate each with other. Again, we have this model because all communication happens on COMMIT stage. So if on this stage transaction 2 finds out it updated a row, that also updated by another transaction, then transaction 2 performs ROLLBACK and returns ERROR to client.This is not something that usually happens in traditional applications based on MySQL.And your application may not be ready for that. Fair to say that many applications or frameworks do not handle errors on COMMIT query.And this may require changes in the application logic if you expect to run transactions on different nodes.But also this could be the ONLY ONE significant change you need.
  59. Ok, next limitation. Write performance is limited by weakest node you have. This is price we pay for a data consistency. If one of nodes becomes suddenly slow (by different reasons, i.e. a disk failure in a RAID) , write queries are equally slow in the whole cluster. Let me show why
  60. When user runs update on one of servers, this write event is communicated to all nodes. The user gets the confirmation after server gets the confirmation for every node.If one of nodes is slow, the whole cluster is slow.
  61. Now let’s talk about write intensive application. Write intensive I mean very high rate of updates/inserts/deletes per second. If you have this case,there will be some limit of how much data you can have in the cluster. And this limitation is not physical, there is nothing hardcoded, but it is rather logical. Let me explain why
  62. I also will explain how Cluster handles JOIN process. Let’s assume one new node wants to join to existing cluster. As we already discussed, it has to have full copy of data, to have the same data as others nodes in the cluster.
  63. So what happens:Cluster allocates one node, which gets status DONOR andJOINER copies whole dataset from DONORYou understand that, for example, for 200GB of data it make take time to copy it over network.Meantime DONOR is also gets OUT OF CLUSTER. It may be short or long period of time. It depends on what copying method you choose. I will show different copying methods later.
  64. Now, when data copying is finished - we have two nodes that were disconnected from Cluster.And they need to apply events that happened while they were disconnected.If your have big database, and if you have an intensive rate of changes, it may take long time.And while events are applied to DONOR and JOINER, new events may still happen in the cluster.You understand that these two are trying to catch up, but the cluster generates and generates new events.In the worst case these two outsides may never catch up.
  65. So for write intensive applications this should be Hardware + Software solution. This is the case which we can’t solve only using software solutions.And this applies not only to XtraDB Cluster. Let me show an analogy.
  66. Let’s take singleInnoDB system. When we need good write performance from InnoDB, the usual setup is to have Disk Array. You can’t have decent performance with single disk.
  67. If you need InnoDB to provide good performance and durability, you need not just Disk Array, but Array with cache, which backed by a battery.
  68. The same for cluster.For write intensive applications and good performance in cluster, you will need Good networking, like 10 Gigabit or Infinibad andGood storage, condider SSD drives or PCIe Flash cards
  69. Let’s back to JOIN process. As I promised, let me review methods XtraDB Cluster can use to copy date. The process by it self has a name: State Transfer
  70. InXtraDB cluster we have two State transfers:Full data copy: this is Snapshot State Transfer. It happens when totally new node joins cluster. Or node was in the cluster, but then by some reason it was disconnected for long period of time.And second is Incremental State Transfer. This happens when node was disconnected for short period of time
  71. For Snapshot State Transfer (full copy of data), we have following choice:mysqldump, obviously it is good for small database to just to play with clusterRsync, the data is copied using rsync process. Usually it is a fast way to copy data, but the drawback is that DONOR is disconnected from cluster for whole copying timeXtraBackup. With xtrabackup the donor is disconnected for short period of time, but copying data and joining may be slower than rsync
  72. Incremental State Transfer is used when a node was in the cluster but we had it put it down for short period of time, like server reboot, or change some configuration parameters. The second case when it can be used (but not yet, this is work in progress), is when node crashed. Yes, it happens. Unfortunately at this moment, after the crash node has to perform Full Snapshot State Transfer.
  73. Ok, if you are still with me, we can continue with scalabilty topic
  74. Scaleability for me is quite similar to availability. That’s why we can use XtraDB Cluster for needs to scale a load
  75. Scaleability is similar to availability is a sense how it can be handled: by redundancy. In this case only difference is that the first system is not able to handle a user’s request not because it is down, but because it is overloaded. An experience for the user is the same: the system refuses to handle his query, the system is not available for the user. It can be handled by redirecting query to a second system.
  76. InXtraDB Cluster it is easy to scale reads. Reads queries do not require additional overhead or group communication
  77. Scaling writes is more complicated. As each write has to be replicated on every system. Each server has to handle writes coming from all servers
  78. We can make some a rule of thumb. It is very approximate. Just to get basic understanding how to look on it.If we have N servers, and our workload is 100% reads, we can scale as much as N factor.For 100% writes – we can scale only to some constant or even can’t scale at all
  79. That is if 1 server can handle 100 read queries per second, than 10 servers can handle 1000 the same queries per second.For 100% of write traffic there is no much room to grow. Because of internal communication I showed before,If 1 server can handle 100 update queries per second, then 10 servers still are able to handle only 100 the same queries per second.Actually it can be a little better. Because internal communication happens in optimized
  80. With all this group communication over network and synchronous process, is it fast ?Actually it is reasonably fast. Certification and virtual synchronous minimizes overhead.If we look at two performance characteristics: response time and throughput, the response time the one that may take hit. A network roundtrip for sure will increase it. If it is critical, make sure you have a decent network and storage.The throughput is less affected. As we can do many operations in parallel, we can have reasonable performance numbers for throughput.
  81. One of setup when XtraDB Cluster is considered is an intercontinental, or inter-coast replication
  82. I do not like this question. I usually answer “It is different”. I mean, it is really different systems with different goals, how you can compare it. But usually people do not like this answer.
  83. That’s why I come up with this a marketing-like table with checklist.