In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Requirements, problem solving points:
1: existing mysql data master-slave mode, data synchronization delay
The master-slave process of 2:mysql often crashes, so it is difficult to level the data.
3: database master-slave or master-master mode data query and write slow
The performance of 4:mariadb or mysql database nodes needs to be improved exponentially
5:mariadb or mysql databases have higher requirements for data security.
6: the project requires the database to have the ability to scale out.
7: wait a minute.
1. Summary of MariaDB Galera Cluster:
1. Brief description:
MariaDB Galera Cluster is a system architecture that implements real-time synchronization of multi-master and data on the mysql innodb storage engine. At the business level, there is no need to separate read and write work, and the database read and write pressure can be distributed to each node according to the established rules. Fully compatible with MariaDB and MySQL in terms of data.
two。 Properties:
(1)。 Replicate Synchronous replication synchronously
(2) Active-active multi-master topological logic
(3)。 It can read and write data to any node in the cluster.
(4)。 Automatic membership control, fault nodes are automatically removed from the cluster
(5)。 Automatic node join
(6)。 True parallel replication, based on row level
(7)。 Direct client connection, native MySQL interface
(8)。 Each node contains a complete copy of the data
(9)。 Data synchronization in multiple databases is realized by wsrep interface.
3. Limitation
(1)。 Current replication only supports the InnoDB storage engine. Any tables written to other engines, including mysql.* tables, will not be replicated, but DDL statements will be replicated, so the creating user will be replicated, but insert into mysql.user... It will not be copied.
Delete operation does not support tables without primary keys. Tables without primary keys will have different order in different nodes. If SELECT is performed, the order of tables will be different. LIMIT... Different result sets will appear.
(3)。 LOCK/UNLOCK TABLES is not supported in multi-host environment, as well as lock functions GET_LOCK (), RELEASE_LOCK ().
(4)。 The query log cannot be saved in a table. If you open the query log, it can only be saved to a file.
(5)。 The maximum transaction size allowed is defined by wsrep_max_ws_rows and wsrep_max_ws_size. Any large operation will be rejected. Such as large LOAD DATA operations.
(6)。 Because the cluster is optimistic about concurrency control, the transaction commit may be aborted at this stage. If two transactions are written and committed to the same line to different nodes in the cluster, the failed node will abort. For cluster-level aborts, the cluster returns a deadlock error code (Error: 1213 SQLSTATE: 40001 (ER_LOCK_DEADLOCK)).
(7) .XA transactions are not supported because they may be rolled back on the commit.
(8)。 The write throughput of the entire cluster is limited by the weakest node, and if one node becomes slow, the entire cluster will be slow. In order to achieve stable and high performance requirements, all nodes should use unified hardware.
(9)。 A minimum of 3 cluster nodes are recommended.
(10)。 If there is a problem with the DDL statement, the cluster will be destroyed.
Two: installation and configuration
1: install the system, kernel version
[root@galeradbnode-6-11] #
More / etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@galeradbnode-6-11] #
Uname-a
Linux galeradbnode-6-11 3.10.0-327.18.2.el7.x86_64 # 1 SMP Thu May 12 11:03:55 UTC 2016 x86 "64 GNU/Linux
Mysqld 10.1.14-MariaDB
2: the node information is as follows:
At least 3 nodes are required to install the cluster
Galeradbnode-6-11
Galeradbnode-6-12
Galeradbnode-6-13
3: each node is configured with yum source:
Cat > / etc/yum.repos.d/mariadb.repo
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.