CN103118130A - Cluster management method and cluster management system for distributed service - Google Patents
Cluster management method and cluster management system for distributed service Download PDFInfo
- Publication number
- CN103118130A CN103118130A CN2013100586403A CN201310058640A CN103118130A CN 103118130 A CN103118130 A CN 103118130A CN 2013100586403 A CN2013100586403 A CN 2013100586403A CN 201310058640 A CN201310058640 A CN 201310058640A CN 103118130 A CN103118130 A CN 103118130A
- Authority
- CN
- China
- Prior art keywords
- master
- server
- chosen
- cluster
- unit
- 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
Images
Landscapes
- Computer And Data Communications (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a cluster management method and a cluster management system for distributed service. Each server sends a registration request to Zookeeper service; each server is registered by the Zookeeper service according to the registration request, and one of the servers is selected as a Master according to a sequence; whether the registered server is selected as the Master or not is judged, if the judgment result is yes, then the server selected as the Master serves as a cluster manager to manage all the servers and waits for the other servers which are not selected as the Master to register, otherwise, the severs which are not selected as the Master registers to the server selected as the Master. After all the servers in a cluster are started, the Master is elected through the Zookeeper, a Worker contacts the Master proactively, and thus, the Master manages all the servers in the cluster.
Description
Technical field
The present invention relates to communication technical field, relate in particular to a kind of cluster management method for Distributed Services and system.
Background technology
Distributed server is exactly that index certificate and program can be on servers, but be distributed to a plurality of servers, disperse the geographic information data that distributes and be subjected to its database manipulation that affects as a kind of theoretical calculation model form server of research object on network.The distributed task that is conducive to is distributed and optimization on whole computer system, overcome traditional integrated system and can cause the nervous defective with the response bottleneck of central host resource, solved the problems such as the Heterogeneous data that exists in the network, data sharing, computing complexity.ZooKeeper is Hadoop(distributed system service architecture) formal sub-project, it be one for the reliable coherent system of large-scale distributed system, the function that provides comprises: configuring maintenance, name Service, distributed synchronization, group service etc.The target of ZooKeeper is exactly the key service that packaged complexity is easily made mistakes, and the interface of use and performance are efficient with being simple and easy to, the system of function-stable offers the user.
Server in cluster is divided into two class role: Master and Worker, and Master is in charge of the Servers-all in cluster and query interface is provided, and the state that Worker is responsible for reporting oneself is to Master and the commander that is subjected to Master.Zookeeper is as a distributed service framework, it can provide the data storage based on the directory node tree mode that is similar to file system, but Zookeeper stores data specially, and its effect is mainly the state variation of safeguarding and monitor the data of storage.
Summary of the invention
The technical problem that (one) will solve
For defects, the technical problem to be solved in the present invention is how to solve the consistency problem of application system in distributed type assemblies under distributed environment.
(2) technical scheme
For addressing the above problem, the invention provides a kind of cluster management method for Distributed Services, described method comprises:
S1: each server sends registration request to the Zookeeper service;
S2: described Zookeeper service is registered each server according to described registration request, and one of them server selected according to sequencing is as Master;
S3: each registered server judges whether to be chosen to be Master, and if yes then enter step S4, otherwise the server that is not chosen to be Master is registered to the server of the described Master of being chosen to be;
S4: the server of the described Master of being chosen to be manages all servers as cluster administrator, and waits for that other server that is not chosen to be Master registers.
Preferably, also comprise before described step S1:
S0: automatically start a service after the Servers-all in cluster starts.
Preferably, after a server in described cluster was chosen to be Master, other server initiatively contacted the server of the described Master of being chosen to be.
For addressing the above problem, the present invention also provides a kind of cluster management system for Distributed Services, and described system specifically comprises:
The first registering unit, Master select unit, judging unit, the second registering unit and administrative unit;
Described the first registering unit is used for each server and registers to Zookeeper service transmission registration request;
The selected unit of described Master is used for stating the Zookeeper service to be registered each server according to described registration request, and one of them server selected according to sequencing is as Master;
Described judging unit is used for each registered server and judges whether to be chosen to be Master, if yes then enter described administrative unit, otherwise enters described the second registering unit;
Described the second registering unit is registered to the server of the described Master of being chosen to be for the server that is not chosen to be Master;
The server that described administrative unit is used for the described Master of being chosen to be manages all servers as cluster administrator, and waits for that other server that is not chosen to be Master registers.
Preferably, described system also comprises the service start unit, and the Servers-all that is used for cluster starts the rear service that automatically starts.
(3) beneficial effect
The present invention proposes a kind of cluster management method for Distributed Services and system, at first the cluster Servers-all elects Master by Zookeeper after starting, then Worker initiatively contacts Master, thereby realizes that Master is to the management of Servers-all in cluster.By monitoring the variation of these data modes, thereby can reach the cluster management of based on data.
Description of drawings
Fig. 1 is the flow chart of a kind of cluster management method for Distributed Services of the embodiment of the present invention one;
Fig. 2 is the composition schematic diagram of a kind of cluster management system for Distributed Services of the embodiment of the present invention two.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
Embodiment one
A kind of cluster management method for Distributed Services is provided in the embodiment of the present invention one, and steps flow chart specifically comprises the following steps as shown in Figure 1:
Step S1: each server sends registration request to the Zookeeper service.
Also comprise before step S1:
Step S0: automatically start a service after the Servers-all in cluster starts.
Step S2:Zookeeper service is registered each server according to registration request, and one of them server selected according to sequencing is as Master;
Step S3: each registered server judges whether to be chosen to be Master, and if yes then enter step S4, otherwise the server that is not chosen to be Master is registered to the server that is chosen to be Master;
Step S4: the server that is chosen to be Master manages all servers as cluster administrator, and waits for that other server that is not chosen to be Master registers.After a server in cluster was chosen to be Master, other server initiatively contacted the server that is chosen to be Master.
By using said method, at first the cluster Servers-all elects Master by Zookeeper after starting, and then Worker initiatively contacts Master, thereby realizes that Master is to the management of Servers-all in cluster.By monitoring the variation of these data modes, thereby can reach the cluster management of based on data.
Embodiment two
For achieving the above object, a kind of cluster management system for Distributed Services also is provided in embodiments of the invention two, form schematic diagram as shown in Figure 2, specifically comprise:
The first registering unit 21, Master select unit 22, judging unit 23, the second registering unit 24 and administrative unit 25.
The first registering unit 21 is used for each server and registers to Zookeeper service transmission registration request.
The selected unit 22 of Master is used for stating the Zookeeper service to be registered each server according to registration request, and one of them server selected according to sequencing is as Master.
The second registering unit 24 is registered to the server that is chosen to be Master for the server that is not chosen to be Master.
The server that administrative unit 25 is used for being chosen to be Master manages all servers as cluster administrator, and waits for that other server that is not chosen to be Master registers.
System also comprises service start unit 20, and the Servers-all that is used for cluster starts the rear service that automatically starts.
By said system, at first the cluster Servers-all elects Master by Zookeeper after starting, and then Worker initiatively contacts Master, thereby realizes that Master is to the management of Servers-all in cluster.By monitoring the variation of these data modes, thereby can reach the cluster management of based on data.
Above execution mode only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (5)
1. a cluster management method that is used for Distributed Services, is characterized in that, described method specifically comprises:
S1: each server sends registration request to the Zookeeper service;
S2: described Zookeeper service is registered each server according to described registration request, and one of them server selected according to sequencing is as Master;
S3: each registered server judges whether to be chosen to be Master, and if yes then enter step S4, otherwise the server that is not chosen to be Master is registered to the server of the described Master of being chosen to be;
S4: the server of the described Master of being chosen to be manages all servers as cluster administrator, and waits for that other server that is not chosen to be Master registers.
2. the method for claim 1, is characterized in that, also comprises before described step S1:
S0: automatically start a service after the Servers-all in cluster starts.
3. the method for claim 1, is characterized in that, after a server in described cluster was chosen to be Master, other server initiatively contacted the server of the described Master of being chosen to be.
4. a cluster management system that is used for Distributed Services, is characterized in that, described system specifically comprises:
The first registering unit, Master select unit, judging unit, the second registering unit and administrative unit;
Described the first registering unit is used for each server and registers to Zookeeper service transmission registration request;
The selected unit of described Master is used for stating the Zookeeper service to be registered each server according to described registration request, and one of them server selected according to sequencing is as Master;
Described judging unit is used for each registered server and judges whether to be chosen to be Master, if yes then enter described administrative unit, otherwise enters described the second registering unit;
Described the second registering unit is registered to the server of the described Master of being chosen to be for the server that is not chosen to be Master;
The server that described administrative unit is used for the described Master of being chosen to be manages all servers as cluster administrator, and waits for that other server that is not chosen to be Master registers.
5. system as claimed in claim 4, is characterized in that, described system also comprises the service start unit, and the Servers-all that is used for cluster starts the rear service that automatically starts.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100586403A CN103118130A (en) | 2013-02-25 | 2013-02-25 | Cluster management method and cluster management system for distributed service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100586403A CN103118130A (en) | 2013-02-25 | 2013-02-25 | Cluster management method and cluster management system for distributed service |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103118130A true CN103118130A (en) | 2013-05-22 |
Family
ID=48416400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013100586403A Pending CN103118130A (en) | 2013-02-25 | 2013-02-25 | Cluster management method and cluster management system for distributed service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103118130A (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103312809A (en) * | 2013-06-24 | 2013-09-18 | 北京汉柏科技有限公司 | Distributed management method for service in cloud platform |
CN103384211A (en) * | 2013-06-28 | 2013-11-06 | 百度在线网络技术(北京)有限公司 | Data manipulation method with fault tolerance and distributed type data storage system |
CN103795572A (en) * | 2014-01-24 | 2014-05-14 | 北京京东尚科信息技术有限公司 | Method for switching master server and slave server and monitoring server |
CN103905537A (en) * | 2014-03-20 | 2014-07-02 | 冶金自动化研究设计院 | System for managing industry real-time data storage in distributed environment |
CN103997498A (en) * | 2014-05-27 | 2014-08-20 | 北京京东尚科信息技术有限公司 | Distributed lock service implementation method and component |
CN104753994A (en) * | 2013-12-27 | 2015-07-01 | 杭州海康威视系统技术有限公司 | Method and device for data synchronization based on cluster server system |
CN104866378A (en) * | 2015-05-29 | 2015-08-26 | 北京京东尚科信息技术有限公司 | System and method for coordinating execution tasks |
CN105338028A (en) * | 2014-07-30 | 2016-02-17 | 浙江宇视科技有限公司 | Method and device for selecting master and slave nodes in distributed server cluster |
CN106559332A (en) * | 2016-11-03 | 2017-04-05 | Tcl集团股份有限公司 | A kind of method and system of fast assembling full-mesh server cluster |
CN107807608A (en) * | 2017-11-02 | 2018-03-16 | 腾讯科技(深圳)有限公司 | Data processing method, data handling system and storage medium |
CN108156203A (en) * | 2016-12-06 | 2018-06-12 | 杭州海康威视数字技术股份有限公司 | A kind of storage system and storage node management method |
CN109921925A (en) * | 2019-02-15 | 2019-06-21 | 北京奇艺世纪科技有限公司 | A kind of dial testing method and device |
CN110083504A (en) * | 2019-03-29 | 2019-08-02 | 北京奇安信科技有限公司 | The running state monitoring method and device of distributed task scheduling |
CN110209910A (en) * | 2019-05-20 | 2019-09-06 | 无线生活(杭州)信息科技有限公司 | Index switching dispatching method and dispatching device |
CN111338647A (en) * | 2018-12-18 | 2020-06-26 | 杭州海康威视数字技术股份有限公司 | Big data cluster management method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102088439A (en) * | 2009-12-04 | 2011-06-08 | 上海威乾视频技术有限公司 | Method for accessing front-end equipment based on Internet explorer (IE) |
US20130013766A1 (en) * | 2009-12-11 | 2013-01-10 | Deutsche Telekom Ag | Computer cluster and method for providing a disaster recovery functionality for a computer cluster |
CN102932210A (en) * | 2012-11-23 | 2013-02-13 | 北京搜狐新媒体信息技术有限公司 | Method and system for monitoring node in PaaS cloud platform |
-
2013
- 2013-02-25 CN CN2013100586403A patent/CN103118130A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102088439A (en) * | 2009-12-04 | 2011-06-08 | 上海威乾视频技术有限公司 | Method for accessing front-end equipment based on Internet explorer (IE) |
US20130013766A1 (en) * | 2009-12-11 | 2013-01-10 | Deutsche Telekom Ag | Computer cluster and method for providing a disaster recovery functionality for a computer cluster |
CN102932210A (en) * | 2012-11-23 | 2013-02-13 | 北京搜狐新媒体信息技术有限公司 | Method and system for monitoring node in PaaS cloud platform |
Non-Patent Citations (5)
Title |
---|
ZOOKEEPER: "ZooKeeper Internals", 《HTTP://ZOOKEEPER.APACHE.ORG/DOC/R3.2.2/ZOOKEEPERINTERNALS.HTML》 * |
ZOOKEEPER: "ZooKeeper Recipes and Solutions", 《HTTP://ZOOKEEPER.APACHE.ORG/DOC/R3.2.2/RECIPES.HTML》 * |
时光网: "《zookeeper启动——服务初始化》", 《HTTP://I.MTIME.COM/844165/BLOG/7412618》 * |
许令波: "《分布式服务框架 Zookeeper--管理分布式环境中的数据》", 《HTTP://WWW.IBM.COM/DEVELOPERWORKS/CN/OPENSOURCE/OS-CN-ZOOKEEPER,分布式服务框架 ZOOKEEPER--管理分布式环境中的数据》 * |
读书人网: "《深入显出Zookeeper之六 Leader/Follower初始化》", 《HTTP://WWW.READER8.CN/JIAOCHENG/20130126/2207109.HTML,深入显出ZOOKEEPER之六 LEADER/FOLLOWER初始化》 * |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103312809A (en) * | 2013-06-24 | 2013-09-18 | 北京汉柏科技有限公司 | Distributed management method for service in cloud platform |
CN103384211A (en) * | 2013-06-28 | 2013-11-06 | 百度在线网络技术(北京)有限公司 | Data manipulation method with fault tolerance and distributed type data storage system |
CN104753994A (en) * | 2013-12-27 | 2015-07-01 | 杭州海康威视系统技术有限公司 | Method and device for data synchronization based on cluster server system |
CN103795572A (en) * | 2014-01-24 | 2014-05-14 | 北京京东尚科信息技术有限公司 | Method for switching master server and slave server and monitoring server |
CN103795572B (en) * | 2014-01-24 | 2017-07-21 | 北京京东尚科信息技术有限公司 | The switching method and monitoring server of principal and subordinate's server |
CN103905537A (en) * | 2014-03-20 | 2014-07-02 | 冶金自动化研究设计院 | System for managing industry real-time data storage in distributed environment |
CN103997498A (en) * | 2014-05-27 | 2014-08-20 | 北京京东尚科信息技术有限公司 | Distributed lock service implementation method and component |
CN105338028A (en) * | 2014-07-30 | 2016-02-17 | 浙江宇视科技有限公司 | Method and device for selecting master and slave nodes in distributed server cluster |
CN105338028B (en) * | 2014-07-30 | 2018-12-07 | 浙江宇视科技有限公司 | Main and subordinate node electoral machinery and device in a kind of distributed server cluster |
CN104866378A (en) * | 2015-05-29 | 2015-08-26 | 北京京东尚科信息技术有限公司 | System and method for coordinating execution tasks |
CN106559332A (en) * | 2016-11-03 | 2017-04-05 | Tcl集团股份有限公司 | A kind of method and system of fast assembling full-mesh server cluster |
CN106559332B (en) * | 2016-11-03 | 2020-08-18 | Tcl科技集团股份有限公司 | Method and system for quickly establishing fully-connected server cluster |
CN108156203A (en) * | 2016-12-06 | 2018-06-12 | 杭州海康威视数字技术股份有限公司 | A kind of storage system and storage node management method |
CN108156203B (en) * | 2016-12-06 | 2021-01-08 | 杭州海康威视数字技术股份有限公司 | Storage system and storage node management method |
CN107807608A (en) * | 2017-11-02 | 2018-03-16 | 腾讯科技(深圳)有限公司 | Data processing method, data handling system and storage medium |
CN111338647A (en) * | 2018-12-18 | 2020-06-26 | 杭州海康威视数字技术股份有限公司 | Big data cluster management method and device |
CN111338647B (en) * | 2018-12-18 | 2023-09-12 | 杭州海康威视数字技术股份有限公司 | Big data cluster management method and device |
CN109921925A (en) * | 2019-02-15 | 2019-06-21 | 北京奇艺世纪科技有限公司 | A kind of dial testing method and device |
CN110083504A (en) * | 2019-03-29 | 2019-08-02 | 北京奇安信科技有限公司 | The running state monitoring method and device of distributed task scheduling |
CN110209910A (en) * | 2019-05-20 | 2019-09-06 | 无线生活(杭州)信息科技有限公司 | Index switching dispatching method and dispatching device |
CN110209910B (en) * | 2019-05-20 | 2021-06-04 | 无线生活(杭州)信息科技有限公司 | Index switching scheduling method and scheduling device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103118130A (en) | Cluster management method and cluster management system for distributed service | |
US11461329B2 (en) | Tracking query execution status for selectively routing queries | |
CN107181808B (en) | Private cloud system and operation method | |
US10970303B1 (en) | Selecting resources hosted in different networks to perform queries according to available capacity | |
CN110851278A (en) | Distribution network automation master station mobile application service management method and system based on micro-service architecture | |
CN104486445A (en) | Distributed extendable resource monitoring system and method based on cloud platform | |
CN104463492A (en) | Operation management method of electric power system cloud simulation platform | |
CN105183820A (en) | Multi-tenant supported large data platform and tenant access method | |
CN103581325B (en) | A kind of cloud computing resources cell system and its implementation method | |
CN102904892A (en) | Security model and security strategy of cloud computing data center operating system | |
CN109067903B (en) | Cloud platform cascade system | |
US10944814B1 (en) | Independent resource scheduling for distributed data processing programs | |
US8751711B2 (en) | Storage topology manager | |
CN102207978A (en) | Database access method and system | |
CN102915255A (en) | Cloud computing service system and method for massive dataset parallel computation | |
CN112685499A (en) | Method, device and equipment for synchronizing process data of work service flow | |
EP3306471B1 (en) | Automatic server cluster discovery | |
CN110928681A (en) | Data processing method and device, storage medium and electronic device | |
CN104363306A (en) | Private cloud management control method for enterprise | |
US10469340B2 (en) | Task extension for service level agreement state management | |
US20200233870A1 (en) | Systems and methods for linking metric data to resources | |
CN111752539B (en) | BI service cluster system and construction method thereof | |
CN104166581A (en) | Virtualization method for increment manufacturing device | |
CN107645423A (en) | The display systems and its method of a kind of monitoring data | |
CN104714923A (en) | Method and device for achieving equipment sharing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130522 |