Home » MySQL » PXC Chinese document

PXC Chinese document

PXC Chinese document


Chapter 1

1.1 about PXC

PXC is open source free MySQL high availability software.

1.1.1 general introduction

The 1> cluster is made up of many nodes, and it is recommended to configure at least 3 brother nodes, but it can also run on two nodes.

2> each node is the same as MySQL or percona server,

3> each node is an independent full amount of data,


The architecture diagram for

three nodes is as follows:


advantages and disadvantages:


advantages:

* when you perform a SQL when it is executed in a one node, i.e. each node is a full amount of data, so the needs of each query range of data on a single node can be found, do not need to access other
nodes
* without central administration, any node can be lost at any time and will not affect the normal operation of the cluster

*PXC is a good way to reduce the read load, and you can perform your reading operations on any node

Disadvantages

* the cost of adding a new node is expensive, and the new node needs to copy all existing data. If the existing single node data is 100G, then the newly added node will go to the copy100G data.

*PXC doesn't reduce the pressure of write operations, perhaps more efficiently than single node writes, but you can't expect him to perform well, after all, the data is written to each node.

* there will be a lot of redundant data, how many nodes, how many redundant

will have

1.1.2 component


Some restrictions on

1.2 PXC

You should be aware of some of the limitations of PXC, some of which will be patched in later releases, and some of which are restrictions on the design itself,

* only type InnoDB table is copied, any other types, including the system tables are not copied. However, the DDL statement to a sentence copy for the MySQL table DDL will also be copied, so create user XXXXX can be copied, but insert into mysq.user will not be copied. You can open the table MyISAM replication by h wsrep_replicate_myisam. this parameter, but this feature is still in the experimental stage
.
* unsupported queries

- LOCK/UNLOCK, TABLES, cannot, be, supported, in, multi-master,
, setups.,...
- lock functions (GET_LOCK (), RELEASE_LOCK ()...
)
* ordinary logs cannot be saved on the table, and can only be stored in file

* the maximum limit of transactions is controlled by the following two parameters: wsrep_max_ws_rows, and, wsrep_max_ws_size, load, data, in, file, and
, each line of 1W makes a commit, so a large load data infile operation will be
Split into several small transactions.

* due to optimistic concurrency control cluster, transaction commit operation may fail, there will be two transactions at the same time in the same row data of different nodes, commit operation is in even one node, only one of which will be executed successfully, another thrown deadlock anomaly, and return to
.
* XA, transactions, can, not, be, supported, due, to, possible,, rollback, on, commit,

* write speed of the entire cluster node that depends on the weakest, if one of the nodes is very slow, so the whole cluster will be very slow, if you need a stable and efficient performance, then all nodes should be configured as
.
* there are at least 3 nodes, and third nodes can be used as a decision maker,

* Innodb fake changes feature is not supported. This is a feature of percona
, server
* enforce_storage_engine=InnoDB, is, not, compatible, wsrep_replicate_myisam=OFF (default). These two arguments are not compatible with

* unsupported binlog_rows_query_log_events

* Backup, locks, used, during, SST, with, Xtrabackup, can, crash, on, donor, either, or, use, inno-backup-,

Opts= 'no-backup-locks' under [sst] in - my.cnf or set FORCE_FTWRL=1 in /etc/sysconfig/mysql (or /etc/sysconfig/mysql.%i for corresponding unit/service for CentOS/RHEL or /etc/default/mysql in) de-

Bian/ubuntu., You, can, also, use, Rsync, as, the, alternate, SST, method, those, don, if,, t, work. are not going to go on,


1.3PXC error diagnosis

1.3.1 known problems

Here are some things that might affect you when you use PXC.

Deadlocks occur when *create table, as, select, XXX, and DDL coexist with operations, not just CTAS operations,

* when installing for the first time, it is recommended to install with an original kit. See stalling Percona XtraDB Cluster from Binaries

for more information

1.3.2 incompatible things, incompatible scenes,

Some sensible ones are not compatible,

* wsrep_sst_donor, now, supports, comma, separated, of, nodes, as, list, a, consequence, of,, bug, #1129512., This,

Only, affects, if, you, use, this, as, a, list., This, is, not, compatible, with, option, nodes, running, older, PXC, hence,

Entire, cluster, will, be, as, far, as, SST, is, concerned, since, donor, nodes, won, t, affected, recognise,, the, request,

From, joiner, nodes, if, former, not, upgraded., Minimal, workaround, is, to, are, upgrade, Galera,, package, or, to,

Not, use, this, new, feature (wsrep_sst_donor, with, single, can, still, be, used). However, upgrading, the, full, node,

PXC, is, strongly, recommended, however, just, upgrading, PXC, Galera, package,, will, do, for, this.


Latest