CN105245603B - Cluster server control method and system - Google Patents

Cluster server control method and system Download PDF

Info

Publication number
CN105245603B
CN105245603B CN201510671787.9A CN201510671787A CN105245603B CN 105245603 B CN105245603 B CN 105245603B CN 201510671787 A CN201510671787 A CN 201510671787A CN 105245603 B CN105245603 B CN 105245603B
Authority
CN
China
Prior art keywords
server
cluster
zookeeper
gateserver
list
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.)
Active
Application number
CN201510671787.9A
Other languages
Chinese (zh)
Other versions
CN105245603A (en
Inventor
陈治国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING LOCOJOY TECHNOLOGY Co Ltd
Original Assignee
BEIJING LOCOJOY TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BEIJING LOCOJOY TECHNOLOGY Co Ltd filed Critical BEIJING LOCOJOY TECHNOLOGY Co Ltd
Priority to CN201510671787.9A priority Critical patent/CN105245603B/en
Publication of CN105245603A publication Critical patent/CN105245603A/en
Application granted granted Critical
Publication of CN105245603B publication Critical patent/CN105245603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements

Abstract

This application discloses a kind of cluster server control methods, comprising: GateServer is issued to zookeeper and requested, it is desirable that it monitors the state change that each member server is online or offline in cluster;When member server in cluster starts, actively registered to zookeeper, and register list is formed in zookeeper;The status change notification GateServer of member server is formed server list by zookeeper in GateServer;When member server in cluster stops working, zookeeper actively deletes the member server to stop working from its register list, and GateServer is notified to carry out server list update;When client terminal start-up, newest server list is requested to GateServer.Invention additionally discloses a kind of cluster server control systems, including GateServer, zookeeper, at least one member server and at least one client.Such scheme, can on the server line or it is offline when, in time by available server update to newest server list, and not available server is deleted from server list, be not necessarily to manual intervention.

Description

Cluster server control method and system
Technical field
This application involves technical field of internet application, specifically, being related to a kind of cluster server control method and being System.
Background technique
Currently, cloud computing and Intelligent cluster have become one of currently the most important computing architecture.Either in cloud computing Cloud or Intelligent cluster in cluster be all to be made of some members with operational capability, the computing capability of these members can It can be provided by individual physical equipment, it is also possible to based on the technical operation such as virtual machine, virtualization on the physical devices some Logical node.The characteristics of cloud computing and Intelligent cluster is the dynamic of height, one of them most important part is cluster member It is dynamic to increase, delete.Traditional mode, cluster are all to carry out the distribution of member, the composition of cluster is quiet by static configuration State is needed if necessary to increase, removing members by reconfiguring cluster, and the change of cluster member is inflexible.It is currently a popular Some dynamic cluster maintenance schemes based on multicast and P-2-P technology, the communication technology very complicated being related to are safeguarded and are matched The complexity set is higher, for large-scale cluster topology stability it is difficult to ensure that.The static configuration that cluster is constituted is not able to satisfy height The dynamic requirement for calculating environment of degree, and it is excessively complicated by multicast and the point-to-point dynamic cluster framework for waiting technical maintenances.
Especially since the special requirement of Cloud Server, needs service to be clustered into when not available by not available Member's server node is extractd, wherein not available reason may be collapse, maintenance, upgrading etc., so server cluster needs one Perfect full-automatic online offline strategy is covered, to notify the newest available server list of cluster server.
Summary of the invention
In view of this, the technical problem to be solved by the application is to provide a kind of cluster server control method and being System, can on the server line or it is offline when, in time by available server update to newest server list, and can not Server is deleted from server list, and in whole process, server is automatically processed with O&M activity, without artificial dry In advance.
In order to solve the above-mentioned technical problem, the application has following technical solution:
The present invention provides a kind of cluster server control method characterized by comprising
GateServer is issued to zookeeper and is requested, it is desirable that it is online or offline that it monitors each member server in cluster State change;
When member server in cluster starts, actively registered to zookeeper, and formed in zookeeper Register list;The status change notification GateServer of member server is formed clothes by zookeeper in GateServer Business device list;
When member server in cluster stops working, zookeeper actively by the member server to stop working from its It is deleted in register list, and GateServer is notified to carry out server list update;
When client terminal start-up, newest server list is requested to GateServer.
Preferably, wherein client access cluster in member server request continuously fail preset times n times when, visitor Family end obtains newest available server list again through GateServer.
Preferably, wherein the preset times n is 3
Preferably, wherein when the member server in cluster accesses to other member servers in cluster, first from Zookeeper obtains the register list of server, then the request that accesses.
Preferably, wherein the GateServer is registered to without monitoring and zookeeper's and does not provide service externally Member server state change.
The present invention also provides a kind of cluster server control systems, which is characterized in that including GateServer, Zookeeper, at least one member server and at least one client,
The GateServer is requested for issuing to zookeeper, it is desirable that it is monitored in cluster on each member server Line or offline state change form server list;And for becoming in the member server state for receiving zookeeper offer When the notice of change, its server list is updated;
The zookeeper, for monitoring the online or offline state change of each member server in cluster, in member When server starts, member server is registered, the register list of member server is formed;Stop work in member server When making, actively the member server to stop working is deleted from its register list;And for described in GateServer notice The state change of member server;
At least one described member server, on startup, actively being registered to zookeeper;
At least one described client, on startup, requesting newest server list to GateServer.
Preferably, wherein the access request that at least one described client is also used to the member server in cluster connects When continuous failure preset times n times, newest available server list is obtained again through GateServer.
Preferably, wherein the preset times n is 3.
Preferably, wherein at least one described member server be also used to other member servers in cluster into When row access, the register list of server, then the request that accesses first are obtained from zookeeper.
Preferably, wherein the GateServer is registered to without monitoring and zookeeper's and does not provide service externally Member server state change.
Compared with prior art, method and system described herein achieving the following effects:
First, using cluster server control method of the invention and system, when the member server in server cluster Into maintenance state when, can it is automatically offline from entire server cluster, no longer offer service;When member server opens When dynamic, which can be automatically registered in server cluster and can provide service immediately, so that entirely Server cluster normal operation.
Second, using cluster server control method of the invention and system, when the member server in server cluster When abnormal off-line (program crashing, system crash, power-off, system maintenance upgrading etc.), the zookeeper in server cluster can Perception in time, and GateServer can be notified to carry out server update.
Third, using cluster server control method of the invention and system, when the member server in cluster is online or It, can be in time by available server update into newest server list, and by not available server from clothes when offline It is deleted in business device list, in whole process, server is automatically processed with O&M activity, is not necessarily to manual intervention.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is a kind of cluster server control method flow chart of the invention;
Fig. 2 is a kind of composition schematic diagram of cluster server control system of the invention.
Specific embodiment
As used some vocabulary to censure specific components in the specification and claims.Those skilled in the art answer It is understood that hardware manufacturer may call the same component with different nouns.This specification and claims are not with name The difference of title is as the mode for distinguishing component, but with the difference of component functionally as the criterion of differentiation.Such as logical The "comprising" of piece specification and claim mentioned in is an open language, therefore should be construed to " include but do not limit In "." substantially " refer within the acceptable error range, those skilled in the art can within a certain error range solve described in Technical problem basically reaches the technical effect.In addition, " coupling " word includes any direct and indirect electric property coupling herein Means.Therefore, if it is described herein that a first device is coupled to a second device, then representing the first device can directly electrical coupling It is connected to the second device, or the second device indirectly electrically coupled through other devices or coupling means.Specification Subsequent descriptions be implement the application better embodiment, so it is described description be for the purpose of the rule for illustrating the application, It is not intended to limit the scope of the present application.The protection scope of the application is as defined by the appended claims.
Embodiment 1
Shown in Figure 1 is a kind of herein described specific embodiment of cluster server control method, in the present embodiment It the described method comprises the following steps:
Step 101, GateServer (gateway server) are issued to zookeeper and are requested, it is desirable that it monitors each in cluster The online or offline state change of member server;
When member server in step 102, cluster starts (such as the first member server shown in Fig. 2 31 and second Member server 32), it is actively registered to zookeeper, and register list is formed in zookeeper;Zookeeper will The status change notification GateServer of member server, and server list is formed in GateServer;
When member server in step 103, cluster stops working (such as third member server 33 shown in Fig. 2), Zookeeper actively deletes the member server to stop working from its register list, and GateServer is notified to be taken Business device list update;
When step 104, client terminal start-up, newest server list is requested to GateServer.
In above scheme, when the state of member server in cluster changes, zookeeper can be perceived in time And notify GateServer, have member server it is online when, can be registered automatically in zookeeper, formed register list;Have When member server is stopped working due to collapse, maintenance or upgrading etc., service that zookeeper will can stop working in time Device is deleted from its register list.GateServer obtains the last state of member server from zookeeper, and in time by it Server list updates.When there is client terminal start-up, client can get newest server list to Gate.Entire mistake Journey is automatically processed with O&M activity, so that server cluster has a set of perfect full-automatic online offline strategy, is not necessarily to Manual intervention.
In above-mentioned steps 104, client access cluster in member server request continuously fail preset times n times when, Client obtains newest available server list again through GateServer.
In general, client can obtain currently available server list by GateServer, come according to demand to correspondence Server initiate access request, if some server collapsed in the process or enter maintenance state (such as Third server 33 shown in Fig. 2), then client will not learn that the state of server, the client can be shown in time Destination server can not connect.Therefore, the present invention devises the strategy that above-mentioned new client updates server list, if client In end access cluster the request of some member server continuously fail n times when, then client need to be again through GateServer obtains new available server list.In general, the number of above-mentioned access failure can be set as 3 times.
Cluster server control method of the present invention further include: the member server in cluster takes other members in cluster When business device accesses, the register list of server, then the request that accesses first are obtained from zookeeper.Using such scheme, It,, only need to be from when needing to access without knowing whether other side is online in advance when server wants in cluster will access mutually Available server is obtained in the register list of zookeeper.
In the present invention, GateServer is registered to without monitoring and zookeeper's and does not provide the member of service externally The state change of server, such as the 4th member server 34 in Fig. 2 and the 5th member server 35 provide service for backstage, Service is not provided externally, therefore these in GateServer Maintenance free server list do not provide service member's service externally Device makes the work of entire server cluster more to save the memory of GateServer without these server lists are stored It is smooth.
Embodiment 2
Shown in Figure 2 is a kind of herein described specific embodiment of cluster server control system, in the present embodiment The system comprises GateServer10, zookeeper20, at least one member server and at least one client 40, Member server in Fig. 2 includes the first member server 31, the second member server 32, third member server the 33, the 4th Member server 34, the 5th member server 35, wherein
GateServer10 is requested for issuing to zookeeper20, it is desirable that it is monitored in cluster on each member server Line or offline state change form server list;And in the member server state for receiving zookeeper20 offer When the notice of variation, its server list is updated;
Zookeeper20 takes for monitoring the online or offline state change of each member server in cluster in member When business device starting, member server is registered, the register list of member server is formed;It stops working in member server When, such as third member server shown in Fig. 2 is current to stop working when belonging to maintenance state, at this point, zookeeper20 Actively the third member server 33 to stop working can be deleted from its register list;And for being notified to GateServer10 The state change of the member server;
At least one member server, on startup, actively being registered to zookeeper20;
At least one client 40, on startup, requesting newest server list to GateServer10.
The access request that at least one above-mentioned client 40 is also used to the member server in cluster is continuously unsuccessfully preset When frequency n time, newest available server list is obtained again through GateServer10.
In general, the number that above-mentioned access request continuously fails can be set as 3 times.
In above-described embodiment, at least one member server is also used to visit to other member servers in cluster When asking, the register list of server, then the request that accesses first are obtained from zookeeper20.
In above-described embodiment, GateServer10 is registered to without monitoring and zookeeper20's and does not provide clothes externally The state change of the member server of business, such as after the 4th member server 34 in Fig. 2 and the 5th member server 35 belong to Platform server does not provide service externally, then GateServer10 is not necessarily to monitor the state of the two servers, to save The memory of GateServer10 keeps the work of entire server cluster more smooth.
As can be seen from the above embodiments beneficial effect existing for the application is:
First, using cluster server control method of the invention and system, when the member server in server cluster Into maintenance state when, can it is automatically offline from entire server cluster, no longer offer service;When member server opens When dynamic, which can be automatically registered in server cluster and can provide service immediately, so that entirely Server cluster normal operation.
Second, using cluster server control method of the invention and system, when the member server in server cluster When abnormal off-line (program crashing, system crash, power-off, system maintenance upgrading etc.), the zookeeper in server cluster can Perception in time, and GateServer can be notified to carry out server update.
Third, using cluster server control method of the invention and system, when the member server in cluster is online or It, can be in time by available server update into newest server list, and by not available server from clothes when offline It is deleted in business device list, in whole process, server is automatically processed with O&M activity, is not necessarily to manual intervention.
It should be understood by those skilled in the art that, embodiments herein can provide as method, apparatus or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
Above description shows and describes several preferred embodiments of the present application, but as previously described, it should be understood that the application Be not limited to forms disclosed herein, should not be regarded as an exclusion of other examples, and can be used for various other combinations, Modification and environment, and the above teachings or related fields of technology or knowledge can be passed through within that scope of the inventive concept describe herein It is modified.And changes and modifications made by those skilled in the art do not depart from spirit and scope, then it all should be in this Shen It please be in the protection scope of appended claims.

Claims (8)

1. a kind of cluster server control method characterized by comprising
GateServer is issued to zookeeper and is requested, it is desirable that it monitors the shape that each member server is online or offline in cluster State variation, GateServer without monitoring be registered to zookeeper's and do not provide externally service member server shape State variation;
It when member server in cluster starts, is actively registered to zookeeper, and forms registration in zookeeper List;The status change notification GateServer of member server is formed server by zookeeper in GateServer List;
When member server in cluster stops working, zookeeper actively registers the member server to stop working from it It is deleted in list, and GateServer is notified to carry out server list update;
When client terminal start-up, newest server list is requested to GateServer.
2. cluster server control method according to claim 1, which is characterized in that further comprise:
Client access cluster in member server request continuously fail preset times n times when, client again through GateServer obtains newest available server list.
3. cluster server control method according to claim 2, which is characterized in that
The preset times n is 3.
4. cluster server control method according to claim 1, which is characterized in that further comprise:
When member server in cluster accesses to other member servers in cluster, first obtains and take from zookeeper The register list of business device, then the request that accesses.
5. a kind of cluster server control system, which is characterized in that including GateServer, zookeeper, at least one member Server and at least one client,
The GateServer, for zookeeper issue request, it is desirable that its monitor cluster in each member server it is online or Offline state change, forms server list, and GateServer is registered to without monitoring and zookeeper's and does not mention externally For the state change of the member server of service;And for receiving the member server state change of zookeeper offer When notice, its server list is updated;
The zookeeper, for monitoring the online or offline state change of each member server in cluster, in member service When device starts, member server is registered, the register list of member server is formed;It stops working in member server When, actively the member server to stop working is deleted from its register list;And for GateServer notify it is described at The state change of member's server;
At least one described member server, on startup, actively being registered to zookeeper;
At least one described client, on startup, requesting newest server list to GateServer.
6. cluster server control system according to claim 5, which is characterized in that
At least one described client is also used to the access request of the member server in cluster and continuously fails preset times n times When, newest available server list is obtained again through GateServer.
7. cluster server control system according to claim 6, which is characterized in that
The preset times n is 3.
8. cluster server control system according to claim 5, which is characterized in that
At least one described member server is also used to when accessing to other member servers in cluster, first from Zookeeper obtains the register list of server, then the request that accesses.
CN201510671787.9A 2015-10-15 2015-10-15 Cluster server control method and system Active CN105245603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510671787.9A CN105245603B (en) 2015-10-15 2015-10-15 Cluster server control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510671787.9A CN105245603B (en) 2015-10-15 2015-10-15 Cluster server control method and system

Publications (2)

Publication Number Publication Date
CN105245603A CN105245603A (en) 2016-01-13
CN105245603B true CN105245603B (en) 2019-02-26

Family

ID=55043101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510671787.9A Active CN105245603B (en) 2015-10-15 2015-10-15 Cluster server control method and system

Country Status (1)

Country Link
CN (1) CN105245603B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721200A (en) * 2016-01-21 2016-06-29 北京乐动卓越科技有限公司 Master-slave server system application method and system thereof
CN107295031A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of method of data synchronization and device
CN106559332B (en) * 2016-11-03 2020-08-18 Tcl科技集团股份有限公司 Method and system for quickly establishing fully-connected server cluster
CN106656592B (en) * 2016-12-19 2020-02-18 贵州白山云科技股份有限公司 Service management method and device based on role configuration
CN107343034B (en) * 2017-06-26 2019-12-27 杭州铭师堂教育科技发展有限公司 QConf-based Redis high availability system and method
CN107566217B (en) * 2017-09-19 2020-11-13 顺丰科技有限公司 Flow control method, device, equipment and storage medium
CN109525431B (en) * 2018-12-07 2022-05-10 桂林力港网络科技股份有限公司 Method, device and storage medium for upgrading server without stopping service
CN111464574B (en) * 2019-01-21 2022-10-21 阿里巴巴集团控股有限公司 Calling, loading, registering and managing method and route, server, node and medium
CN110336884B (en) * 2019-07-09 2022-03-29 西安点告网络科技有限公司 Server cluster updating method and device
CN110572277A (en) * 2019-08-15 2019-12-13 上海易点时空网络有限公司 Machine management method and system
CN110502266A (en) * 2019-08-26 2019-11-26 中电九天智能科技有限公司 A kind of seamless update method of CIM server cluster
CN113094074B (en) * 2021-05-07 2024-03-19 聚好看科技股份有限公司 Service cluster updating method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795572A (en) * 2014-01-24 2014-05-14 北京京东尚科信息技术有限公司 Method for switching master server and slave server and monitoring server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9172608B2 (en) * 2012-02-07 2015-10-27 Cloudera, Inc. Centralized configuration and monitoring of a distributed computing cluster
US9690671B2 (en) * 2013-11-01 2017-06-27 Cloudera, Inc. Manifest-based snapshots in distributed computing environments

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795572A (en) * 2014-01-24 2014-05-14 北京京东尚科信息技术有限公司 Method for switching master server and slave server and monitoring server

Also Published As

Publication number Publication date
CN105245603A (en) 2016-01-13

Similar Documents

Publication Publication Date Title
CN105245603B (en) Cluster server control method and system
CN108632338B (en) Storage system and method for providing automatic storage discovery
DE102012210582B4 (en) Reduce the impact of failure of an exchange in a switching network by means of circuit cards
US10404690B2 (en) Authentication-free configuration for service controllers
JP6325001B2 (en) Method and system using recursive event listeners in nodes of hierarchical data structures
CN107800565B (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
US11082505B2 (en) Dynamic discovery of available storage servers
CN111328392B (en) Deployment of partially provisioned virtual machines
TW201423429A (en) Server management method and apparatus
CN105721200A (en) Master-slave server system application method and system thereof
Großmann et al. OPC UA server aggregation—The foundation for an internet of portals
CN107666493B (en) Database configuration method and equipment thereof
CN105579983A (en) Baseboard management controller providing peer system identification
WO2018192478A1 (en) Cloud management platform, virtual machine management method, system thereof
CN103024065A (en) System configuration management method for cloud storage system
CN107682411A (en) A kind of extensive SDN controllers cluster and network system
US20190171602A1 (en) Systems and methods for supporting inter-chassis manageability of nvme over fabrics based systems
US20110179171A1 (en) Unidirectional Resource And Type Dependencies In Oracle Clusterware
WO2016037758A1 (en) System for support in the event of intermittent connectivity, a corresponding local device, and a corresponding cloud computing platform
US9098334B2 (en) Special values in oracle clusterware resource profiles
CN105100185A (en) System and method for adaptively integrating a database state notification service with a distributed transactional middleware machine
DE102011107092B4 (en) Computer system, method for starting a server computer, server computer, management station and use
CN108089968A (en) A kind of method of host's machine monitoring virtual-machine data storehouse state
CN110365524B (en) Mirror image upgrading method and system for server node firmware
US9288178B2 (en) Inventory updating of an internet protocol (IP) alias within a highly available computing cluster

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant