You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
New to KubeDB? Please start here.
Percona Server is a drop-in replacement fork of the MySQL project developed by Percona. Percona aims to provide better performance, and improvements on MySQL. They integrate XtraDB (backward compatible fork of INNODB
storage engine) as the storage engine.
Percona XtraDB Cluster is a fully open-source high-availability solution for MySQL. It is a integration of Percona Server and Galera replication library that enables a synchronous multi-master replication.
It is offers,
writesets
(transactions) from any of nodes.Here, we will talk about Percona XtraDB Cluster 5.7 (PXC-5.7).
It is released as GA in Sep 2016. After then the team added lot of things to it, fixed bugs and at a regular interval they have been bringing new releases.
It is also called cluster safe mode. The idea behind this is as following.
There are a lot of experimental and unsupported features that are available and are not suitable for multi-master environment. PXC Strict Mode avoids the use of these features by performing some validation. For example,
Percona XtraDB Cluster does not support following statements for a non-transactional storage engine like MyISAM, MEMORY, CSV, etc. to ensure data consistency:
INSERT
, UPDATE
, DELETE
, etc.)CHECK
, OPTIMIZE
, REPAIR
, and ANALYZE
TRUNCATE TABLE
and ALTER TABLE
Since MyISAM has non-transactional nature, Percona XtraDB Cluster restricts enabling its replication to ensure data consistency by setting the value of wsrep_replicate_myisam
to OFF
(which is default).
The binary logging format supported by the Percona XtraDB Cluster has to be ROW
which is default. It is controlled by setting variable binlog_format
to ROW
. Setting the value other than ROW
at startup changes the global scope.
DML on the table without primary key is not allowed. Because if you have a table without a primary key, it is difficult for it to recognize any particular entity across the cluster uniquely. So, data manipulation statements that perform writing to table (especially DELETE
).
Table locking operations are only experimental in Percona XtraDB Cluster. Anything which is local to a given node of a cluster is not good for any multi-master environment like Percona XtraDB Cluster. So Operations like LOCK TABLES
, GET_LOCK()
, RELEASE_LOCK()
, FLUSH TABLES <tables> WITH READ LOCK
, etc. that may lead to explicit table locking are blocked.
Since CREATE TABLE ... AS SELECT
is actually a mix of DDL and DML, it is not good from a multi-master perspective because you can not roll back DDL and DDLs are still non-transactional.
Executing local operation like ALTER
IMPORT
/DISCARD
to a node, is local to that node since that operation happens with the file systems . If we try to replicate it, other node will be inconsistent state. Scenario becomes like that we discard a table on this node but other node will still have the table and active.
Percona XtraDB Cluster introduced PXC Strict Mode which can take the following four values:
ENFORCING
is default one. If we try to use any of these features, corresponding operations will be blocked by raising an error.PERMISSIVE
logs a warning instead of generating an error and continues as normal, if a validation fails.MASTER
is used in the case when the writes are restricted to only one master. The effects are same as ENFORCING
except the locks.DISABLED
leaves the cluster as it is in 5.6. In DISABLED
mode, there is no warning, no error messages and the cluster runs as normal.High availability means continue to function even in unexpected situation like a node crashing or network failure. In a 3 nodes Percona XtraDB Cluster setup, the cluster will continue to work normally if any of the nodes down at any point in time. It will be able to run fine. In a situation like this there may happen any of the following two:
It means any node accepts writes in the cluster. Percona XtraDB Cluster provides such replication ensuring that the writes are consistent for nodes across the cluster. Of course it is different from the MySQL replication. You can see more here.
Following diagram shows such replication:
Image ref: https://www.percona.com/doc/percona-xtradb-cluster/LATEST/intro.html
INNODB
storage engine. Using XtraDB, it is possible to get better performance and efficiency. It offers faster query response.