CN111478953A - Self-construction method, device, system, equipment and storage medium of server cluster - Google Patents

Self-construction method, device, system, equipment and storage medium of server cluster Download PDF

Info

Publication number
CN111478953A
CN111478953A CN202010232011.8A CN202010232011A CN111478953A CN 111478953 A CN111478953 A CN 111478953A CN 202010232011 A CN202010232011 A CN 202010232011A CN 111478953 A CN111478953 A CN 111478953A
Authority
CN
China
Prior art keywords
node
cluster
server cluster
information
newly added
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
CN202010232011.8A
Other languages
Chinese (zh)
Other versions
CN111478953B (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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010232011.8A priority Critical patent/CN111478953B/en
Publication of CN111478953A publication Critical patent/CN111478953A/en
Application granted granted Critical
Publication of CN111478953B publication Critical patent/CN111478953B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • 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
    • 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
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a self-construction method, a self-construction device, equipment and a storage medium of a server cluster, and relates to the field of cloud computing, wherein the method comprises the following steps: receiving a cluster adding request from a newly added node; responding the cluster joining request to determine whether to accept the newly added node to join the server cluster; when the newly added node is determined to be accepted to be added into the server cluster, determining a node identifier of the newly added node; and sending the node identifier of the newly added node and cluster information of the server cluster to the newly added node and all edge nodes in the server cluster, wherein the cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster, so that the newly added node records the node identifier of the newly added node and caches the cluster information, and the newly added node becomes one edge node of the server cluster.

Description

Self-construction method, device, system, equipment and storage medium of server cluster
Technical Field
The present invention relates to the field of computers, and in particular, to a self-construction method of a server cluster, a self-construction device of a server cluster, a server cluster system, an electronic device, and a computer-readable storage medium.
Background
Generally, a cluster is constructed to deploy the same service on multiple devices in the cluster, so as to improve the performance of the service.
Currently, the built clusters need to rely on third party middleware or be integrated with third party services. This makes the cluster user not only need to operate and maintain the cluster, but also need to operate and maintain the third-party middleware depended by the cluster, or the integrated third-party service in the process of using the cluster. And the operation and maintenance costs of the third-party middleware and the third-party service are usually high.
Therefore, in order to reduce the operation and maintenance cost, how to construct a cluster which does not depend on a third-party middleware and/or does not need to depend on a third-party service becomes a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a new self-construction technical scheme for a server cluster.
According to a first aspect of the present invention, there is provided a self-construction method of a server cluster, the method comprising: the server cluster comprises a central node, the central node is used for managing edge nodes in the server cluster, the method is applied to the central node, and the method comprises the following steps:
receiving a cluster adding request from a newly added node;
responding the cluster joining request to determine whether to accept the newly added node to join the server cluster;
when the newly added node is determined to be accepted to be added into the server cluster, determining a node identifier of the newly added node;
and sending the node identifier of the newly added node and cluster information of the server cluster to the newly added node and all edge nodes in the server cluster, wherein the cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster, so that the newly added node records the node identifier of the newly added node and caches the cluster information, and the newly added node becomes one edge node of the server cluster.
Optionally, when determining to accept that the newly added node joins the server cluster, determining the node identifier of the newly added node includes:
and when the newly added node is determined to be added into the server cluster, determining the node identifier of the newly added node according to the node identifier of the current edge node in the server cluster.
Optionally, the node identifier is a number,
the determining the node identifier of the newly added node according to the node identifier of the current edge node in the server cluster includes:
and increasing preset number fields on the basis of the maximum number in all the current edge nodes of the server cluster to form a new number, and determining the new number as the node identifier of the newly added node.
Optionally, the method further includes:
and when receiving heartbeat information sent by any edge node according to a first preset time interval, sending a heartbeat reply to the edge node.
Optionally, the method further includes:
after a second preset time interval, when the heartbeat information sent by any edge node is not received, deleting the edge node from the server cluster, and updating the cluster information in the server cluster;
and broadcasting the deletion event of the edge node to all other edge nodes in the server cluster, and sending the updated cluster information to all other edge nodes in the server cluster.
According to a second aspect of the present invention, there is provided a self-construction method of a server cluster, where the server cluster includes a central node, the central node is configured to manage edge nodes in the server cluster, cluster information of the server cluster is cached in the edge nodes,
the method is applied to the edge node, and comprises the following steps:
receiving an information acquisition request from a newly added node, wherein the information acquisition request is used for acquiring first cluster information stored in the edge node;
and responding to the information acquisition request, sending the first cluster information to the newly added node so that the newly added node determines the network address of the central node from the first cluster information, sending a cluster adding request to the central node, adding the cluster to the server cluster, and acquiring and caching second cluster information returned by the central node, wherein the second cluster information comprises at least one of the type identifier, the network address and the node identifier of each node in the server cluster.
Optionally, the method further includes:
heartbeat information is sent to the central node according to a first preset time interval; and the number of the first and second electrodes,
and receiving a heartbeat reply returned by the central node based on the heartbeat information.
Optionally, the method further includes:
and after a second preset time interval, if a heartbeat reply returned by the central node based on the heartbeat information is not received, sending the heartbeat information to a new central node, wherein the new central node is determined from the edge nodes in the server cluster according to a preset decision mechanism.
Optionally, the predetermined decision mechanism includes determining, as a new edge node, an edge node that joined the server cluster earliest when the center node does not return a heartbeat reply to the edge node at a second preset time interval.
Optionally, the method further includes:
and after determining a new central node, receiving and caching third cluster information sent by the new central node, wherein the third cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster after updating the central node.
According to a third aspect of the present invention, there is provided a self-construction method of a server cluster, the server cluster comprising a central node for managing edge nodes in the server cluster,
the method is applied to a newly added node applying for joining the server cluster, and comprises the following steps:
sending an information acquisition request to any edge node, wherein the information acquisition request is used for acquiring first cluster information stored in the edge node;
after the cluster information sent by the edge node in response to the information acquisition request is received, determining the network address of the central node from the cluster information;
sending a cluster joining request to the central node according to the network address of the central node;
when the central node returns a response of accepting the joining to the cluster joining request, receiving a node identifier sent by the central node and second cluster information of the server cluster, wherein the second cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster;
and recording the node identifier of the node and caching the second cluster information to become one of the edge nodes of the server cluster.
Optionally, the cluster information includes a type identifier and a network address of each node,
after the cluster information sent by the edge node in response to the information acquisition request is received, determining a network address of a center node from the cluster information, including:
determining a node representing a central node for the type identifier from the server cluster according to the type identifier of each node in the cluster information;
and acquiring the network address of the node to determine the network address as the network address of the central node.
According to a fourth aspect of the present invention, there is provided a self-building apparatus of a server cluster, where the server cluster includes a central node, and the central node is used to manage edge nodes in the server cluster, and the apparatus is applied to the central node, and the apparatus includes:
the first receiving module is used for receiving a cluster adding request from a newly added node;
the first response module is used for responding to the cluster joining request so as to determine whether to accept the newly added node to join the server cluster;
a first determining module, configured to determine a node identifier of the newly added node when it is determined that the newly added node is accepted to join the server cluster;
a first sending module, configured to send the node identifier of the newly added node and the cluster information of the server cluster to the newly added node,
the cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster, so that the newly added node records its own node identifier and caches the cluster information, and the newly added node becomes an edge node of the server cluster.
According to a fifth aspect of the present invention, there is provided a self-construction apparatus of a server cluster, where the server cluster includes a central node, the central node is configured to manage edge nodes in the server cluster, and cluster information of the server cluster is cached in the edge nodes,
the device is applied to the edge node, and comprises:
a second receiving module, configured to receive an information acquisition request from a newly added node, where the information acquisition request is used to acquire first cluster information stored in the edge node;
and the second response module is used for responding to the information acquisition request, sending the first cluster information to the newly added node so that the newly added node determines the network address of the central node from the first cluster information, sending a cluster adding request to the central node, adding the cluster into the server cluster, and acquiring and caching second cluster information returned by the central node, wherein the second cluster information comprises at least one of the type identifier, the network address and the node identifier of each node in the server cluster.
According to a sixth aspect of the present invention, there is provided a self-building apparatus of a server cluster, the server cluster comprising a central node for managing edge nodes in the server cluster,
the device is applied to the newly-added nodes applying for joining the server cluster, and comprises the following components:
a second sending module, configured to send an information acquisition request to any edge node, where the information acquisition request is used to acquire first cluster information stored in the edge node;
a second determining module, configured to determine, after receiving the cluster information sent by the edge node in response to the information acquisition request, a network address of a central node from the cluster information;
a third sending module, configured to send a cluster join request to the central node according to the network address of the central node;
a third receiving module, configured to receive, when the central node returns a response to accept joining for the cluster joining request, a node identifier sent by the central node and second cluster information of the server cluster, where the second cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster;
and the record storage module is used for recording the node identifier of the record storage module and caching the second cluster information so as to become one of the edge nodes of the server cluster.
According to a seventh aspect of the present invention, there is provided a server cluster system, the system comprising a central node and edge nodes,
the central node is configured to perform a self-construction method of a server cluster according to any one of the first aspect;
the edge node is configured to perform the self-construction method of the server cluster according to any one of the second aspect.
According to an eighth aspect of the present invention, there is provided an electronic device, comprising the apparatus according to any one of the fourth, fifth and sixth aspects; alternatively, the first and second electrodes may be,
comprising a memory for storing computer instructions and a processor for invoking the computer instructions from the memory for performing the method according to any of the first aspects.
According to a ninth aspect of the present invention, there is provided a computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, carries out the method according to any one of the first aspects.
In this embodiment, the addition or deletion of a node in a server cluster is determined by a central node server in the server cluster, that is, the server cluster is self-constructed by the central node server, and the central node server belongs to one of the nodes in the server cluster and is a constituent member of the server cluster, in other words, a central node is determined from the members of the server cluster to manage the nodes (edge nodes) in the server cluster, so that the operation and maintenance cost of the server cluster is reduced without depending on a third-party middleware or integrating with the third-party service, and the application range of the server cluster is expanded because the central node server is not limited by the third-party middleware or the third-party server.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a block diagram of a hardware configuration of a node that implements a self-construction method of a server cluster according to an embodiment of the present invention;
fig. 2 is a first flowchart illustrating a method for self-building a server cluster according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a server cluster according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a second method for self-building a server cluster according to an embodiment of the present invention;
fig. 5 is a third schematic flowchart of a self-construction method of a server cluster according to an embodiment of the present invention;
fig. 6 is a fourth schematic flowchart of a self-construction method of a server cluster according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of a self-construction method of a server cluster according to an embodiment of the present invention;
fig. 8 is a sixth schematic flowchart of a self-construction method of a server cluster according to an embodiment of the present invention;
fig. 9 is a first schematic structural diagram of a self-configuration apparatus of a server cluster according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a self-configuration apparatus of a server cluster according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram three of a self-configuration apparatus of a server cluster according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration embodiment >
Fig. 1 is a block diagram of a hardware configuration of a node 1000 that implements a self-construction method of a server cluster according to an embodiment of the present invention.
The node 1000 may be a central node in a server cluster or an edge node in a server cluster. In addition, the node 1000 is typically a server. Wherein, the server can be a virtual machine or a physical machine.
The node 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and so forth. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. Communication device 1400 is capable of wired or wireless communication, for example. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, and the like. A user can input/output voice information through the speaker 1700 and the microphone 1800.
Although a number of devices are shown for each node 1000 in fig. 1, the present invention may relate to only some of the devices, e.g., node 1000 may relate to only memory 1200 and processor 1100.
In an embodiment of the present invention, the memory 1200 of the node 1000 is configured to store instructions for controlling the processor 1100 to execute the self-construction method of the server cluster according to the embodiment of the present invention.
In the above description, the skilled person will be able to design instructions in accordance with the disclosed solution. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
In the embodiment of the present invention, the server cluster may include a plurality of nodes (server nodes), where the plurality of nodes includes a central node, the central node may be used to manage and decide the construction of the server cluster, and the nodes other than the central node are edge nodes. In some embodiments, if there is only one node in the server cluster, then that node is the central node.
In the self-construction embodiment of the server cluster in the embodiment of the present invention, the first node joining the server cluster becomes a central node, and its own number is, for example, 1, and the nodes subsequently joining the server cluster become edge nodes, and sequentially increasing numbers may be allocated by the central node. That is, the unique node identifier of the node that is the server cluster.
< method examples >
As shown in fig. 2, this embodiment provides a self-construction method of a server cluster, which may be applied to a central node, where the method includes steps S2100 to S2400:
s2100, receiving a cluster adding request from the newly added node.
In the embodiment of the invention, at least one central node is already included in the server cluster. When a node (i.e., a newly added node) needs to join the server cluster, a cluster join request may be sent to a central node of the server cluster. Illustratively, the cluster join request may include at least a network address of the central node, a network address of the newly added node, device ID information, and the like.
S2200, responding to the cluster joining request to determine whether to accept the new node joining the server cluster.
The central node may respond to the cluster join request of the newly added node, for example, may determine whether the newly added node is legal by the network address, the device ID, and the like of the newly added node, and determine whether to accept the newly added node to join the server cluster based on the validity judgment. For example, if it is determined that the newly added node is legal, it may be determined that the newly added node is accepted to join the server cluster, and otherwise, the newly added node is rejected to join the server cluster. The related technology can be referred to for judging the validity of the newly added node, and the invention is not limited herein.
And S2300, when the condition that the newly added node is added into the server cluster is determined, determining the node identifier of the newly added node.
For example, when it is determined to accept the addition of the newly added node into the server cluster, the central node may determine the node identifier of the newly added node according to the node identifier of the current edge node in the server cluster. Further, if the node identifier is a number, a preset number field is incremented on the basis of the maximum number in all the current edge nodes of the server cluster to form a new number, so that the new number is determined as the node identifier of the newly added node.
The node identifier is, for example, a numerical number. Assuming that the number (node identifier) of the center node is 1 and there are 2 edge nodes, the numbers (node identifiers) are 2 and 3, respectively, the node identifier for the newly added node may be determined to be 4, for example. The above is merely an example and does not limit the manner of determining the node identifier of the present invention.
S2400, sending the node identifier of the newly added node and the cluster information of the server cluster to the newly added node and all edge nodes in the server cluster.
After determining the node identifier of the newly added node, the central node may update the node identifier of the newly added node into the cluster information of the server cluster, and then send the updated cluster information to the newly added node and all edge nodes in the server cluster. In other embodiments, the central node may send the cluster information of the server cluster to all the edge nodes, and send the node identifier of the newly added node to the newly added node separately, so that the newly added node can be identified quickly without searching its own node identifier from the training information.
The server cluster comprises a central node and at least one edge node in communication connection with the central node, and the construction of the server cluster can be decided by the central node. In addition, the structure of the server cluster provided in this embodiment may be as shown in fig. 3, and includes a center node and at least one edge node.
In the embodiment, the server cluster is constructed by the central node, so that the server cluster constructed by the embodiment does not need to rely on third-party middleware or be integrated with third-party services. The central node decision making comprises the following steps: the central node decides that a new node is added into the server cluster, and the central node decides that an edge node is deleted from the server cluster.
The cluster information is recorded by a central node and each edge node in the server cluster, and comprises a node type of each node as the central or edge node in the server cluster, a network address of each node and a node identifier of each node.
In this embodiment, each node in the server cluster receives and records the same cluster information. The network address in the cluster information may be an IP address, and the node identifier is assigned by the central node.
In one embodiment, the central node assigns node identifiers to the nodes according to the order in which the nodes join the server cluster. That is, the node identifiers may reflect the order in which the nodes joined the server cluster.
In one example, the node identifiers assigned by the central node may be N1, N2, N3, N4, … …, Nn. Based on this, in one example, the cluster information recorded by the node may be as shown in the following table:
node identifier Node type Network address
N1 Central node 127.0.0.1:8000
N2 Edge node 127.0.0.2:8000
N3 Edge node 127.0.0.3:8000
N4 Edge node 127.0.0.4:8000
…… Edge node ……
Nn Edge node ……
In this embodiment, a node is set in a server cluster, where the server cluster includes a central node and at least one edge node communicatively connected to the central node, and the construction of the server cluster is decided by the central node. Meanwhile, the nodes acquire and record cluster information, wherein the cluster information is recorded by a central node and each edge node in the server cluster, and comprises a node type of each node as the central node or the edge node in the server cluster, a network address of each node and a node identifier of each node. Based on this, the server cluster constructed in this embodiment includes a central node and at least one edge node in communication connection with the central node, and the construction of the server cluster is decided by the central node. Thus, the cluster constructed in this embodiment does not need to rely on third party middleware or integrate with third party services.
In other embodiments of the present invention, in order to ensure the overall stability and robustness of the server cluster, a heartbeat mechanism is established between the central node and the edge node to monitor the survivability of each node. For example, when receiving heartbeat information sent by any edge node according to the first preset time interval, the central node may send a heartbeat reply to the edge node, so that the survivability of the edge node may be determined, and the edge node may also be informed of its survival status.
Further, in order to recover the server cluster in time without affecting the operation of the central node after the central node goes down, a new central node needs to be determined in time. Illustratively, after a second preset time interval, when heartbeat information sent by any edge node is not received, the edge node is deleted from the server cluster, and the cluster information in the server cluster is updated; and broadcasting the deletion event of the edge node to all other edge nodes in the server cluster, and sending the updated cluster information to all other edge nodes in the server cluster.
In summary, the embodiment of the invention does not need to rely on third-party middleware or integrate with third-party services, and the construction and management of the cluster are realized by utilizing the node resources of the server cluster.
As shown in fig. 4, the present invention further provides a self-construction method of a server cluster, where the method is applied to an edge node of the server cluster, and the method may include:
and S8100, receiving an information acquisition request from the newly added node, wherein the information acquisition request is used for acquiring the first cluster information stored in the edge node.
On the basis of the foregoing embodiment, in an embodiment of the present invention, the newly added node may obtain the network address (specific network address) of any edge node in the following manner: 1. the method can communicate with any edge node by receiving the network address manually input by a user, and sends an information acquisition request to the edge node; 2. if the user inputs two or more network addresses, one of the newly added nodes can be randomly selected as a designated network address so as to send an information acquisition request to an edge node corresponding to the network address; 3. on the basis of the mode 2, if the newly added node is based on a randomly selected network address with an invalid designated network address (that is, the cluster information cannot be acquired from the corresponding node based on the designated network address), the newly added node reselects from the network addresses input by the user to the input interface to serve as another designated network address, so as to send an information acquisition request to the edge node corresponding to the network address. Illustratively, the network address manually input by the user needs to be a network address recorded in the cluster information, and the cluster information includes the node type and the corresponding network address.
S8200, responding to the information acquisition request, and sending the first cluster information to the newly added node, so that the newly added node determines the network address of the central node from the first cluster information.
After S8200, the newly added points may send a cluster join request to the central node, join the server cluster, and obtain and cache second cluster information returned by the central node, where the second cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster.
And for the edge node, after a second preset time interval, if a heartbeat reply returned by the center node based on the heartbeat information is not received, sending the heartbeat information to a new center node, wherein the new center node is determined from the edge nodes in the server cluster according to a preset decision mechanism. And a heartbeat mechanism is established between the server cluster and the central node, so that the survivability of each node is monitored in time, and the overall stability and robustness of the server cluster are ensured. The predetermined decision mechanism includes determining an edge node that joined the server cluster earliest as a new edge node when the center node does not return a heartbeat reply to the edge node at the second preset time interval, and exemplarily, the time when each edge node joined the server cluster may be determined according to the size of the node identifier of each edge node, for example, there are 5 edge nodes, and the node identifiers are 2, 4, 6, 8, and 10, respectively, if the node identifier of the center node is 1, the edge node with the node identifier of 2 may be determined as the node that joined the server cluster earliest, and therefore, if the current center node is down (the heartbeat reply is not returned to the edge node at the second preset time interval), the edge node with the node identifier of 2 may be determined as the new center node. Further, after a new central node is determined, third cluster information sent by the new central node is received and cached, and the third cluster information includes at least one or three of a type identifier, a network address and a node identifier of each node in the server cluster after the central node is updated.
In other embodiments, the predetermined decision mechanism may include determining the edge node that joined the server cluster at the latest as the new edge node when the center node does not return a heartbeat reply to the edge node at the second preset time interval, for example, when the center node assigns a node identifier to the edge node, the center node may embody an order of joining the corresponding edge node to the server cluster in the node identifier. In one example, the node identifiers assigned by the central node to the edge nodes that join the server cluster in sequence are N1, N2, N3, N4. Wherein N1 is an edge node joining the first server cluster, N2 is an edge node joining the second server cluster, N3 is an edge node joining the third server cluster, and N4 is an edge node joining the fourth server cluster. On the basis, in the case that a predetermined decision mechanism can be set to set the edge node which is added into the server cluster at the latest as a new center node, after the center node is lost, the node determines that the new center node is the node N4.
As shown in fig. 5, the present invention further provides a self-construction method of a server cluster, where the method is applied to a newly added node of the server cluster, and the method may include:
s9100, an information acquisition request is sent to any edge node, and the information acquisition request is used for acquiring the first cluster information stored in the edge node.
S9200, after the cluster information sent by the edge node responding to the information acquisition request is received, the network address of the central node is determined from the cluster information.
S9300, sending a cluster joining request to the central node according to the network address of the central node.
S9400, when the central node returns a response of accepting joining to the cluster joining request, receiving a node identifier sent by the central node and second cluster information of the server cluster. Wherein the second cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster.
S9500, recording the node identifier of the server and caching the second cluster information to become one of the edge nodes of the server cluster. The central node determines the type identifier of the node, for example, determines that the node is an edge node, in addition to determining the node identifier of the newly added node.
Further, the cluster information includes a type identifier and a network address of each node, and S9200 may include the following steps: s9210, according to the type identifier of each node in the cluster information, determining the node which is the central node represented by the type identifier from the server cluster. S9220, the network address of the node is obtained to determine the network address of the central node.
In this embodiment, the newly added node may send an information acquisition request to the edge node corresponding to the network address according to the specified network address input by the user, so as to request the network address of the central node. Illustratively, the network address of the central node may be acquired according to the first cluster information sent by the edge node in response to the information acquisition request. Further, the newly added node sends a cluster joining request for joining the server cluster to the central node according to the network address of the central node.
In this embodiment, after the newly added node receives the response information indicating that the join request is accepted, for example, the following steps may be further performed:
A. and receiving and recording second cluster information sent by the central node under the condition of receiving response information indicating that the joining request is accepted. In this embodiment, the second cluster information acquired by the newly added node may include, for example: the network address of the newly added node, the node identifier distributed by the central node for the newly added node, the node type set by the central node for the newly added node, and at least one of the network address, the node identifier and the node type of other edge nodes, or the corresponding relation of the network address, the node identifier and the node type of each edge node. In this embodiment, the node type set for the node by the central node is an edge node. After the newly added node becomes an edge node of the server cluster, the steps performed by the edge node shown in fig. 4 may be performed, which is not described herein again.
In some embodiments, after the central node is updated, the central node change time is sent to all the edge nodes, and the edge node/newly added node receives the central node change event broadcasted by the new central node and updates the cluster information to record the new central node.
In this embodiment, after the edge node/the newly added node receives the central node change event, the edge node/the newly added node analyzes the central node change event, and determines that the central node in the cluster changes at the current time, and the new central node is the node that sends the central node change event. At this time, the edge node/the newly added node modifies the node type of the new central node into the central node and modifies the node type of the original central node into the edge node in the cluster information.
In this embodiment, the edge node/the newly added node can timely learn that the central node changes through the join event broadcast by the central node, and record accurate cluster information.
In other embodiments, the edge node/newly added node sets the state of the server cluster to a stable state when receiving a central node change event broadcasted by the central node.
It should be noted that the self-construction method of the server cluster formed by any combination of the above embodiments is within the scope of the present application.
Based on this, in an embodiment, as shown in fig. 6, a self-construction method of a server cluster provided by this embodiment, especially a method for adding a new node to a server cluster, includes the following steps S6110 to S6170, and S6210 to S6250:
s6110, newly adding and acquiring a specified network address.
S6120, the newly added node sends a request to the edge node corresponding to the specified network address to obtain the network address of the central node.
S6130, the newly added node obtains the cluster information of the corresponding edge node based on the request feedback.
S6140, the newly added node determines the network address of the central node according to the cluster information.
S6150, the newly added node sends a cluster joining request for joining the server cluster to the central node according to the network address of the central node.
S6210, the central node receives a cluster join request requesting to join the server cluster.
S6220, the central node feeds back response information indicating acceptance of the joining request to the newly added node corresponding to the cluster joining request.
S6160, the newly added node obtains the response message of the central node receiving the join request based on the indication fed back by the cluster join request.
S6230, the central node acquires a network address of a node corresponding to the cluster joining request, allocates a node identifier to the node corresponding to the cluster joining request, and sets the type of the node corresponding to the cluster joining request as an edge node.
S6240, the central node adds the network address and type of the node corresponding to the cluster join request and the allocated node identifier to the cluster information, and sends the cluster information to the newly added node corresponding to the cluster join request.
S6170, the newly added node acquires and records the cluster information sent by the central node.
S6250, broadcasting, by the central node, a new node corresponding to the cluster adding request as an adding event for adding the new edge node into the server cluster.
In an embodiment, as shown in fig. 7, a self-construction method of a server cluster provided in this embodiment includes the following steps S7110 to S7130, and S7210 to S7230:
s7110, the edge node sends heartbeat information to the central node according to a preset time interval, and receives heartbeat reply fed back by the central node based on the heartbeat information.
S7210, in a second preset time period, the central node deletes the network address, the node type and the node identifier of a certain edge node from the cluster information under the condition that the heartbeat information sent by the certain edge node is not received.
S7220, the central node broadcasts a deletion event for deleting a certain edge node from the server cluster.
S7120, the edge node acquires a deletion event which is broadcasted by the central node and used for deleting a certain edge node from the server cluster.
S7130, the edge nodes update the cluster information according to the deletion event so as to delete the network address, the node type and the node identifier of a certain edge node.
In an embodiment, as shown in fig. 8, a self-construction method of a server cluster provided in this embodiment includes the following steps:
the edge node N2, the edge node N3, and the edge node N4 send heartbeat information to the center node N1 at predetermined time intervals, and receive a heartbeat reply fed back by the center node N1 based on the heartbeat information.
And the edge node N2 determines a certain node in the server cluster as a new center node according to a predetermined decision mechanism under the condition that a heartbeat reply fed back by the center node N1 based on the heartbeat information is not received in a first preset time period.
In the case where the new center node is the edge node N2, the edge node N2 updates the cluster information to update the type of the edge node N2 in the cluster information as the center node and the node type of the original center node N1 as the edge node.
The edge node N3 and the edge node N4 send heartbeat information to the new center node N2 determined according to a predetermined decision mechanism.
The new center node N2 receives the heartbeat information sent by the edge node N3 and the edge node N4, and feeds back a heartbeat reply to the edge node N3 and the edge node N4 based on the heartbeat information.
The new central node N2 broadcasts a central node change event in the server cluster.
Edge node N3 and edge node N4 receive the center node change event broadcast by the new center node N2.
The edge node N3 and the edge node N4 update the cluster information to record a new center node N2 according to the center node change event.
It should be noted that the present embodiment is exemplarily illustrated by the server cluster including the center node N1 and the edge nodes N2, N3, and N4. It can be understood that after the central node N1 is lost, the edge node N3 and the edge node N4 cannot receive the heartbeat reply fed back by the central node N1 based on the heartbeat information within the first preset time period.
< apparatus embodiment >
The embodiment provides a self-construction apparatus 70 for a server cluster, where the server cluster includes a central node, the central node is used for managing edge nodes in the server cluster, and the apparatus is applied to the central node. As shown in fig. 9, the apparatus 70 includes a first receiving module 71, a first responding module 72, a first determining module 73, and a first sending module 74, wherein:
the first receiving module 71 is configured to receive a cluster join request from a newly added node.
The first responding module 72 is configured to respond to the cluster joining request to determine whether to accept the newly added node to join the server cluster.
The first determining module 73 is configured to determine the node identifier of the newly added node when determining that the newly added node is accepted to join the server cluster.
The first sending module 74 is configured to send the node identifier of the newly added node and the cluster information of the server cluster to the newly added node.
The cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster, so that the newly added node records its own node identifier and caches the cluster information, and the newly added node becomes an edge node of the server cluster.
In an embodiment, the first determining module 73 is specifically configured to, when it is determined to accept the addition of the newly added node into the server cluster, determine the node identifier of the newly added node according to the node identifier of the current edge node in the server cluster.
In an embodiment, the node identifier is a number, and the first determining module 73 is specifically configured to increment a preset number field on the basis of a maximum number in all current edge nodes of the server cluster to form a new number, so as to determine the new number as the node identifier of the newly added node.
In one embodiment, the first sending module 74 is further configured to send a heartbeat reply to any edge node when receiving heartbeat information sent by the edge node according to the first preset time interval.
In an embodiment, the apparatus 70 further includes an updating module, configured to delete any edge node from the server cluster when the heartbeat information sent by any edge node is not received after a second preset time interval, and update cluster information in the server cluster;
the first sending module 74 is further configured to broadcast the deletion event of the edge node to all other edge nodes in the server cluster, and send the updated cluster information to all other edge nodes in the server cluster.
The embodiment further provides a self-construction apparatus 100 for a server cluster, where the server cluster includes a central node, the central node is used to manage edge nodes in the server cluster, and the apparatus is applied to the edge nodes. As shown in fig. 10, the apparatus 100 includes a second receiving module 101 and a second responding module 102, wherein:
the second receiving module 101 is configured to receive an information acquisition request from a newly added node, where the information acquisition request is used to acquire first cluster information stored in the edge node;
the second response module 102 is configured to respond to the information obtaining request, send the first cluster information to the newly added node, so that the newly added node determines a network address of the central node from the first cluster information, send a cluster joining request to the central node, join the server cluster, and obtain and cache second cluster information returned by the central node, where the second cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster.
In one embodiment, the self-building apparatus 100 of the server cluster further includes a heartbeat module, and the heartbeat module is configured to: heartbeat information is sent to the central node according to a first preset time interval; and receiving a heartbeat reply returned by the central node based on the heartbeat information.
In an embodiment, the heartbeat module is further configured to send heartbeat information to a new central node after a second preset time interval if a heartbeat reply returned by the central node based on the heartbeat information is not received, where the new central node is determined from the edge nodes in the server cluster according to a predetermined decision mechanism.
In one embodiment, the predetermined decision mechanism includes determining an edge node that joined the server cluster earliest as a new edge node when the center node does not return a heartbeat reply to an edge node at a second preset time interval.
In an embodiment, the second receiving module 101 is further configured to receive and cache third cluster information sent by a new central node after the new central node is determined, where the third cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster after the central node is updated.
This embodiment also provides a self-construction apparatus 110 of a server cluster, where the server cluster includes a central node, the central node is used to manage edge nodes in the server cluster, and the apparatus is applied to the newly added nodes that apply for joining the server cluster. As shown in fig. 11, the apparatus 110 includes a second sending module 111, a second determining module 112, a third sending module 113, a third receiving module 114, and a record storage module 115, wherein:
the second sending module 111 is configured to send an information obtaining request to any edge node, where the information obtaining request is used to obtain first cluster information stored in the edge node;
the second determining module 112 is configured to determine, after receiving the cluster information sent by the edge node in response to the information obtaining request, a network address of a central node from the cluster information;
the third sending module 113 is configured to send a cluster join request to the central node according to the network address of the central node;
the third receiving module 114 is configured to receive, when the central node returns a response of accepting joining for the cluster joining request, a node identifier sent by the central node and second cluster information of the server cluster, where the second cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster;
the recording and storing module 115 is configured to record a node identifier of itself and cache the second cluster information to become one of the edge nodes of the server cluster.
In an embodiment, the cluster information includes a type identifier and a network address of each node, and the second determining module 112 is specifically configured to determine, from the server cluster, a node representing a central node as the type identifier according to the type identifier of each node in the cluster information;
and acquiring the network address of the node to determine the network address as the network address of the central node.
< apparatus embodiment >
The present embodiment provides an electronic device 80, as shown in fig. 12, where the electronic device 80 includes a self-construction apparatus 70 of any one of the server clusters shown in the above apparatus embodiments. Alternatively, it comprises:
a memory 81 and a processor 82, wherein the memory 81 is used for storing computer instructions, and the processor 82 is used for calling the computer instructions from the memory 81 to execute the self-construction method of any server cluster provided by the method embodiment.
The invention also provides a server cluster system, which includes a central node and an edge node, where the central node and the edge node are respectively used to execute the relevant steps in the respective corresponding method embodiments in the foregoing embodiments, and are not described herein again.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including AN object oriented programming language such as Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" language or similar programming languages.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (18)

1. A method for self-building a server cluster, wherein the server cluster includes a central node, and the central node is used for managing edge nodes in the server cluster, and the method is applied to the central node, and the method includes:
receiving a cluster adding request from a newly added node;
responding the cluster joining request to determine whether to accept the newly added node to join the server cluster;
when the newly added node is determined to be accepted to be added into the server cluster, determining a node identifier of the newly added node;
and sending the node identifier of the newly added node and cluster information of the server cluster to the newly added node and all edge nodes in the server cluster, wherein the cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster, so that the newly added node records the node identifier of the newly added node and caches the cluster information, and the newly added node becomes one edge node of the server cluster.
2. The method of claim 1, wherein determining the node identifier of the newly added node when determining to accept the newly added node to join the server cluster comprises:
and when the newly added node is determined to be added into the server cluster, determining the node identifier of the newly added node according to the node identifier of the current edge node in the server cluster.
3. The method of claim 2, wherein the node identifier is a numeric number,
the determining the node identifier of the newly added node according to the node identifier of the current edge node in the server cluster includes:
and increasing preset number fields on the basis of the maximum number in all the current edge nodes of the server cluster to form a new number, and determining the new number as the node identifier of the newly added node.
4. The method of claim 1, further comprising:
and when receiving heartbeat information sent by any edge node according to a first preset time interval, sending a heartbeat reply to the edge node.
5. The method of claim 1, further comprising:
after a second preset time interval, when the heartbeat information sent by any edge node is not received, deleting the edge node from the server cluster, and updating the cluster information in the server cluster;
and broadcasting the deletion event of the edge node to all other edge nodes in the server cluster, and sending the updated cluster information to all other edge nodes in the server cluster.
6. A self-construction method of a server cluster is characterized in that the server cluster comprises a central node, the central node is used for managing edge nodes in the server cluster, cluster information of the server cluster is cached in the edge nodes,
the method is applied to the edge node, and comprises the following steps:
receiving an information acquisition request from a newly added node, wherein the information acquisition request is used for acquiring first cluster information stored in the edge node;
and responding to the information acquisition request, sending the first cluster information to the newly added node so that the newly added node determines the network address of the central node from the first cluster information, sending a cluster adding request to the central node, adding the cluster to the server cluster, and acquiring and caching second cluster information returned by the central node, wherein the second cluster information comprises at least one of the type identifier, the network address and the node identifier of each node in the server cluster.
7. The method of claim 6, further comprising:
heartbeat information is sent to the central node according to a first preset time interval; and the number of the first and second electrodes,
and receiving a heartbeat reply returned by the central node based on the heartbeat information.
8. The method of claim 7, further comprising:
and after a second preset time interval, if a heartbeat reply returned by the central node based on the heartbeat information is not received, sending the heartbeat information to a new central node, wherein the new central node is determined from the edge nodes in the server cluster according to a preset decision mechanism.
9. The method of claim 8, wherein the predetermined decision mechanism comprises determining an edge node that joined the server cluster earliest as a new edge node when the central node does not return a heartbeat reply to an edge node at a second predetermined time interval.
10. The method according to claim 8 or 9, characterized in that the method further comprises:
and after determining a new central node, receiving and caching third cluster information sent by the new central node, wherein the third cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster after updating the central node.
11. A self-construction method of a server cluster, characterized in that the server cluster comprises a central node for managing edge nodes in the server cluster,
the method is applied to a newly added node applying for joining the server cluster, and comprises the following steps:
sending an information acquisition request to any edge node, wherein the information acquisition request is used for acquiring first cluster information stored in the edge node;
after the cluster information sent by the edge node in response to the information acquisition request is received, determining the network address of the central node from the cluster information;
sending a cluster joining request to the central node according to the network address of the central node;
when the central node returns a response of accepting the joining to the cluster joining request, receiving a node identifier sent by the central node and second cluster information of the server cluster, wherein the second cluster information comprises at least one of a type identifier, a network address and a node identifier of each node in the server cluster;
and recording the node identifier of the node and caching the second cluster information to become one of the edge nodes of the server cluster.
12. The method of claim 11, wherein the cluster information comprises a type identifier and a network address of each node,
after the cluster information sent by the edge node in response to the information acquisition request is received, determining a network address of a center node from the cluster information, including:
determining a node representing a central node for the type identifier from the server cluster according to the type identifier of each node in the cluster information;
and acquiring the network address of the node to determine the network address as the network address of the central node.
13. A self-construction apparatus of a server cluster, wherein the server cluster comprises a central node, the central node is used for managing edge nodes in the server cluster, the apparatus is applied to the central node, and the apparatus comprises:
the first receiving module is used for receiving a cluster adding request from a newly added node;
the first response module is used for responding to the cluster joining request so as to determine whether to accept the newly added node to join the server cluster;
a first determining module, configured to determine a node identifier of the newly added node when it is determined that the newly added node is accepted to join the server cluster;
a first sending module, configured to send the node identifier of the newly added node and the cluster information of the server cluster to the newly added node,
the cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster, so that the newly added node records its own node identifier and caches the cluster information, and the newly added node becomes an edge node of the server cluster.
14. A self-construction device of a server cluster is characterized in that the server cluster comprises a central node, the central node is used for managing edge nodes in the server cluster, cluster information of the server cluster is cached in the edge nodes,
the device is applied to the edge node, and comprises:
a second receiving module, configured to receive an information acquisition request from a newly added node, where the information acquisition request is used to acquire first cluster information stored in the edge node;
and the second response module is used for responding to the information acquisition request, sending the first cluster information to the newly added node so that the newly added node determines the network address of the central node from the first cluster information, sending a cluster adding request to the central node, adding the cluster into the server cluster, and acquiring and caching second cluster information returned by the central node, wherein the second cluster information comprises at least one of the type identifier, the network address and the node identifier of each node in the server cluster.
15. A self-construction apparatus of a server cluster, wherein the server cluster comprises a central node for managing edge nodes in the server cluster,
the device is applied to the newly-added nodes applying for joining the server cluster, and comprises the following components:
a second sending module, configured to send an information acquisition request to any edge node, where the information acquisition request is used to acquire first cluster information stored in the edge node;
a second determining module, configured to determine, after receiving the cluster information sent by the edge node in response to the information acquisition request, a network address of a central node from the cluster information;
a third sending module, configured to send a cluster join request to the central node according to the network address of the central node;
a third receiving module, configured to receive, when the central node returns a response to accept joining for the cluster joining request, a node identifier sent by the central node and second cluster information of the server cluster, where the second cluster information includes at least one of a type identifier, a network address, and a node identifier of each node in the server cluster;
and the record storage module is used for recording the node identifier of the record storage module and caching the second cluster information so as to become one of the edge nodes of the server cluster.
16. A server cluster system, characterized in that the system comprises a central node and an edge node,
the central node is configured to perform a self-construction method of a server cluster according to any of claims 1-5;
the edge node is configured to perform the self-construction method of a server cluster according to any of claims 6-10.
17. An electronic device, characterized in that the electronic device comprises an apparatus according to any of claims 13-15; alternatively, the first and second electrodes may be,
comprising a memory for storing computer instructions and a processor for invoking the computer instructions from the memory to perform the method of any of claims 1-12.
18. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the method according to any one of the claims 1-12.
CN202010232011.8A 2020-03-27 2020-03-27 Self-construction method, device, system, equipment and storage medium of server cluster Active CN111478953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010232011.8A CN111478953B (en) 2020-03-27 2020-03-27 Self-construction method, device, system, equipment and storage medium of server cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010232011.8A CN111478953B (en) 2020-03-27 2020-03-27 Self-construction method, device, system, equipment and storage medium of server cluster

Publications (2)

Publication Number Publication Date
CN111478953A true CN111478953A (en) 2020-07-31
CN111478953B CN111478953B (en) 2022-09-06

Family

ID=71747839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010232011.8A Active CN111478953B (en) 2020-03-27 2020-03-27 Self-construction method, device, system, equipment and storage medium of server cluster

Country Status (1)

Country Link
CN (1) CN111478953B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631687A (en) * 2020-12-31 2021-04-09 中国农业银行股份有限公司 Configuration method, device and equipment of service cluster
CN113660339A (en) * 2021-08-18 2021-11-16 北京百度网讯科技有限公司 Method and apparatus for decentralized clustering

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105656653A (en) * 2014-11-14 2016-06-08 华为技术有限公司 Network access method of newly added node in distributed coordination system, device and system
CN107087032A (en) * 2017-05-11 2017-08-22 腾讯科技(深圳)有限公司 Realize the method and apparatus that cluster is set up
CN109873711A (en) * 2017-12-05 2019-06-11 北京金山云网络技术有限公司 A kind of cloud platform management method, device, electronic equipment and readable storage medium storing program for executing
CN110071978A (en) * 2019-04-28 2019-07-30 新华三信息安全技术有限公司 A kind of method and device of cluster management
CN110401651A (en) * 2019-07-19 2019-11-01 苏州浪潮智能科技有限公司 A kind of distributed type assemblies node monitoring method, apparatus and system
CN110650193A (en) * 2019-09-20 2020-01-03 腾讯科技(深圳)有限公司 Node management method, cluster management device and storage medium
US20200084088A1 (en) * 2018-09-10 2020-03-12 Oracle International Corporation Determining The Health Of Other Nodes In A Same Cluster Based On Physical Link Information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105656653A (en) * 2014-11-14 2016-06-08 华为技术有限公司 Network access method of newly added node in distributed coordination system, device and system
CN107087032A (en) * 2017-05-11 2017-08-22 腾讯科技(深圳)有限公司 Realize the method and apparatus that cluster is set up
CN109873711A (en) * 2017-12-05 2019-06-11 北京金山云网络技术有限公司 A kind of cloud platform management method, device, electronic equipment and readable storage medium storing program for executing
US20200084088A1 (en) * 2018-09-10 2020-03-12 Oracle International Corporation Determining The Health Of Other Nodes In A Same Cluster Based On Physical Link Information
CN110071978A (en) * 2019-04-28 2019-07-30 新华三信息安全技术有限公司 A kind of method and device of cluster management
CN110401651A (en) * 2019-07-19 2019-11-01 苏州浪潮智能科技有限公司 A kind of distributed type assemblies node monitoring method, apparatus and system
CN110650193A (en) * 2019-09-20 2020-01-03 腾讯科技(深圳)有限公司 Node management method, cluster management device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631687A (en) * 2020-12-31 2021-04-09 中国农业银行股份有限公司 Configuration method, device and equipment of service cluster
CN113660339A (en) * 2021-08-18 2021-11-16 北京百度网讯科技有限公司 Method and apparatus for decentralized clustering
CN113660339B (en) * 2021-08-18 2023-08-04 北京百度网讯科技有限公司 Method and apparatus for decentralizing clusters

Also Published As

Publication number Publication date
CN111478953B (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN108306819B (en) Instant communication system implementation method, medium and computing device based on block chain
KR101871383B1 (en) Method and system for using a recursive event listener on a node in hierarchical data structure
KR102376713B1 (en) Composite partition functions
CN111708557B (en) Method, device and storage medium for updating configuration file
CN102769640B (en) The update method of user profile, server and system
CN107404509B (en) Distributed service configuration system and information management method
CN105869057B (en) Comment storage device, comment reading method and device, and comment writing method and device
KR20140035394A (en) Selective linking of message accounts
CN111478953B (en) Self-construction method, device, system, equipment and storage medium of server cluster
CN109618176B (en) Processing method, equipment and storage medium for live broadcast service
KR102505352B1 (en) User communication method, device, apparatus and storage medium in live room
CN112882647B (en) Method, electronic device and computer program product for storing and accessing data
US20200351111A1 (en) Messaging to enforce operation serialization for consistency of a distributed data structure
CN111581239A (en) Cache refreshing method and electronic equipment
CN107135108A (en) The update method and system of network connection list
CN112069137B (en) Method, device, electronic equipment and computer readable storage medium for generating information
CN104427118A (en) Method for recommending contents and mobile terminal
CN109347994B (en) Internet protocol IP address obtaining method and device, storage medium and electronic equipment
CN111274004A (en) Process instance management method and device and computer storage medium
CN110798358A (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN112995254B (en) Method, equipment, system, device and component for transmitting heartbeat information
CN111428453B (en) Processing method, device and system in annotation synchronization process
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN112448985B (en) Distributed system, network processing method and device and electronic equipment
CN111080250B (en) Flow backspacing compensation method and device, storage medium and electronic equipment

Legal Events

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