MySQL 40th article ~canal+otter's first attempt

Source: Internet
Author: User
Tags zookeeper node server

A brief introduction: Today let's talk about the combination of canal and otter.
Two concept statistics
1. Get database delta log data based on canal open source products.

2. Typical management system architecture, Manager (Web Management) +node (work node)

A. Manager run-time push synchronization configuration to node nodes

B. Node nodes feed the sync status to the manager

3. Based on zookeeper, solve the distributed state scheduling, and allow multiple node nodes to work together.

Three machine components:

1 Manager node (preferably with database) 2 node 3 ZK cluster 4 MySQL database (2 units)

Quad Manager installation

1 Download the SQL file and import
wget Https://raw.github.com/alibaba/otter/master/manager/deployer/src/main/resources/sql/otter-manager-schema.sql
SOURCE Otter-manager-schema.sql
2 Download the installation package
wget https://github.com/alibaba/otter/releases/download/v4.2.15/manager.deployer-4.2.15.tar.gz
Tar xzvf manager.deployer-4.2.15.tar.gz-c/usr/local/otter-manager
3 Modifying the configuration file otter.properties
Otter.zookeeper.cluster.default = ZK Address: 2181
otter.domainname = Native IP address
Otter.database.driver.url = Jdbc:mysql://ip:3306/otter
Otter.database.driver.username = user Name
Otter.database.driver.password = password//otter The management node needs to use the database, here is set the user name password to connect to this database
4 Start the appropriate process
startup.sh
5 Manager Launch Test
Access Address http://127.0.0.1:8080/login.htm, the initial password is: admin/admin

6 Access Success


Two node start
Note You must install the manager to configure the node nodes in the Web interface
1 Login Web interface to configure node node


Machine Name: Can be arbitrarily defined, easy to remember can
Machine IP: Corresponds to the machine IP that node nodes will deploy, and if multiple IPs are available, one IP can be selected for exposure. (This IP is the gateway of the whole cluster communication, do not use 127.0.0.1, otherwise the node nodes of multiple machines will not be recognized)
Machine Port: Corresponds to the data communication port that node nodes will start when they are deployed, recommended value: 2088
Download port: Corresponds to the data download port that node nodes will start when they are deployed, recommended value: 9090
External IP: Corresponds to the machine IP that node nodes will deploy, an external IP exists, allowing traffic to be processed at the time of the public network.
Zookeeper cluster: In order to improve communication efficiency, different machine room machines can choose the nearest zookeeper cluster.
2 Installing configuration from a node server
1 wget https://github.com/alibaba/otter/releases/download/v4.2.15/node.deployer-4.2.15.tar.gz
Tar xzvf node.deployer-4.2.15.tar.gz-c/usr/local/otter-node
wget http://repository.it4i.cz/mirrors/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/ rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
RPM-IVH rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Yum-y Install ARIA2

2 Modifying a configuration file

1 NID configuration

echo 1 > Conf/nid (nid here is the first ID generated by the first step configuration)
2 otter.properties Configuration Modification
otter.manager.address = ip:1099 correct Otter-manager address
3 Starting the Node node service

3 Viewing status

Status enabled on behalf of normal, if not enabled, please check the date to troubleshoot, possibly port occupied

Note that otter+canal only supports the Binlog format in row format

At this point, the master-slave node configuration is complete, today first come here

MySQL 40th article ~canal+otter's first attempt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.