Specific embodiment
The embodiment of the present application provides a kind of upgrade method of server cluster, for node clothes each in server cluster
It is engaged in the unified upgrading of device, it can be while realizing that server cluster upgrade update to new version by legacy version, guarantee server
Cluster works normally.
Referring to Fig. 1, being the structural schematic diagram of server cluster.
Server cluster (cluster) is made of multiple node servers (node), and server cluster can be used as one
Generally multiple terminals provide service.Any node can send event or message with other nodes broadcasted into cluster.
Server cluster upgrading is the upgrading of all node in the cluster.
Referring to Fig. 2, being the event handling flow diagram of the embodiment of the present application interior joint server.
When node server is in active state, it can receive and handle event in cluster.Any in server cluster
The event handling process of node server, node can be divided into three parts according to software function:Obtain module, filtering module and
Execution module.
Wherein, it obtains module and is mainly responsible for the event in cluster that receives, and some routine inspections are carried out to the event received
Processing, such as check permission, legitimacy, memory, record transmitting-receiving time domain.It, can be by event after obtaining module check qualification
Pass to filtering module.
Filtering module only plays the role of filtering, unrelated with specific event.It is recorded in the more received event of filtering module
Destination node index (node index) it is whether consistent with the node index of itself, when consistent, which is passed to
Execution module;Otherwise, event transmitting is terminated.
Execution module is associated with modules such as hardware, driving, displays, is responsible for the execution of specific event;And in need
In the case where, event in signalling of bouquet.
When server cluster upgrading, obtains module and execution module and need to carry out upgrading update, and filtering module is then only
Original filtering function need to be kept without upgrading.
On the basis of the Node Events process flow diagram that Fig. 1 server cluster framework provided and Fig. 2 are provided, it please join
Fig. 3 is read, one embodiment schematic diagram of the upgrade method of server cluster in the embodiment of the present application.
301, first node obtains upgrading software package;
Before server cluster upgrading, node each first needs to obtain upgrading software package.Server cluster is by multiple
Node composition, the number of nodes for including in server cluster is herein without limitation.First node is any in server cluster
One node, first node can obtain upgrading software package by different approach, can be receive it is that user sends, can also be with
It receives other servers to send, be not specifically limited herein.It include obtaining module upgrade program in the upgrading software package
With execution module upgrade procedure.It obtains module and execution module is all the software function module in node, wherein obtain module master
Be responsible for receiving event in cluster, and some routine inspection processing carried out to the event that receives, such as check permission, legitimacy,
Memory, record transmitting-receiving time domain etc..After obtaining module check qualification, event can be passed to filtering module.Execution module
It is associated with modules such as hardware, driving, displays, is responsible for the execution of specific event;And in case there is a need, signalling of bouquet
Interior event.
302, first node completes the upgrading of first node execution module according to the execution module upgrade procedure;
First node can complete first according to execution module upgrade procedure in software package after obtaining upgrading software package
The upgrading of node execution module.
303, first node is completed the upgrading of first node acquisition module according to the acquisition module upgrade program and is carried out wide
It broadcasts;
First node, can be complete according to the acquisition module upgrade program in software package after the upgrading for completing execution module
The upgrading of module is obtained at first node.
The upgrade method of the server cluster provided in the embodiment of the present application, node can carry out obtaining module and holding respectively
The upgrading of row module can not interrupt normal business.
Referring to Fig. 4, server cluster uniformly upgrades flow diagram in the embodiment of the present application.
Server cluster is made of multiple nodes, and the number of nodes for including in server cluster is herein without limitation.This Shen
It please be introduced by taking 4 nodes (Node1, Node2, Node3 and Node4) as an example in embodiment, server cluster needs newly-increased
Business module for example can be network store system transfer function (NTF) module, and the embodiment of the present application, which provides, is not interrupting clothes
It is engaged in realizing that by legacy version, that is, the version of NTF module is not present in server cluster in the case where device cluster, upgrading update to new edition
This, that is, contain the process of the version of newly-increased NTF module.
After starting and upgrading, each node carries out the upgrading of execution module point by point, some nodes execute mould in escalation process
Block has event handling, or has event to send, and upgrading can reduce execution module event handling and send waiting node by node
Time.And since the data that execution module records in each node are different, it is therefore desirable to upgrade one by one.Each node into
The sequence of row upgrading is without limitation, it is preferable that each node can upgrade according to the number in server cluster, which can
Being determined according to the time of each node addition server cluster.As shown in figure 4, node can be from node 1 to the sequence of node 4
Carry out the upgrading of execution module.
Firstly, first node execution module starts to upgrade, complete from the legacy version execution module not comprising NTF module to packet
The escalation process of the new edition execution module of the module containing NTF can be to server after first node completes the upgrading of execution module
Cluster broadcast, sends the message that first node completes execution module upgrading, and second node receives first node and completes to execute mould
After the message of block upgrading, that is, the upgrading of second node execution module is triggered, similarly, the upgrading of second node execution module is completed
It can also be broadcasted in server cluster afterwards.Similarly, third node and fourth node complete the liter of execution module one by one
Grade.
Then, after the upgrading that execution module is completed due to fourth node, all nodes are all complete in the server cluster
At the upgrading of execution module, fourth node completes disappearing for execution module upgrading for all nodes are broadcasted in server cluster
Breath.All several points will start simultaneously the upgrading for obtaining module, complete by not including NTF module after receiving the broadcast message
Legacy version obtains the escalation process that module obtains module to the new edition comprising NTF module.Preferably due to which each node obtains mould
Data are identical in block, therefore each node acquisition module can carry out unified upgrading, can reduce escalation process duration.
After the upgrading that all nodes complete acquisition module, the escalation process for NTF module of server cluster terminates.
Server cluster provided by the embodiments of the present application uniformly upgrades process, can be real in the case where not interrupting cluster
Existing server cluster is updated by the upgrading that the legacy version for not including NTF module is raised to the new version comprising NTF module.
Referring to Fig. 5, in the embodiment of the present application the upgrade method of server cluster another embodiment schematic diagram.
501, first node obtains upgrading software package;
Before server cluster upgrading, node each first needs to obtain upgrading software package.Server cluster is by multiple
Node composition, the number of nodes for including in server cluster is herein without limitation.First node is any in server cluster
One node, first node can obtain upgrading software package by different approach, can be receive it is that user sends, can also be with
It receives other servers to send, be not specifically limited herein.It include obtaining module upgrade program in the upgrading software package
With execution module upgrade procedure.It obtains module and execution module is all the software function module in node, wherein obtain module master
Be responsible for receiving event in cluster, and some routine inspection processing carried out to the event that receives, such as check permission, legitimacy,
Memory, record transmitting-receiving time domain etc..After obtaining module check qualification, event can be passed to filtering module.Execution module
It is associated with modules such as hardware, driving, displays, is responsible for the execution of specific event;And in case there is a need, signalling of bouquet
Interior event.
502, first node receives the first broadcast message;
First node receives the first broadcast message, and it is complete which can be second node in the server cluster
At the information that execution module upgrades, which can be used for triggering the first node and upgrades journey according to the execution module
The upgrading of sequence completion first node execution module.
It should be noted that first node starts the upgrading of execution module, can be after receiving upgrading software package
It opens, is also possible to be triggered by step 502 and open, that is to say, that step 502 is optional execution step, can execute step
502, step 502 can not also be executed.
503, first node is completed the upgrading of first node execution module according to execution module upgrade procedure and is broadcasted;
First node starts the upgrading of execution module, can be and opens after receiving upgrading software package, is also possible to
It is triggered by step 502.First node can complete first node execution module according to execution module upgrade procedure in software package
Upgrading can be and increase a business module, such as NTF module newly in execution module.First node is completed first node and is executed
It after the upgrading of module, can be broadcasted in server cluster, which can be used for triggering next node and hold
Row module is upgraded, if first node is the module that the last one in the server cluster completes execution module upgrading, this is wide
Broadcasting message then can be used for triggering the upgrading that all nodes obtain module.Herein, for the specific shape of first node broadcast
Formula and content are without limitation.
504, first node obtains module and receives the first event and storage that third node is sent;
Third node is the node that execution module upgrading is completed in server cluster, obtains module in first node and completes to rise
Before grade, if receiving third node completes the first event sent after execution module upgrading, since first node obtains mould
Block is not yet completed to upgrade, therefore, it is impossible to handle the first event, first node will receive the first event and store first thing
Part can wait this node to complete to be handled again after obtaining module upgrade.
It should be noted that step 504 is optional step, it can execute or not execute, also, step 504 can be with
Executed before either step in step 502 to step 507, herein for step 504 execution opportunity without limitation.
505, first node receives the second broadcast message;
First node receives the second broadcast message, which completes comprising nodes all in the server cluster
The information of execution module upgrading, second broadcast message are completed for triggering the first node according to the acquisition module upgrade program
The upgrading of first node acquisition module.
506, first node obtains module and stores currently outstanding second event;
After first node receives the second broadcast message, will obtain the upgrading of module, before obtaining module upgrade, the
One node obtains module and needs temporarily to store currently outstanding second event, obtains module to first node and completes to rise
It is handled again after grade.
It should be noted that step 506 is optional step, it is not untreated if first node is when reception second is broadcasted
The event of completion can not then execute step 506.
507, first node completes the upgrading that first node obtains module according to module upgrade program is obtained;
First node, can be complete according to the acquisition module upgrade program in software package after the upgrading for completing execution module
The upgrading of module is obtained at first node, such as be can be and increased a business module, such as NTF module newly in obtaining module.
It should be noted that all nodes are after receiving the second broadcast message in server cluster, it will uniformly carry out acquisition module
Upgrading, at this point, the event handling of each node can short interruption, such as can be half an hour, herein for obtaining module liter
Grade duration is without limitation, it is to be understood that stores currently outstanding thing due to before obtaining module upgrade, obtaining module
Part can restore the processing of business, event after the completion of upgrading.
508, first node obtains the resume module first event;
After first node is completed to obtain module completion upgrading, first node can handle in step 504 and temporarily store
Third node send first event, the third node be complete execution module upgrade node.
It should be noted that step 508 is the step of association, if not executing step 504, not need to hold with step 504
Row step 508 can execute step 508 if executing step 504.
509, first node obtains the resume module second event;
After first node is completed to obtain module completion upgrading, first node can handle in step 506 and temporarily store
Second event, when second event be first node carry out obtain the untreated completion of module upgrade fashion event.
It should be noted that step 509 is the step of association, if not executing step 506, not need to hold with step 506
Row step 509 can execute step 509 if executing step 506.
Referring to Fig. 6, server cluster unifies escalation process interaction mechanism schematic diagram in the embodiment of the present application.
In server cluster escalation process provided by the embodiments of the present application, the work of server cluster will not be interrupted.Due to
It is that execution module upgrades one by one first in escalation process, in server cluster after the completion of the execution module upgrading of all nodes,
The upgrading for uniformly carrying out obtaining module again, therefore, in the escalation process of server cluster, between the node of different upgrade status
It can still interact.Below referring to Fig. 6,2 from Node 1 to Node, Node 3 is finally arrived, is escalation process interior joint
The three state being likely to occur, wherein Node 1 is execution module and acquisition module is all the state of upgrading;Node 2 is to execute
Module completes upgrading, obtains the state that module does not upgrade;Node 3 is the state that execution module and acquisition module all complete upgrading.
In the escalation process of server cluster, the section in 2 state of 1 state of Node and Node can be existed simultaneously
Point.
Step 1, when lowest version node sends event to highest version node, for example, 1 state of Node node to Node 2
The node of state sends event, and 2 node of Node can be handled;
Step 2, when highest version node sends event to lowest version node, such as Node 2 has completed the execution of upgrading
Module is to the 1 transmission event of node Node not upgraded, and Node 1 can receive event, but since lowest version node obtains module not
There are upgraded modules, therefore the event that can not be sent to highest version execution module carries out inspection pretreatment, therefore can store the thing
Part is reprocessed after waiting all nodes to obtain the unified upgrading of module;
Step 3, lowest version node finally can all upgrade to the state of 3 node of Node, obtain module liter in 3 node of Node
Before grade, the acquisition module of lowest version can temporarily store the event of current untreated completion, after waiting unified upgrading, high version
The event of the untreated completion of lowest version node stored before this compatible processing of node.
The unified upgrade method of server cluster provided by the embodiments of the present application, since in escalation process, difference upgrades shape
Node between state can interact, will not interrupt event processing.
The upgrade method of server cluster is described above, the node server for realizing this method is described below, please refers to
Fig. 7, one embodiment schematic diagram of the embodiment of the present application interior joint server, including:
Module 701 is obtained, for obtaining upgrading software package, which includes obtaining module upgrade program and execution
Module upgrade program, the first node are the node in server cluster.
Upgraded module 702, for completing the upgrading of first node execution module according to the execution module upgrade procedure.
The upgraded module 702 is also used to complete the liter that first node obtains module 701 according to the acquisition module upgrade program
Grade.
The acquisition module 701 is also used to:The first broadcast message is received, first broadcast message is comprising in the server cluster
Second node completes the information of execution module upgrading, and first broadcast message is for triggering the first node according to the execution module
The upgrading of upgrade procedure completion first node execution module;And/or the second broadcast message is received, which includes
All nodes complete the information of execution module upgrading in the server cluster, and second broadcast message is for triggering the first node
The upgrading that first node obtains module 701 is completed according to the acquisition module upgrade program.
The acquisition module 701 is also used to:The first event that third node is sent and storage are received, which is service
The node of execution module upgrading is completed in device cluster;The node server further includes processing module 703, for handling first thing
Part.
The acquisition module 701 is also used to:Store currently outstanding second event;The node server further includes processing mould
Block 703, for handling the second event.
The upgrade method of the server cluster provided in the embodiment of the present application, node server can carry out acquisition mould respectively
The upgrading of block and execution module can not interrupt normal business.
Referring to Fig. 8, another embodiment schematic diagram of the embodiment of the present application interior joint server.
The node server 800 can generate bigger difference because configuration or performance are different, may include one or one
A above central processing unit (central processing units, CPU) 801 (for example, one or more processors)
With memory 805, one or more application program or data are stored in the memory 805.
Wherein, memory 805 can be volatile storage or persistent storage.The program for being stored in memory 805 can wrap
One or more modules are included, each module may include to the series of instructions operation in server.Further, in
Central processor 801 can be set to communicate with memory 805, execute on node server 800 a series of in memory 805
Instruction operation.
Node server 800 can also include one or more power supplys 802, one or more are wired or wireless
Network interface 803, one or more input/output interfaces 804, and/or, one or more operating systems, such as
Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Process performed by central processing unit 801 in the present embodiment interior joint server 800 and earlier figures 1 to Fig. 2 institute
Method flow described in the embodiment shown is similar, and details are not described herein again.
The embodiment of the present application also provides a kind of computer storage medium, and the computer storage medium is for being stored as aforementioned clothes
Computer software instructions used in business device comprising for executing as program designed by node server.
The embodiment of the present application also provides a kind of computer program product, which includes that computer software refers to
It enables, the method which can be loaded by processor to realize earlier figures 3 into embodiment shown in fig. 6
Process.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit is drawn
Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can
To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for
The mutual coupling, direct-coupling or communication connection of opinion can be through some interfaces, the INDIRECT COUPLING of device or unit
Or communication connection, it can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member for this, show as unit
Component may or may not be physical unit, it can it is in one place, or may be distributed over multiple nets
On network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or
Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products
Reveal and, which is stored in a storage medium, including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) execute each embodiment this method of the application whole or
Part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), magnetic or disk etc. be various to can store program code
Medium.
It is somebody's turn to do above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned
The application is described in detail in embodiment, those skilled in the art should understand that:It still can be to aforementioned
Technical solution documented by each embodiment is modified or equivalent replacement of some of the technical features;And these are repaired
Change or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.