In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MyCAT background
The predecessor of MyCAT is Alibaba on June 19, 2012. the formal open source database middleware Cobar,Cobar is already open source Amoeba, but after its author Chen Silu left to go to Shanda, Alibaba re-established a project team and changed its name to Cobar considering the stability, performance and functional support of Amoeba, as well as other factors. Cobar is a MySQL distributed processing middleware open source by Alibaba, which can provide massive data services like traditional databases in a distributed environment.
Cobar has been popular with programmers since its birth, but there have been few subsequent updates since 2013. In this case, MyCAT arises at the historic moment, it is based on Ali open source Cobar products and research and development, Cobar stability, reliability, excellent architecture and performance, as well as many mature use cases make MyCAT have a good starting point, standing on the shoulders of giants, MyCAT can see further.
Key features of MyCAT
Comply with Mysql native protocol, cross-language, cross-platform, cross-database general middleware agent.
The SQL92 standard is supported.
Automatic failover based on heartbeat, support for read-write separation, support for MySQL master-slave, and galera cluster clustering.
Support Galera for MySQL cluster, Percona Cluster or MariaDB cluster.
Based on Nio implementation, effective management of threads, high concurrency problems.
Supports automatic routing and aggregation of multiple pieces of data, and supports common aggregation functions such as sum,count,max.
Support arbitrary join within a single library, support cross-library 2-table join, and even multi-table join based on caltlet.
It supports the slicing strategy of global table and ER relationship, and realizes efficient multi-table join query.
Support the multi-tenant scheme.
Support for distributed transactions (weak xa).
Support global serial number to solve the problem of primary key generation in distributed environment.
Slicing rules are rich, plug-in development, easy to expand.
Powerful web, command line monitoring.
The frontend is supported as a general proxy for MySQL, and the backend JDBC supports Oracle, DB2, SQL Server, mongodb, and giant sequoia.
Support password encryption
Support service degradation
Support IP whitelist
Support SQL blacklist and sql injection attack interception
Support for subtables (1. 6) / li >
The cluster is based on ZooKeeper management, online upgrade, expansion, intelligent optimization, big data processing (2.0 development version).
MyCAT architecture
Generally speaking, it is divided into three parts, the front end is the connector, thread management uses a resource pool, and AIO is used by default (these basic information can be seen in the startup log).
The middle tier is clearly described in the figure. SQL parser + SQL routing, SQ,DataNode and heartbeat detection are two components implemented in the middle tier, one is related to the library of MySQL (note, not an example), and the other is the functional module of the common monitoring mechanism.
The lowest level of storage is the MySQL cluster, and it is up to us to decide how to use the MySQL cluster.
MyCAT configuration item
MyCAT currently defines logical libraries and related configurations through configuration files, mainly including three files:
MYCAT_HOME/conf/schema.xml defines logical libraries, tables, sharding nodes, and so on.
Sharding rules are defined in MYCAT_HOME/conf/rule.xml.
Users and system-related variables, such as ports, are defined in MYCAT_HOME/conf/server.xml.
MyCAT deployment
Deploy the mycat software as follows:
1. Uninstall the old jdk
Yum remove java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64 java-1.7.0-openjdk-devel-1.7.0.65-2.5.1.2.el6_5.x86_64
2. Install jdk
Rpm-ivh jdk-8u45-linux-x64.rpm
3. Extract the mycat software and move to the appropriate directory
Tar-zxvf Mycat-server-1.4-RELEASE-20150901112004-linux.tar.gz
Mv mycat / usr/local
4. Create mycat users, software directories, and change passwords
Useradd mycat
Chown-R mycat.mycat / usr/local/mycat
Chmod-R750 / usr/local/mycat
Passwd mycat
5. Test and start mycat
. / mycat console start
Running Mycat-server...
Wrapper |-- > Wrapper Started as Console
Wrapper | Launching a JVM...
Jvm 1 | Java HotSpot (TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
Jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
Jvm 1 |
Jvm 1 | log4j 2015-11-10 14:32:23 [. / conf/log4j.xml] load completed.
Jvm 1 | MyCAT Server startup successfully. See logs in logs/mycat.log
-- started successfully
-- liuyu
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.