CN107707671A - A kind of method of the unified configuration of MyCat clusters - Google Patents
A kind of method of the unified configuration of MyCat clusters Download PDFInfo
- Publication number
- CN107707671A CN107707671A CN201711036948.2A CN201711036948A CN107707671A CN 107707671 A CN107707671 A CN 107707671A CN 201711036948 A CN201711036948 A CN 201711036948A CN 107707671 A CN107707671 A CN 107707671A
- Authority
- CN
- China
- Prior art keywords
- configuration
- zookeeper
- mycat
- agent end
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000004048 modification Effects 0.000 claims abstract description 10
- 238000012986 modification Methods 0.000 claims abstract description 10
- 230000006870 function Effects 0.000 abstract description 2
- 230000008447 perception Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The method that the present invention provides a kind of unified configuration of MyCat clusters, configuration file change active perception and the function of reloading can not be realized by solving MyCat, and the technical scheme of use is based on for accessing the configuration client of Zookeeper nodes and being deployed in the Configuration Agent end of MyCat nodes:For user by configuring client submission configuration, client, which receives newly to match somebody with somebody, postpones the original configuration of connection Zookeeper backups, and changes and be configured to newly configure;After the completion of the upper configuration file modifications of Zookeeper, Zookeeper Configuration Agent end pushing files altering event is monitored from trend;Each Configuration Agent end listens to heavy duty configuration after document change event;If the heavy duty failure of certain node, configuration client rollback configuration file is called at the Configuration Agent end on the node;After client receives rollback requests, the configuration file backed up before is recovered to Zookeeper;After the completion of the upper configuration files of Zookeeper recover, Zookeeper Configuration Agent end pushing files altering event is monitored from trend;After each Configuration Agent end listens to document change event, heavy duty configuration, complete configuration and retract.
Description
Technical field
The present invention relates to Clustering field, the method for specifically a kind of unified configuration of MyCat clusters.
Background technology
MyCat is a kind of distributed data base middleware, multiple relevant databases can be integrated into one by MyCat
Individual logical data base.The request of user is handled by parallel being assigned on each relevant database, and can effectively be lifted please
The treatment effeciency asked.In order to improve MyCat availability, MyCat also uses distributed deployment way in itself, configuration file by
Zookeeper is uniformly managed, as described in Figure 1.
But MyCat and unrealized configuration file change active perception and the function of reloading.When on Zookeeper
Configuration file there occurs after change, it is necessary to the artificial heavily loaded configuration file on each MyCat examples, if the section of MyCat deployment
Point is relatively more, and the work will become comparatively laborious.If the not heavily loaded configuration file of one of MyCat examples, can cause
SQL statement performs mistake, and loss of data is resulted even in when serious.
The content of the invention
The technical assignment of the present invention is that solve the deficiencies in the prior art, there is provided a kind of method of the unified configuration of MyCat clusters,
Effectively to ensure the uniformity of each node profile in MyCat clusters, prevent cluster causes loss of data extremely.
The technical scheme is that realize in the following manner:
A kind of method of the unified configuration of MyCat clusters, including:
Client is configured, for the configuration file on Zookeeper of changing and retract, any be able to access that can be stored in
On Zookeeper node;
Configuration Agent end, it is deployed on MyCat nodes, thing can be sent to listener by being changed using file on Zookeeper
The characteristic of part, the configuration file change on Zookeeper is monitored, so as to the configuration of real-time heavily loaded MyCat nodes.
The quantity at involved Configuration Agent end is at least one, and the quantity at Configuration Agent end is equal to MyCat quantity.
The specific implementation process of involved method includes:
1)For user by configuring client submission configuration, client, which receives newly to match somebody with somebody, postpones the original configuration of connection Zookeeper backups,
And change and be configured to newly configure;
2)After the completion of the upper configuration file modifications of Zookeeper, the Configuration Agent end pushing files that Zookeeper is monitored from trend become
More event;
3)After each Configuration Agent end listens to document change event, heavy duty configuration;
4)If the heavy duty failure of certain node, configuration client rollback configuration file is called at the Configuration Agent end on the node;
5)After client receives rollback requests, the configuration file backed up before is recovered to Zookeeper;
6)After the completion of the upper configuration files of Zookeeper recover, the Configuration Agent end pushing files that Zookeeper is monitored from trend become
More event;
7)After each Configuration Agent end listens to document change event, heavy duty configuration, complete configuration and retract.
Involved Configuration Agent end by call MyCat "@@config reload " order complete heavy duty configuration.
Caused beneficial effect is a kind of method of the unified configuration of MyCat clusters of the present invention compared with prior art:
1)The method of the present invention can be managed collectively the modification of MyCat cluster configurations by configuring client and Configuration Agent end
And rollback, ensure the uniformity of cluster configuration, prevent from causing cluster state exception and loss of data because configuration is asynchronous, that is,
Say, when configuration file changes, in cluster all nodes can correct heavily loaded configuration file, even if there is node heavily loaded
Configuration failure, configuration file can also be return back to state before modification, and ensure the configuration file before whole cluster loading modification,
Ensure the uniformity of cluster configuration with this;
2)The method of the present invention is applied to MyCat clusters, applies also for other distributions for not possessing unified management allocative abilities
Cluster, such as Memcached(A kind of distributed cache system)Cluster.
Brief description of the drawings
Accompanying drawing 1 is the deployment schematic diagram of prior art;
Accompanying drawing 2 is the method connection block diagram of the present invention.
Accompanying drawing, in mark represent respectively:
1st, client is configured, 2, Configuration Agent end.
Embodiment
Below in conjunction with the accompanying drawings, a kind of method of the unified configuration of MyCat clusters to the present invention is described in detail below.
As shown in Figure 2, the method for the unified configuration of a kind of MyCat clusters of the invention, including:
Client 1 is configured, for the configuration file on Zookeeper of changing and retract, any be able to access that can be stored in
On Zookeeper node;
At least one Configuration Agent end 2, a Configuration Agent end 2 is deployed on a MyCat node, using on Zookeeper
File changes can send the characteristic of event to listener, the configuration file change on Zookeeper be monitored, to weigh in real time
Carry the configuration of MyCat nodes.
Refer to the attached drawing 2, the specific implementation process of involved method include:
1)User submits configuration by configuring client 1, and client receives that new connection Zookeeper backups are original to match somebody with somebody with postponing
Put, and change and be configured to newly configure;
2)After the completion of the upper configuration file modifications of Zookeeper, the Zookeeper pushing files of Configuration Agent end 2 are monitored from trend
Altering event;
3)After each Configuration Agent end 2 listens to document change event, MyCat "@@config reload " order heavy duties are called
Configuration;
4)If the heavy duty failure of certain node, the configuration rollback configuration file of client 1 is called at the Configuration Agent end 2 on the node;
5)After client receives rollback requests, the configuration file backed up before is recovered to Zookeeper;
6)After the completion of the upper configuration files of Zookeeper recover, the Zookeeper pushing files of Configuration Agent end 2 are monitored from trend
Altering event;
7)After each Configuration Agent end 2 listens to document change event, MyCat "@@config reload " order heavy duties are called
Configuration, complete configuration and retract.
In other words, for method of the invention when configuration file changes, all nodes can be correct in cluster
Heavily loaded configuration file, even if there is node heavy duty configuration failure, configuration file can also be return back to state before modification, and ensure whole
Configuration file before individual cluster loading modification, ensure the uniformity of cluster configuration with this.
In addition, the method for the present invention is applied to MyCat clusters, applies also for other and do not possess unified management allocative abilities
Distributed type assemblies, such as Memcached(A kind of distributed cache system)Cluster.
In summary, present disclosure is not limited in the above embodiments, and those skilled in the art can be at this
Other embodiments are proposed within the guiding theory of invention, but these embodiments are included within the scope of the present invention.
Additionally, it should be noted that the language used in this specification primarily to readable and teaching purpose and select
, rather than selected to explain or limit subject of the present invention.Therefore, in the model without departing from appended claims
In the case of enclosing and being spiritual, for those skilled in the art, many modifications and changes are all apparent
's.For the scope of the present invention, the disclosure that the present invention is done is illustrative and be not restrictive, and the scope of the present invention is by appended
Claims limit.
Claims (4)
- A kind of 1. method of the unified configuration of MyCat clusters, it is characterised in that including:Client is configured, for the configuration file on Zookeeper of changing and retract, any be able to access that can be stored in On Zookeeper node;Configuration Agent end, it is deployed on MyCat nodes, thing can be sent to listener by being changed using file on Zookeeper The characteristic of part, the configuration file change on Zookeeper is monitored, so as to the configuration of real-time heavily loaded MyCat nodes.
- A kind of 2. method of the unified configuration of MyCat clusters according to claim 1, it is characterised in that the Configuration Agent The quantity at end is at least one, and the quantity at Configuration Agent end is equal to MyCat quantity.
- A kind of 3. method of the unified configuration of MyCat clusters according to claim 1, it is characterised in that the tool of methods described Body implementation process includes:1)For user by configuring client submission configuration, client, which receives newly to match somebody with somebody, postpones the original configuration of connection Zookeeper backups, And change and be configured to newly configure;2)After the completion of the upper configuration file modifications of Zookeeper, the Configuration Agent end pushing files that Zookeeper is monitored from trend become More event;3)After each Configuration Agent end listens to document change event, heavy duty configuration;4)If the heavy duty failure of certain node, configuration client rollback configuration file is called at the Configuration Agent end on the node;5)After client receives rollback requests, the configuration file backed up before is recovered to Zookeeper;6)After the completion of the upper configuration files of Zookeeper recover, the Configuration Agent end pushing files that Zookeeper is monitored from trend become More event;7)After each Configuration Agent end listens to document change event, heavy duty configuration, complete configuration and retract.
- 4. the method for the unified configuration of a kind of MyCat clusters according to claim 3, it is characterised in that Configuration Agent end leads to Cross " config reload " the order completion heavy duty configurations for calling MyCat.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711036948.2A CN107707671A (en) | 2017-10-30 | 2017-10-30 | A kind of method of the unified configuration of MyCat clusters |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711036948.2A CN107707671A (en) | 2017-10-30 | 2017-10-30 | A kind of method of the unified configuration of MyCat clusters |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107707671A true CN107707671A (en) | 2018-02-16 |
Family
ID=61177080
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711036948.2A Pending CN107707671A (en) | 2017-10-30 | 2017-10-30 | A kind of method of the unified configuration of MyCat clusters |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107707671A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108776696A (en) * | 2018-06-05 | 2018-11-09 | 平安科技(深圳)有限公司 | node configuration method and device, storage medium and electronic equipment |
CN108900347A (en) * | 2018-07-09 | 2018-11-27 | 郑州云海信息技术有限公司 | Cluster initiated configuration method, device, system, equipment and readable storage medium storing program for executing |
CN109408123A (en) * | 2018-10-10 | 2019-03-01 | 聚好看科技股份有限公司 | A kind of method and device that configuration file reloads |
CN109582386A (en) * | 2018-11-09 | 2019-04-05 | 聚好看科技股份有限公司 | Service starting processing method, device, electronic equipment and readable storage medium storing program for executing |
CN110765194A (en) * | 2019-10-22 | 2020-02-07 | 北京二进制信息技术有限公司 | Method and system for processing foreground and background data |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103412768A (en) * | 2013-07-19 | 2013-11-27 | 蓝盾信息安全技术股份有限公司 | Zookeeper cluster automatic-deployment method based on script program |
CN104202383A (en) * | 2014-08-26 | 2014-12-10 | 浪潮软件股份有限公司 | Centralized configuration distribution and management method in distributed cluster environment |
US20150039735A1 (en) * | 2012-02-07 | 2015-02-05 | Cloudera, Inc. | Centralized configuration of a distributed computing cluster |
CN106603281A (en) * | 2016-12-07 | 2017-04-26 | 乐视控股(北京)有限公司 | Configuration file management method and system |
CN106685706A (en) * | 2016-12-14 | 2017-05-17 | 深圳中顺易金融服务有限公司 | Zookeeper based configuration update method and system |
CN106713458A (en) * | 2016-12-23 | 2017-05-24 | 智者四海(北京)技术有限公司 | Zookeeper cluster deployment method, Zookeeper cluster deployment device, Zookeeper instance deployment method, Zookeeper instance deployment device, and Zookeeper cluster management platform |
-
2017
- 2017-10-30 CN CN201711036948.2A patent/CN107707671A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150039735A1 (en) * | 2012-02-07 | 2015-02-05 | Cloudera, Inc. | Centralized configuration of a distributed computing cluster |
CN103412768A (en) * | 2013-07-19 | 2013-11-27 | 蓝盾信息安全技术股份有限公司 | Zookeeper cluster automatic-deployment method based on script program |
CN104202383A (en) * | 2014-08-26 | 2014-12-10 | 浪潮软件股份有限公司 | Centralized configuration distribution and management method in distributed cluster environment |
CN106603281A (en) * | 2016-12-07 | 2017-04-26 | 乐视控股(北京)有限公司 | Configuration file management method and system |
CN106685706A (en) * | 2016-12-14 | 2017-05-17 | 深圳中顺易金融服务有限公司 | Zookeeper based configuration update method and system |
CN106713458A (en) * | 2016-12-23 | 2017-05-24 | 智者四海(北京)技术有限公司 | Zookeeper cluster deployment method, Zookeeper cluster deployment device, Zookeeper instance deployment method, Zookeeper instance deployment device, and Zookeeper cluster management platform |
Non-Patent Citations (3)
Title |
---|
L1028386804: "Mycat之-Mycat集群部署(基于HAProxy + Mycat)", 《CSDN》 * |
周继锋: "分布式数据库架构及企业实践 基于Mycat中间件", 《分布式数据库架构及企业实践 基于MYCAT中间件》 * |
张旭刚等: "基于Zookeeper框架实现MySQL分布式数据库集群", 《计算机与数字工程》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108776696A (en) * | 2018-06-05 | 2018-11-09 | 平安科技(深圳)有限公司 | node configuration method and device, storage medium and electronic equipment |
CN108776696B (en) * | 2018-06-05 | 2023-04-18 | 平安科技(深圳)有限公司 | Node configuration method and device, storage medium and electronic equipment |
CN108900347A (en) * | 2018-07-09 | 2018-11-27 | 郑州云海信息技术有限公司 | Cluster initiated configuration method, device, system, equipment and readable storage medium storing program for executing |
CN108900347B (en) * | 2018-07-09 | 2021-06-29 | 郑州云海信息技术有限公司 | Cluster initialization configuration method, device, system, equipment and readable storage medium |
CN109408123A (en) * | 2018-10-10 | 2019-03-01 | 聚好看科技股份有限公司 | A kind of method and device that configuration file reloads |
CN109408123B (en) * | 2018-10-10 | 2021-08-24 | 聚好看科技股份有限公司 | Method and device for reloading configuration file |
CN109582386A (en) * | 2018-11-09 | 2019-04-05 | 聚好看科技股份有限公司 | Service starting processing method, device, electronic equipment and readable storage medium storing program for executing |
CN109582386B (en) * | 2018-11-09 | 2022-02-25 | 聚好看科技股份有限公司 | Service starting processing method and device, electronic equipment and readable storage medium |
CN110765194A (en) * | 2019-10-22 | 2020-02-07 | 北京二进制信息技术有限公司 | Method and system for processing foreground and background data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107707671A (en) | A kind of method of the unified configuration of MyCat clusters | |
DE112013003312B4 (en) | Data storage subsystem, electronic device and method for monitoring row hammer condition | |
EP3407205B1 (en) | Data operation method and data management server | |
US9292448B2 (en) | Dynamic sizing of memory caches | |
WO2019085334A1 (en) | Distributed storage method, control server and computer readable storage medium | |
US20160212206A1 (en) | Deterministic database system and data transferring method thereof | |
US10656874B2 (en) | Storage device operation control method, and storage device | |
CN103176892B (en) | A kind of page monitoring method and system | |
CN110737398B (en) | Method, apparatus and computer program product for coordinating access operations | |
CN108459913B (en) | Data parallel processing method and device and server | |
CN103780686A (en) | Method and system for customizing application approval procedure in cloud organization | |
WO2022142666A1 (en) | Data processing method and apparatus, and terminal device and storage medium | |
CN107341056A (en) | A kind of method and device of the thread distribution based on NFS | |
CN104660442A (en) | Service provisioning method and system based on MongoDB | |
CN104462447A (en) | Access timeout data processing method and device | |
EP3147789A1 (en) | Method for re-establishing standby database, and apparatus thereof | |
US8789072B2 (en) | Distributed multi-system management | |
CN104391654A (en) | Shared disk management method and system | |
WO2016197953A1 (en) | Method and device for deploying multi-mode base station | |
CN107818167B (en) | MySQL partition automatic management method, system, equipment and storage medium | |
WO2021093323A1 (en) | Data recovery method and system, data storage node, and database management node | |
CN111897643A (en) | Thread pool configuration system, method, device and storage medium | |
CN111783102A (en) | Method for safely expelling nodes in Kubernetes cluster and storage device | |
US10901776B2 (en) | Efficient and scalable transaction processing using a consensus-based transaction model | |
CN106201692A (en) | A kind of timing task processing system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200519 Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park Applicant after: Tidal Cloud Information Technology Co.,Ltd. Address before: 450008 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601 Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180216 |