PerconaXtraDBClusterDocumentationRelease5.6.19-25.6PerconaLLCand/oritsaffiliates2009-2014July18,2014CONTENTS1Introduction31.1AboutPerconaXtraDBCluster.....................................31.2PerconaXtraDBClusterLimitations...................................51.3PerconaXtraDBClusterErrata.....................................62Installation72.1InstallingPerconaXtraDBClusterfromBinaries............................72.2CompilingandInstallingfromSourceCode...............................112.3PerconaXtraDBClusterIn-PlaceUpgradingGuide:From5.5to5.6..................123Features173.1HighAvailability.............................................173.2Multi-Masterreplication.........................................174User’sManual214.1Bootstrappingthecluster.........................................214.2StateSnapshotTransfer.........................................224.3XtrabackupSSTConfiguration.....................................234.4Restartingtheclusternodes.......................................284.5ClusterFailover.............................................284.6Monitoringthecluster..........................................295How-tos315.1InstallingPerconaXtraDBClusteronCentOS.............................315.2InstallingPerconaXtraDBClusteronUbuntu..............................365.3Howtosetup3nodeclusteronsinglebox................................405.4Howtosetup3nodeclusterinEC2enviroment.............................425.5LoadbalancingwithHAProxy......................................455.6SettingupPXCreferencearchitecturewithHAProxy..........................465.7HowtoReportBugs...........................................536Reference556.1PerconaXtraDBCluster5.6Releasenotes...............................556.2Indexofwsrepstatusvariables......................................646.3Indexofwsrepsystemvariables.....................................676.4Indexofwsrep_provideroptions..................................776.5IndexoffilescreatedbyPXC......................................906.6FrequentlyAskedQuestions.......................................916.7Glossary.................................................93Index97iiiPerconaXtraDBClusterDocumentation,Release5.6.19-25.6PerconaXtraDBClusterisHighAvailabilityandScalabilitysolutionforMySQLUsers.PerconaXtraDBClusterprovides:•Synchronousreplication.Transactioneithercommittedonallnodesornone.•Multi-masterreplication.Youcanwritetoanynode.•Parallelapplyingeventsonslave.Real“parallelreplication”.•Automaticnodeprovisioning.•Dataconsistency.Nomoreunsynchronizedslaves.PerconaXtraDBClusterisfullycompatiblewithMySQLorPerconaServerinthefollowingmeaning:•Datacompatibility.PerconaXtraDBClusterworkswithdatabasescreatedinMySQL/PerconaServer.•Applicationcompatibility.ThereisnoorminimalapplicationchangesrequiredtostartworkwithPerconaXtraDBCluster.CONTENTS1PerconaXtraDBClusterDocumentation,Release5.6.19-25.62CONTENTSCHAPTERONEINTRODUCTION1.1AboutPerconaXtraDBClusterPerconaXtraDBClusterisopen-source,freeMySQLHighAvailabilitysoftware1.1.1Generalintroduction1.TheClusterconsistsofNodes.Recommendedconfigurationistohaveatleast3nodes,butyoucanmakeitrunningwith2nodesaswell.2.EachNodeisregularMySQL/PerconaServersetup.ThepointisthatyoucanconvertyourexistingMySQL/PerconaServerintoNodeandrollClusterusingitasabase.Orotherwise–youcandetachNodefromClusteranduseitasjustaregularserver.3.EachNodecontainsthefullcopyofdata.ThatdefinesXtraDBClusterbehaviorinmanyways.Andobviouslytherearebenefitsanddrawbacks.3PerconaXtraDBClusterDocumentation,Release5.6.19-25.6Benefitsofsuchapproach:•Whenyouexecuteaquery,itisexecutedlocallyonthenode.Alldataisavailablelocally,noneedforremoteaccess.•Nocentralmanagement.Youcanlooseanynodeatanypointoftime,andtheclusterwillcontinuetofunction.•Goodsolutionforscalingareadworkload.Youcanputreadqueriestoanyofthenodes.Drawbacks:•Overheadofjoiningnewnode.Thenewnodehastocopyfulldatasetfromoneofexistingnodes.Ifitis100GB,itcopies100GB.•Thiscan’tbeusedasaneffectivewritescalingsolution.Theremightbesomeimprovementsinwritethroughputwhenyourunwritetrafficto2nodesvsalltrafficto1node,butyoucan’texpectalot.Allwritesstillhavetogoonallnodes.•Youhaveseveralduplicatesofdata,for3nodes–3duplicates.1.1.2WhatiscoredifferencePerconaXtraDBClusterfromMySQLReplication?Let’stakelookintothewellknownCAPtheoremforDistributedsystems.CharacteristicsofDistributedsystems:C-Consistency(allyourdataisconsistentonallnodes),4Chapter1.IntroductionPerconaXtraDBClusterDocumentation,Release5.6.19-25.6A-Availability(yoursystemisAVAILABLEtohandlerequestsincaseoffailureofoneorseveralnodes),P-Partitioningtolerance(incaseofinter-nodeconnectionfailure,eachnodeisstillavailabletohandlerequests).CAPtheoremsaysthateachDistributedsystemcanhaveonlytwooutofthesethree.MySQLreplicationhas:AvailabilityandPartitioningtolerance.PerconaXtraDBClusterhas:ConsistencyandAvailability.ThatisMySQLreplicationdoesnotguaranteeConsistencyofyourdata,whilePerconaXtraDBClusterprovidesdataConsistency(butitlosesPartitioningtoleranceproperty).1.1.3ComponentsPerconaXtraDBClusterisbasedonPerco