CN103458045A - Dynamic deployment method and system of distributed cluster - Google Patents

Dynamic deployment method and system of distributed cluster Download PDF

Info

Publication number
CN103458045A
CN103458045A CN2013104168079A CN201310416807A CN103458045A CN 103458045 A CN103458045 A CN 103458045A CN 2013104168079 A CN2013104168079 A CN 2013104168079A CN 201310416807 A CN201310416807 A CN 201310416807A CN 103458045 A CN103458045 A CN 103458045A
Authority
CN
China
Prior art keywords
cluster
nodes
mode
node
critical point
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.)
Granted
Application number
CN2013104168079A
Other languages
Chinese (zh)
Other versions
CN103458045B (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.)
Opzoon Technology Co Ltd
Original Assignee
Opzoon 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 Opzoon Technology Co Ltd filed Critical Opzoon Technology Co Ltd
Priority to CN201310416807.9A priority Critical patent/CN103458045B/en
Publication of CN103458045A publication Critical patent/CN103458045A/en
Application granted granted Critical
Publication of CN103458045B publication Critical patent/CN103458045B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Hardware Redundancy (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a dynamic deployment method and system of a distributed cluster. The dynamic deployment method of the distributed cluster includes the steps that statistics are made about the number of all nodes after the dynamic change of the cluster, and accordingly a critical point is calculated; statistics are made about the number of the nodes which are still in a normal state after the dynamic change of the cluster; a cluster operating mode is determined according to the number of the nodes in the normal state and the critical point, when the number of the nodes in the normal state is larger than the critical point, the cluster operates normally, and when the number of the nodes in the normal state is smaller than or equal to the critical point, the cluster can not be used. By means of the dynamic deployment method and system of the distributed cluster, whether the state of the cluster after dynamic change can be used or not can be flexibly mastered, and under the possible conditions, the nodes or non-applicable nodes in a dynamic repair system can be dynamically increased and decreased. The dynamic deployment method and system of the distributed cluster improve the efficiency of user dynamic expansion and cluster scale change, and solve the problem that the working mode of the cluster can not be monitored in real time before.

Description

The dynamic deployment method of distributed type assemblies and system
Technical field
The present invention relates to the distributed type assemblies management domain, relate in particular to dynamic deployment method and the system of distributed type assemblies.
Background technology
Distributed service framework ZooKeeper is an open source code, for the reliable coherent system of large-scale distributed system.The function that it provides comprises: configuring maintenance, name Service, distributed synchronization, group service etc.The target of ZooKeeper is the key service that packaged complexity is easily made mistakes, and the interface and the performance system efficient, function-stable that are simple and easy to use are offered to the user.
In the prior art, ZooKeeper can provide some shirtsleeve operations, makes the Distributed Application can be based on services such as all configuring maintenances described above of these Interface realizations, name or minute clusters.ZooKeeper is usually used a data model similar with file tree structure, the access of programming of employing Java or C language.In the specific implementation process, different with common file system, Zookeeper is very high to the requirement of order, needs the strict access according to the order of sequence of all nodes to realize required synchronous service.
But, in the practical application of ZooKeeper, because the engineer can not use lock mechanism well, and the message based coordination system is not suitable for using in some applications, these order collaboration services products are easy to be absorbed in some traps such as competition alternative condition or deadlock, thereby cause the cooperation conflict, be unfavorable for the collaboration services of cluster inside, greatly reduce the operating efficiency of cluster.
Summary of the invention
(1) technical problem that will solve
The invention provides dynamic deployment method and the system of distributed type assemblies, can accurately judge that can cluster work after dynamic change according to the critical point of defining, solved the not high technical problem of cluster inside cooperation service coordination in the prior art.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides the dynamic deployment method of distributed type assemblies, comprising:
The whole number of nodes of statistical cluster after dynamic change, and calculate accordingly critical point;
Statistical cluster number of nodes in normal condition still after dynamic change;
Determine the cluster mode of operation according to number of nodes and the described critical point of described normal condition:
When the number of nodes of described normal condition is greater than described critical point, described cluster normal operation; When the number of nodes of described normal condition is less than or equal to described critical point, described cluster is unavailable.
Further, after determining the cluster mode of operation, also comprise: revise the cluster configuration of each node according to the cluster mode of operation, and each node in cluster is restarted successively.
Further, the described cluster configuration of revising each node according to the cluster mode of operation, and each node in cluster is restarted and comprised successively:
Step S1: the cluster configuration of revising the cluster exterior node according to the cluster mode of operation;
Step S2: each node is closed the number of nodes of the critical point of rear cluster and cluster normal condition and judges the cluster mode of operation in statistical cluster, when the number of nodes of normal condition is greater than critical point, and the cluster normal operation; When the number of nodes of normal condition is less than or equal to critical point, cluster is unavailable;
Step S3: when the cluster mode of operation is consistent, according to the cluster mode of operation, revises the cluster configuration of cluster domestic demand closed node and restart; When the cluster mode of operation changes again, get back to step S1.
Further, described cluster comprises through dynamic change:
Add the not single new node in cluster;
Or, recover the single unavailable node in cluster;
Or, reduce the single available or unavailable node in cluster.
Further,
The computational methods of described critical point are: the whole number of nodes by cluster after dynamic change also round downwards divided by 2;
And/or described cluster normal operation comprises: single cpu mode normal operation, cluster mode normal operation.
On the other hand, the present invention also provides the Dynamic Deployment System of distributed type assemblies, comprising: the first statistic unit, the second statistic unit and mode of operation unit, wherein:
The first statistic unit, the whole number of nodes for statistical cluster after dynamic change, and calculate accordingly critical point, result is sent to the mode of operation unit;
The second statistic unit, for statistical cluster number of nodes in normal condition still after dynamic change, and be sent to the mode of operation unit by result;
The mode of operation unit, with the first statistic unit, with the second statistic unit, be connected respectively, for receiving the result of calculation of the first statistic unit and the second statistic unit, and determine accordingly the cluster mode of operation: when the number of nodes of described normal condition is greater than described critical point, described cluster normal operation; When the number of nodes of described normal condition is less than or equal to described critical point, described cluster is unavailable.
Further, described system also comprises: the node dispensing unit, with the mode of operation unit, be connected, and for receiving the result of mode of operation unit, revise accordingly the cluster configuration of each node, and each node in cluster is restarted successively.
Further, described node dispensing unit comprises:
First revises subelement, for revise the cluster configuration of cluster exterior node according to the cluster mode of operation;
The statistics subelement, each node is closed the number of nodes of the critical point of rear cluster and cluster normal condition and judges the cluster mode of operation in statistical cluster, when the number of nodes of normal condition is greater than critical point, the cluster normal operation; When the number of nodes of normal condition is less than or equal to critical point, cluster is unavailable; When the cluster mode of operation changes, result to the first modification subelement is upgraded in output, when the cluster mode of operation is consistent, and Output rusults to the second modification subelement;
Second revises subelement, for the judged result of receiving and counting subelement, according to the judge cluster mode of operation obtained, revises the cluster configuration of cluster domestic demand closed node and restarts.
Further, described system comprises:
The new node adding device, for adding not the single new node at cluster;
And/or the node recovery unit, for recovering the single unavailable node of cluster;
And/or node reduces unit, for reducing the single available or unavailable node of cluster.
Further,
Described the first statistic unit comprises: the critical point computation subunit, for by the whole number of nodes after dynamic change also round divided by 2 by cluster, calculate the critical point of cluster downwards;
And/or the cluster normal operation that described mode of operation unit judges comprises: single cpu mode normal operation, cluster mode normal operation.
(3) beneficial effect
Visible, in the dynamic deployment method and system of the distributed type assemblies that the present invention proposes, can determine critical point for the criterion of ZooKeeper system normal operation, whether the ZooKeeper system mode of grasping after dynamic change flexibly is available, with this, realize in the situation that possible, follow the course of normal operation of cluster, carry out dynamic appending and reduce node or dynamically repair the unavailable node in cluster.The present invention has improved user's dynamic expansion and has changed the efficiency of cluster scale, can't monitor in real time the problem of cluster mode of operation before having solved.
In addition, the present invention is when adding new node at every turn, recover unavailable node or reducing the cluster interior nodes, according to cluster, required critical point rejudges the cluster mode of operation again in capital, has improved the accuracy that cluster is controlled, and can more effectively control in real time the cluster mode of operation.
The accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below will the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the basic procedure schematic diagram of the dynamic deployment method of distributed type assemblies of the present invention
Fig. 2 is the schematic flow sheet of the dynamic deployment method embodiment 1 of distributed type assemblies of the present invention;
Fig. 3 is the scene schematic diagram of the dynamic deployment method embodiment 1 of distributed type assemblies of the present invention,
In figure: the node of grid line ellipse representation normal operation, but the twill ellipse representation has started disabled node, the node of blank ellipse representation closed condition;
Fig. 4 is the schematic flow sheet of the dynamic deployment method embodiment 2 of distributed type assemblies of the present invention;
Fig. 5 is the schematic flow sheet of the dynamic deployment method embodiment 3 of distributed type assemblies of the present invention;
Fig. 6 is the schematic flow sheet of the dynamic deployment method embodiment 4 of distributed type assemblies of the present invention;
Fig. 7 is the basic structure schematic diagram of the Dynamic Deployment System of distributed type assemblies of the present invention;
Fig. 8 is a preferred embodiment structural representation of the Dynamic Deployment System of distributed type assemblies of the present invention;
Fig. 9 is another preferred embodiment structural representation of the Dynamic Deployment System of distributed type assemblies of the present invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
At first the embodiment of the present invention has proposed a kind of dynamic deployment method of distributed type assemblies, comprising:
Step 101: the whole number of nodes of statistical cluster after dynamic change, and calculate accordingly critical point.
Step 102: statistical cluster number of nodes in normal condition still after dynamic change.
Step 103: according to number of nodes and the described critical point of described normal condition, determine the cluster mode of operation:
When the number of nodes of described normal condition is greater than described critical point, described cluster normal operation; When the number of nodes of described normal condition is less than or equal to described critical point, described cluster is unavailable.
Visible, the dynamic deployment method of the distributed type assemblies that the embodiment of the present invention proposes, can determine critical point for the criterion of ZooKeeper system normal operation, whether the ZooKeeper system mode of grasping after dynamic change flexibly is available, with this, realize in the situation that possible, follow the course of normal operation of cluster, carry out dynamic appending and reduce node or dynamically repair the unavailable node in cluster.The embodiment of the present invention has improved user's dynamic expansion and has changed the efficiency of cluster scale, can't monitor in real time the problem of cluster mode of operation before having solved.
In the said method of the embodiment of the present invention, for can be in system after dynamic change, the cluster configuration state of each node in the system that upgrades in time, preferably, after the mode of operation that determines cluster, also need to revise according to the cluster mode of operation cluster configuration of each node, and each node in cluster is restarted successively.
In one embodiment of the invention, preferably, can adopt following method to revise node and configure and restart:
Step S1: the cluster configuration of revising the cluster exterior node according to the cluster mode of operation;
Step S2: each node is closed the number of nodes of the critical point of rear cluster and cluster normal condition and judges the cluster mode of operation in statistical cluster, when the number of nodes of normal condition is greater than critical point, and the cluster normal operation; When the number of nodes of normal condition is less than or equal to critical point, cluster is unavailable;
Step S3: when the cluster mode of operation is consistent, according to the cluster mode of operation, revises the cluster configuration of cluster domestic demand closed node and restart; When the cluster mode of operation changes again, get back to step S1.
In the practical application of the inventive method, cluster dynamic appending or minimizing node all need order to carry out, so that node adds successively or minimizing successively.So cluster can comprise following several situation through dynamic change: add the not single new node in cluster; Or, recover the single unavailable node in cluster; Or, reduce the single available or unavailable node in cluster.
In the coordination service of ZooKeeper distributed application program, as long as most of nodes are arranged can be used, whole system just keeps available, and in one embodiment of the invention, the computational methods of critical point can be: the whole number of nodes by cluster after dynamic change also round downwards divided by 2.When in system, the number of nodes in normal condition can be greater than critical point, judgement system normal operation, and in system when the normal condition number of nodes is less than or equal to above-mentioned critical point quantity, system is unavailable, need to further repair.In one embodiment of the invention, the cluster normal operation comprises: single cpu mode normal operation, cluster mode normal operation.
Below for cluster, the different situations in dynamic change are lifted respectively the dynamic deployment method specific implementation process that specific embodiment describes distributed type assemblies of the present invention:
Embodiment 1:
In the present embodiment 1, cluster through the concrete manifestation of dynamic change is: add the not single new node in cluster, especially, in the present embodiment 1, be that ZooKeeper is extended to cluster mode from single cpu mode, namely at original cluster, only have on the basis of a node job, add a not new node in cluster, make ZooKeeper change cluster mode work into.As shown in Figure 2 and Figure 3, in the embodiment of the present invention 1, the process of the dynamic deployment method of distributed type assemblies comprises:
Step 201: the whole number of nodes of statistical cluster after dynamic change.
In the embodiment of the present invention 1, the start node quantity of cluster is 1, and the whole number of nodes after dynamic change are 2.
Step 202: calculate the critical point of cluster after dynamic change.
In the embodiment of the present invention 1, the whole number of nodes due to cluster after dynamic change are 2, and the computational methods of cluster critical point are: the whole number of nodes by cluster after dynamic change also round downwards divided by 2, and in this step, the result of calculation of critical point is 1.
Step 203: statistical cluster number of nodes in normal condition still after dynamic change.
In this step, the number of nodes that cluster is initially in normal condition is 1, and cluster works in single cpu mode.After an outside new node is added in dynamic change, now the number of nodes of normal condition becomes 2.
Step 204: the quantity of the number of nodes of normal condition and critical point in cluster after dynamic change relatively.
When the normal condition number of nodes is greater than critical point, the judgement cluster can work; Otherwise, judging that cluster is unavailable, can't work.
In the embodiment of the present invention 1, in cluster, the number of nodes of normal condition is 2, and critical point is 1, judges that cluster can work, and carries out subsequent step.
Step 205: the cluster state obtained according to judgement in step 204 is revised the cluster configuration of cluster exterior node.
In this step, the new node that cluster has need to add outward, in step 204, the judgement cluster state is available, and the embodiment of the present invention 1 is to change the operating state of cluster into cluster mode by adding an outside new node by single cpu mode, so in this step, by cluster, outer node is configured to cluster mode, and startup etc. is to be added.
Step 206: according to the judge cluster mode of operation obtained, revise the cluster configuration of cluster interior nodes and restart.
Because the embodiment of the present invention 1 is to transfer cluster mode to by single cpu mode, when in cluster, node is closed, cluster can be temporarily unavailable, so do not need the statistical cluster state in the embodiment of the present invention 1, but directly reconfigure and restart node in cluster, gets final product.By node configure complete lay equal stress on open after, two nodes in cluster are starting state and cluster can be used, the cluster operating state is converted to cluster mode normal operation, step finishes.
Embodiment 2:
In the present embodiment 2, cluster through the concrete manifestation of dynamic change is: add the not single new node in cluster, in this embodiment, be to add a new node under the state of cluster mode normal operation, have 9 nodes in cluster altogether, wherein 5 available, so under current state, cluster can work.As shown in Figure 4:
Step 401: the whole number of nodes of statistical cluster after dynamic change.
In the embodiment of the present invention 2, cluster whole number of nodes after dynamic change are 10.
Step 402: calculate the critical point of cluster after dynamic change.
In this step, after dynamic change, whole nodes of cluster are 10, so the result of calculation of critical point is 5.
Step 403: statistical cluster number of nodes in normal condition still after dynamic change.
In this step, the number of nodes that cluster is initially in normal condition is 5, then, after adding an outside new node, the number of nodes of normal condition becomes 6.
Step 404: the quantity of the number of nodes of normal condition and critical point in cluster after dynamic change relatively.
In this inventive embodiments 2, the number of nodes of normal condition is 6, and critical point is 5, so the judgement cluster can work.
Step 405: the cluster state obtained according to judgement in step 404 is revised the cluster configuration of cluster exterior node.
In step 404, the judgement cluster state is cluster mode normal operation, thus revise the cluster configuration of the node that the cluster external demand adds in this step according to the result of judgement, and startup etc. is to be added.
Step 406: each node is closed the number of nodes of the critical point of rear cluster and cluster normal condition and judges cluster state in statistical cluster.
In this step, because initial condition has 9 nodes, wherein 5 available, so have two kinds of situations in this step: the first situation is in closing cluster after disabled node, all number of nodes become 8, enabled node is still 5, cluster is still available; And the second situation is in closing cluster after enabled node, all number of nodes are 8, and enabled node but becomes 4, is no more than the critical point of cluster, and the cluster operating state becomes unavailable.
Step 407: the cluster state in comparison step 406 and step 404 is with configuration node.
When the first situation in step 406, cluster state is still available, consistent with the judged result of step 404, now revises the cluster configuration of cluster domestic demand closed node, and restarts;
When the second situation in step 406, because the quantity of enabled node is no more than critical point, it is unavailable that the cluster operating state becomes cluster mode, with inconsistent in step 404, need to get back in step 405 to reconfigure, and until whole cluster configuration is complete and available.
Embodiment 3:
In the present embodiment, cluster through the concrete manifestation of dynamic change is: in cluster, a node can be used, and transfers ZooKeeper to single cpu mode from cluster mode, as shown in Figure 5:
Step: 501: the whole number of nodes of statistical cluster after dynamic change
In embodiments of the present invention, the whole number of nodes of statistical cluster after dynamic change are 1.
Step 502: calculate the critical point of cluster after dynamic change.
In this step, after the cluster dynamic change, be single cpu mode, critical point is 0.
Step 503: statistical cluster number of nodes in normal condition still after dynamic change.
In this step, the number of nodes of cluster normal condition under single cpu mode is 1.
Step 504: the quantity of the number of nodes of normal condition and critical point in cluster after dynamic change relatively.
In this step, critical point is 0, and the number of nodes of normal condition is 1, so cluster can work.
Step 505: according to the judge cluster mode of operation obtained, revise the cluster configuration of cluster interior nodes and restart.
Revising the still cluster configuration of the cluster interior nodes of normal operation is single cpu mode, and restarts.
So far completed cluster and changed into the overall process of single cpu mode by cluster mode, step finishes.
Embodiment 4:
In the present embodiment 4, cluster through the concrete manifestation of dynamic change is: reduce a normal node in the cluster mode of normal operation, in cluster, one has 9 nodes, wherein 5 available, now cluster is in normal mode of operation, as shown in Figure 6:
Step 601: the whole number of nodes of statistical cluster after dynamic change.
After the node that reduces by a normal operation, the whole number of nodes of cluster are 8.
Step 602: calculate the critical point of cluster after dynamic change.
At whole number of nodes, be 8 o'clock, the quantity of critical point is 4.
Step 603: statistical cluster number of nodes in normal condition still after dynamic change.
Reduce by an enabled node in 5 enabled nodes, now the number of nodes of normal condition is 4.
Step 604: the quantity of the number of nodes of normal condition and critical point in cluster after dynamic change relatively.
In this step, the number of nodes of normal condition equals critical point, judges that cluster can't work, and the cluster mode of operation becomes unavailable, and step finishes.
In addition, it should be noted that, it is a kind of preferred implementation procedure of distributed type assemblies dynamic deployment method of the present invention that above-mentioned all flow processs are described, in the actual realization of distributed type assemblies dynamic deployment method of the present invention, can carry out as required random variation on the basis of flow process shown in Fig. 1, can be to select the arbitrary steps in Fig. 2 to Fig. 6 to realize, the sequencing of each step also can be adjusted etc. as required.
The embodiment of the present invention has also proposed the Dynamic Deployment System of distributed type assemblies, as shown in Figure 7, comprising:
The first statistic unit 701, the whole number of nodes for statistical cluster after dynamic change, and calculate accordingly critical point, result is sent to mode of operation unit 703;
The second statistic unit 702, for statistical cluster number of nodes in normal condition still after dynamic change, and be sent to mode of operation unit 703 by result;
Mode of operation unit 703, with the first statistic unit 701, with the second statistic unit 702, be connected respectively, for receiving the result of calculation of the first statistic unit 701 and the second statistic unit 702, and determine accordingly the cluster mode of operation: when the number of nodes of described normal condition is greater than described critical point, described cluster normal operation; When the number of nodes of described normal condition is less than or equal to described critical point, described cluster is unavailable.
In an embodiment of system of the present invention, for can be in system after dynamic change, the cluster mode of operation of each node in the system that upgrades in time, preferably, system can also comprise: node dispensing unit 801, as shown in Figure 8, with mode of operation unit 703, be connected, for receiving the result of mode of operation unit 703, revise accordingly the cluster configuration of each node, and each node in cluster is restarted successively.
In one embodiment of the invention, preferably, as shown in Figure 9, node dispensing unit 801 can comprise:
First revises subelement 901, for revise the cluster configuration of cluster exterior node according to the cluster mode of operation;
Statistics subelement 902, close the number of nodes of the critical point of rear cluster and cluster normal condition and judge the cluster mode of operation for each node in statistical cluster, when the number of nodes of normal condition is greater than critical point, and the cluster normal operation; When the number of nodes of normal condition is less than or equal to critical point, cluster is unavailable; When the cluster mode of operation changes, result to the first modification subelement 901 is upgraded in output, when the cluster mode of operation is consistent, and Output rusults to the second modification subelement 903;
Second revises subelement 903, for the judged result of receiving and counting subelement 902, according to the judge cluster mode of operation obtained, revises the cluster configuration of cluster domestic demand closed node and restarts.
In the practical application of system of the present invention, cluster dynamic appending or minimizing node all need order to carry out, so that node adds successively or minimizing successively.So, as Fig. 8, an embodiment of system of the present invention can comprise:
New node adding device 802, for adding not the single new node at cluster;
And/or node recovery unit 803, for recovering the single unavailable node of cluster;
And/or node reduces unit 804, for reducing the single available or unavailable node of cluster.
In the coordination service of ZooKeeper distributed application program, as long as most of nodes are arranged can be used, whole system just keeps available, in one embodiment of the invention, as Fig. 8, the first statistic unit 701 can comprise: critical point computation subunit 805, for by the whole number of nodes after dynamic change also round divided by 2 by cluster, calculate the critical point of cluster downwards.When the number of nodes in normal condition in system can be greater than critical point, judge that working state of system is normal, and in system when the normal condition number of nodes is less than or equal to above-mentioned critical point quantity, system is unavailable, need to further repair.
In one embodiment of the invention, the cluster normal operation that mode of operation unit 703 judges comprises: single cpu mode normal operation, cluster mode normal operation.
It should be noted that, the structure of each embodiment of the Dynamic Deployment System of the distributed type assemblies shown in above-mentioned Fig. 7 to Fig. 9 can be carried out the combination in any use.
Visible, the embodiment of the present invention has following beneficial effect:
In the dynamic deployment method and system of the distributed type assemblies that the embodiment of the present invention proposes, can determine critical point for the criterion of ZooKeeper system normal operation, whether the ZooKeeper system mode of grasping after dynamic change flexibly is available, with this, realize in the situation that possible, follow the course of normal operation of cluster, carry out dynamic appending and reduce node or dynamically repair the unavailable node in cluster.The present invention has improved user's dynamic expansion and has changed the efficiency of cluster scale, can't monitor in real time the problem of cluster mode of operation before having solved.
In addition, the present invention is when adding new node at every turn, recover unavailable node or reducing the cluster interior nodes, according to cluster, required critical point rejudges the cluster mode of operation again in capital, has improved the accuracy that cluster is controlled, and can more effectively control in real time the cluster mode of operation.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: its technical scheme that still can put down in writing aforementioned each embodiment is modified, or part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. the dynamic deployment method of distributed type assemblies, is characterized in that, comprising:
The whole number of nodes of statistical cluster after dynamic change, and calculate accordingly critical point;
Statistical cluster number of nodes in normal condition still after dynamic change;
Determine the cluster mode of operation according to number of nodes and the described critical point of described normal condition:
When the number of nodes of described normal condition is greater than described critical point, described cluster normal operation; When the number of nodes of described normal condition is less than or equal to described critical point, described cluster is unavailable.
2. the dynamic deployment method of distributed type assemblies according to claim 1, is characterized in that,
After determining the cluster mode of operation, also comprise: revise the cluster configuration of each node according to the cluster mode of operation, and each node in cluster is restarted successively.
3. the dynamic deployment method of distributed type assemblies according to claim 2, is characterized in that, the described cluster configuration of revising each node according to the cluster mode of operation, and each node in cluster is restarted and comprised successively:
Step S1: the cluster configuration of revising the cluster exterior node according to the cluster mode of operation;
Step S2: each node is closed the number of nodes of the critical point of rear cluster and cluster normal condition and judges the cluster mode of operation in statistical cluster, when the number of nodes of normal condition is greater than critical point, and the cluster normal operation; When the number of nodes of normal condition is less than or equal to critical point, cluster is unavailable;
Step S3: when the cluster mode of operation is consistent, according to the cluster mode of operation, revises the cluster configuration of cluster domestic demand closed node and restart; When the cluster mode of operation changes again, get back to step S1.
4. the dynamic deployment method of distributed type assemblies according to claim 1, is characterized in that, described cluster comprises through dynamic change:
Add the not single new node in cluster;
Or, recover the single unavailable node in cluster;
Or, reduce the single available or unavailable node in cluster.
5. according to the dynamic deployment method of the described distributed type assemblies of any one in claim 1 to 4, it is characterized in that,
The computational methods of described critical point are: the whole number of nodes by cluster after dynamic change also round downwards divided by 2;
And/or described cluster normal operation comprises: single cpu mode normal operation, cluster mode normal operation.
6. the Dynamic Deployment System of distributed type assemblies, is characterized in that, comprising: the first statistic unit, the second statistic unit and mode of operation unit, wherein:
The first statistic unit, the whole number of nodes for statistical cluster after dynamic change, and calculate accordingly critical point, result is sent to the mode of operation unit;
The second statistic unit, for statistical cluster number of nodes in normal condition still after dynamic change, and be sent to the mode of operation unit by result;
The mode of operation unit, with the first statistic unit, with the second statistic unit, be connected respectively, for receiving the result of calculation of the first statistic unit and the second statistic unit, and determine accordingly the cluster mode of operation: when the number of nodes of described normal condition is greater than described critical point, described cluster normal operation; When the number of nodes of described normal condition is less than or equal to described critical point, described cluster is unavailable.
7. the Dynamic Deployment System of distributed type assemblies according to claim 6, it is characterized in that, described system also comprises: the node dispensing unit, with the mode of operation unit, be connected, for receiving the result of mode of operation unit, revise accordingly the cluster configuration of each node, and each node in cluster is restarted successively.
8. the Dynamic Deployment System of distributed type assemblies according to claim 6, is characterized in that, described node dispensing unit comprises:
First revises subelement, for revise the cluster configuration of cluster exterior node according to the cluster mode of operation;
The statistics subelement, each node is closed the number of nodes of the critical point of rear cluster and cluster normal condition and judges the cluster mode of operation in statistical cluster, when the number of nodes of normal condition is greater than critical point, the cluster normal operation; When the number of nodes of normal condition is less than or equal to critical point, cluster is unavailable; When the cluster mode of operation changes, result to the first modification subelement is upgraded in output, when the cluster mode of operation is consistent, and Output rusults to the second modification subelement;
Second revises subelement, for the judged result of receiving and counting subelement, according to the judge cluster mode of operation obtained, revises the cluster configuration of cluster domestic demand closed node and restarts.
9. the Dynamic Deployment System of distributed type assemblies according to claim 6, is characterized in that,
Described system comprises:
The new node adding device, for adding not the single new node at cluster;
And/or the node recovery unit, for recovering the single unavailable node of cluster;
And/or node reduces unit, for reducing the single available or unavailable node of cluster.
10. according to the Dynamic Deployment System of the described distributed type assemblies of any one in claim 6 to 9, it is characterized in that,
Described the first statistic unit comprises: the critical point computation subunit, for by the whole number of nodes after dynamic change also round divided by 2 by cluster, calculate the critical point of cluster downwards;
And/or the cluster normal operation that described mode of operation unit judges comprises: single cpu mode normal operation, cluster mode normal operation.
CN201310416807.9A 2013-09-13 2013-09-13 Dynamic deployment method and system of distributed cluster Expired - Fee Related CN103458045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310416807.9A CN103458045B (en) 2013-09-13 2013-09-13 Dynamic deployment method and system of distributed cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310416807.9A CN103458045B (en) 2013-09-13 2013-09-13 Dynamic deployment method and system of distributed cluster

Publications (2)

Publication Number Publication Date
CN103458045A true CN103458045A (en) 2013-12-18
CN103458045B CN103458045B (en) 2017-04-19

Family

ID=49739987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310416807.9A Expired - Fee Related CN103458045B (en) 2013-09-13 2013-09-13 Dynamic deployment method and system of distributed cluster

Country Status (1)

Country Link
CN (1) CN103458045B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338499A (en) * 2014-08-14 2016-02-17 北京信威通信技术股份有限公司 Clustering terminal state control method, device and system
CN106899659A (en) * 2017-01-25 2017-06-27 广东神马搜索科技有限公司 Distributed system and its management method and managing device
CN107171900A (en) * 2017-07-25 2017-09-15 郑州云海信息技术有限公司 The acquisition methods and system of a kind of node running status
CN107769943A (en) * 2016-08-17 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and apparatus of active and standby cluster switching
CN111737658A (en) * 2020-06-21 2020-10-02 苏州浪潮智能科技有限公司 Method, system, device and medium for limiting quota of ZooKeeper data node

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040123050A1 (en) * 2002-12-18 2004-06-24 International Business Machines Corporation Use of a storage medium as a communications network for liveness determination in a high-availability cluster
CN101252603A (en) * 2008-04-11 2008-08-27 清华大学 Cluster distributed type lock management method based on storage area network SAN

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040123050A1 (en) * 2002-12-18 2004-06-24 International Business Machines Corporation Use of a storage medium as a communications network for liveness determination in a high-availability cluster
CN101252603A (en) * 2008-04-11 2008-08-27 清华大学 Cluster distributed type lock management method based on storage area network SAN

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338499A (en) * 2014-08-14 2016-02-17 北京信威通信技术股份有限公司 Clustering terminal state control method, device and system
CN107769943A (en) * 2016-08-17 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and apparatus of active and standby cluster switching
CN107769943B (en) * 2016-08-17 2021-01-08 阿里巴巴集团控股有限公司 Method and equipment for switching main and standby clusters
CN106899659A (en) * 2017-01-25 2017-06-27 广东神马搜索科技有限公司 Distributed system and its management method and managing device
CN107171900A (en) * 2017-07-25 2017-09-15 郑州云海信息技术有限公司 The acquisition methods and system of a kind of node running status
CN111737658A (en) * 2020-06-21 2020-10-02 苏州浪潮智能科技有限公司 Method, system, device and medium for limiting quota of ZooKeeper data node
CN111737658B (en) * 2020-06-21 2022-07-12 苏州浪潮智能科技有限公司 Method, system, device and medium for limiting quota of ZooKeeper data node

Also Published As

Publication number Publication date
CN103458045B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
CN103458045A (en) Dynamic deployment method and system of distributed cluster
CN113687853B (en) Vehicle upgrade control method and computer storage medium
CN100401707C (en) Remote process transfering method and system in distribution type control system
CN105224362A (en) Host computer carries out the method and system of program upgrade to slave computer
CN105354044A (en) Application awakening method and apparatus
GB2507604A (en) Rack and method thereof for simultaneously updating basic input output systems
CN107407918A (en) Programmable logic controller (PLC) is extended using app
CN101601214A (en) Promote the recovery in the coordinated timing network
CN107656705B (en) Computer storage medium and data migration method, device and system
CN109104305A (en) A kind of node increases method and relevant apparatus
CN110516789A (en) The processing method of instruction set, device and relevant device in convolutional network accelerator
US20030046044A1 (en) Method for modeling and processing asynchronous functional specification for system level architecture synthesis
CN103414771A (en) Monitoring method for long task operation between nodes in cloud computing environment
CN105812504B (en) A kind of intelligent mailing address coding method
CN107577780A (en) A kind of data center's cloud resource synchronous method and device
CN108037932B (en) SPI-NAND configuration file acquisition method and device
CN110704172B (en) Cluster system timing task scheduling method and cluster system
CN106161086B (en) The control method and device that master control borad is restarted
CN103034480B (en) A kind of embedded system timer implementation method
CN104597820B (en) A kind of method for extending single-chip microcomputer hardware timer
CN107329842B (en) Method and terminal for acquiring data based on Qt signal slot mechanism
CN101739406A (en) Method for synchronizing file service operations on double-controller
CN105577310B (en) The synchronous method of task partition and communication scheduling in a kind of time triggered Ethernet
US9239720B2 (en) Device and method for generating application model based on layered structure
CN110830591B (en) Information synchronization method, system, electronic equipment and storage medium

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
PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20180823

Granted publication date: 20170419

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20210823

Granted publication date: 20170419

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170419

Termination date: 20180913