HK1248415A1 - Method and device for sending messages and distributed device cluster system - Google Patents
Method and device for sending messages and distributed device cluster systemInfo
- Publication number
- HK1248415A1 HK1248415A1 HK18107498.2A HK18107498A HK1248415A1 HK 1248415 A1 HK1248415 A1 HK 1248415A1 HK 18107498 A HK18107498 A HK 18107498A HK 1248415 A1 HK1248415 A1 HK 1248415A1
- Authority
- HK
- Hong Kong
- Prior art keywords
- message
- sent
- receiver
- original sender
- heartbeat
- Prior art date
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a method for sending a message, which is characterized in that it comprises the following steps: obtaining a message to be sent; Obtain the list of available recipients; Determining the recipient address of the message to be sent from the list of available recipients according to an algorithm that maintains the consistency of the relationship between the receiver and the original sender; Sending the message to be sent to the recipient address of the message to be sent.The problem of wrong judgment and processing caused by random distribution of messages can be avoided as far as possible.At the same time, it can increase the flexibility of expanding or adjusting the distributed device cluster receiving messages.Achieve the effect of improving the availability of the system and business.
Description
Technical Field
The application relates to a method and a device for sending messages. It also relates to two distributed device cluster systems.
Background
For a cluster of distributed computer systems, in order to manage each service running on the distributed system, it is necessary to manage state information of each service node in the cluster and the service running on the node. Typically, each node within the distributed system reports the status of its own node and the traffic running on the node by periodically sending heartbeat messages to the status management server. The state management server judges the state of the service running on the node through the content of the heartbeat message sent by each node, or judges the state of the node through analyzing the condition that the node sends the heartbeat message.
With the increase of the number of nodes of the distributed system, the pressure of receiving and processing the heartbeat messages of the high frequency of the nodes by the single state management server is increased, and when the number of the nodes reaches a certain scale or the frequency of the heartbeat messages reaches a certain level, the single state management server cannot bear the pressure, so that the faults such as delay, hysteresis, congestion and the like can be caused, and even the state management server fails. And then the system can not obtain the message, that is, the state information of each node and each service carried by the message can not be obtained.
Even if the heartbeat messages are queued by the queue equipment before the single server, the huge high-frequency heartbeat messages can also cause pressure which is hard to bear on the queue equipment, and can also cause processing delay, blockage and other faults of the queue equipment and even failure, and the fault or failure of the queue equipment can cause the state management server not to obtain the real-time state information of each node and each service, so that the system cannot obtain the messages, and cannot obtain the state information of each node and each service carried by the messages.
Whether the state management server fails or the queue equipment fails or fails, the system cannot obtain the content of the message, and corresponding services cannot be deployed, updated or operated according to the actual states of the nodes or the services, so that the availability of the system is reduced.
It can be seen that a single device cannot handle the reception processing of high-frequency messages such as heartbeat messages in a large-capacity distributed network, and a plurality of devices or even a distributed device cluster is required to handle the reception processing of a huge number of high-frequency messages such as heartbeat messages.
The existing method for sending messages to multiple devices or distributed device clusters is generally to distribute messages randomly and uniformly to different receiving devices or devices in the distributed cluster, and because messages are randomly distributed to different receiving devices, the messages of the same original sender are distributed to different receivers. However, for time-sequence sensitive messages such as heartbeat messages, the existing method of randomly distributing messages can cause the problem that the receiver receiving the message makes wrong judgment and processing because the receiver does not receive the messages distributed to other receivers.
Disclosure of Invention
The application provides a method of sending a message. The application also provides a device for sending the message. The application also provides a distributed equipment cluster system.
The application provides a method for sending messages, which comprises the following steps:
acquiring a message to be sent;
acquiring an available receiver list;
determining a receiver address of the message to be sent from the available receiver list according to an algorithm for keeping consistency of the relation between the receiver and the original sender;
and sending the message to be sent to the address of the receiver of the message to be sent.
Preferably, the determining the receiver address of the message to be sent from the available receiver list according to the algorithm for maintaining the consistency of the relation between the receiver and the original sender includes:
and determining the receiver address of the message to be sent by using the identification of the available receiver in the available receiver list and the identification of the original sender of the message to be sent and adopting a consistent hash algorithm.
Preferably, the messages comprise ordered messages.
Preferably, the identification of the recipient comprises a name or address of the recipient.
Preferably, the identification of the original sender comprises the name or address of the original sender.
Preferably, the obtaining the list of available recipients comprises:
a list of available recipients is obtained from a database.
Preferably, the obtaining the list of available recipients comprises:
the list of available recipients is obtained locally.
Preferably, the step of locally obtaining the available recipient list further comprises the following steps of obtaining and storing the available recipient list:
obtaining the list of available recipients from a database at regular time intervals;
storing the list of available recipients locally.
Preferably, the step of determining the receiver address of the message to be sent from the available receiver list according to the algorithm for maintaining the consistency of the relation between the receiver and the original sender further comprises the following step of sending a farewell message:
and sending a bystander message to the address of the receiver corresponding to the original sender of the message to be sent, which is locally stored, according to the relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, wherein the address of the receiver corresponds to the original sender of the message to be sent, which is locally stored.
Preferably, the sending, according to the relationship between the locally stored receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, the announcement message to the locally stored address of the receiver corresponding to the original sender of the message to be sent includes:
and when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent, sending a bystander message to the address of the receiver corresponding to the original sender of the locally stored message to be sent.
Preferably, the sending, according to the relationship between the locally stored receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, the announcement message to the locally stored address of the receiver corresponding to the original sender of the message to be sent includes:
and when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent and the available receiver list comprises the receiver corresponding to the original sender of the locally stored message to be sent, sending a bystander message to the address of the receiver corresponding to the original sender of the locally stored message to be sent.
Preferably, the step of sending the bystander message to the address of the receiver corresponding to the original sender of the message to be sent, which is stored locally, further comprises the following steps:
and updating the locally stored receiver corresponding to the original sender of the message to be sent according to the locally stored relation between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent.
Preferably, the updating, according to the relationship between the locally stored receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, the receiver corresponding to the locally stored original sender of the message to be sent includes:
and when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent, updating the receiver corresponding to the original sender of the locally stored message to be sent by using the receiver of the message to be sent.
Preferably, the heartbeat message generation node is used for sending heartbeat messages in each heartbeat message generation node in the distributed cluster system.
Preferably, the state management server in the cluster system for distributed state management servers forwards the heartbeat message to other corresponding state management servers after receiving the heartbeat message.
Preferably, the heartbeat message forwarding node used in the distributed cluster system forwards the heartbeat message.
The application provides a device for sending messages, which comprises:
a message obtaining unit, configured to obtain a message to be sent;
an available recipient acquiring unit for acquiring an available recipient list;
a receiver address determining unit, configured to determine a receiver address of the message to be sent from the available receiver list according to an algorithm that maintains consistency of a relationship between a receiver and an original sender;
and the sending unit is used for sending the message to be sent to the receiver address of the message to be sent.
Preferably, the receiver address determining unit is specifically configured to determine the receiver address of the message to be sent by using the identifier of the available receiver in the available receiver list and the identifier of the original sender of the message to be sent, and using a consistent hash algorithm.
Preferably, the available recipient acquiring unit is specifically configured to acquire the available recipient list from a database.
Preferably, the available recipient acquiring unit is specifically configured to acquire the available recipient list from a local.
Preferably, the method further comprises the following steps:
a recipient list periodic acquisition subunit configured to acquire the available recipient list from the database at fixed time intervals;
a recipient list storing subunit, configured to store the available recipient list locally.
Preferably, the method further comprises the following steps:
and the bystander message sending subunit is used for sending the bystander message to the address of the receiver corresponding to the original sender of the message to be sent, which is locally stored, according to the relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, wherein the receiver is locally stored.
Preferably, the bystander message sending subunit is specifically configured to send the bystander message to an address of a receiver corresponding to the original sender of the message to be sent, which is locally stored, when the receiver corresponding to the original sender of the message to be sent, which is locally stored, is different from the receiver of the message to be sent.
Preferably, the farewell message sending subunit is specifically configured to, when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent, and the available receiver list includes the receiver corresponding to the original sender of the locally stored message to be sent, send the farewell message to the address of the receiver corresponding to the original sender of the locally stored message to be sent.
Preferably, the method further comprises the following steps:
and the local updating subunit is configured to update the locally stored receiver corresponding to the original sender of the message to be sent according to a relationship between the locally stored receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent.
Preferably, the local updating subunit is specifically configured to update, by the receiver of the message to be sent, the locally stored receiver of the message to be sent, when the receiver corresponding to the locally stored original sender of the message to be sent is different from the receiver of the message to be sent.
The distributed equipment cluster system provided by the application comprises more than one heartbeat message generating node and more than one state management node, wherein each heartbeat message generating node is connected with each state management node through a network, the heartbeat message generating node generates and sends heartbeat messages to the corresponding state management node, and the state management node analyzes and processes the corresponding heartbeat messages,
each heartbeat message generating node is provided with a message sending device provided by the application and used for sending the generated heartbeat message to the corresponding state management node;
or the state management nodes are mutually connected through a network, and a message sending device provided by the application is deployed on each state management node and used for forwarding the received heartbeat message sent by the heartbeat message generating node to the corresponding state management node.
The application provides another kind of distributed equipment cluster system, including more than one heartbeat message generation node, heartbeat message forwarding node and more than one state management node, heartbeat message generation node, heartbeat message forwarding node with state management node is through network connection each other, heartbeat message generation node produces and sends heartbeat message and gives heartbeat message forwarding node, heartbeat message forwarding node receives and forwards heartbeat message gives correspondingly state management node, state management node carries out analysis processes to corresponding heartbeat message, characterized in that:
each heartbeat message generating node is provided with a message sending device provided by the application and used for sending the generated heartbeat message to a corresponding state management node through the heartbeat message forwarding node;
or the heartbeat message forwarding node is provided with a message sending device provided by the application and used for forwarding the heartbeat message sent by the heartbeat message generating node to the corresponding state management node;
and then, or the state management nodes are mutually connected through a network and each state management node is provided with a message sending device provided by the application, and the message sending device is used for forwarding the received heartbeat message sent by the heartbeat message generating node to the corresponding state management node.
Compared with the prior art, the method for sending the message has the following advantages:
the method for sending the message can determine the address of the receiver of the current time corresponding to the message to be sent under the condition of keeping the consistency of the relation between the receiver and the original sender.
When the receiver corresponding to the original sender of the message to be sent is valid, the message is kept to be sent to the same receiver, and when the receiver corresponding to the original sender of the message to be sent is invalid, a new receiver address is determined again only for the original sender corresponding to the receiver. The corresponding relation between other original senders and receivers is not influenced. When the receiver corresponding to the original sender of the message recovers to receive the message, the receiver can recover to receive the message of the corresponding original sender.
Compared with the prior art, the message can be always correctly received under the condition that the distributed device cluster is adopted to receive the message, and the problem of wrong judgment processing caused by random message distribution can be avoided as much as possible. While at the same time being able to serve the purpose of increasing the flexibility of extending or adjusting the cluster of devices that receive messages in a distributed manner. The effect of improving the availability of the system and the service is achieved.
The distributed equipment cluster system provided by the application can ensure that the state management node can receive the heartbeat message of the node equipment in the distributed equipment cluster as far as possible without causing wrong judgment and processing, and plays a role in conveniently adjusting the number of the equipment receiving the heartbeat message. The effect of improving the availability of the system and the service is achieved.
Drawings
Fig. 1 is a flowchart illustrating a method for sending a message according to a first embodiment of the present application;
fig. 2 is a block diagram of a message sending apparatus according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a distributed device cluster system according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a distributed device cluster system according to a fourth embodiment of the present application;
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
A flowchart of a method for sending a message according to a first embodiment of the present application is shown in fig. 1, and the embodiment includes the following steps:
step S101, obtaining a message to be sent.
In existing computer networks, devices are interconnected via a communication network, and devices within the network exchange messages with other devices by sending and receiving messages.
The various messages can be classified into unordered messages and ordered messages according to their temporal characteristics.
The unordered message refers to a message which is not related to a time sequence and is insensitive, a final receiver of the message only needs to perform corresponding processing according to content information carried in the message without considering the time and the sequence of receiving the message, for example, the alarm message is an unordered message, the alarm message is formed when a condition for generating an alarm is met, and the final receiver of the alarm message only needs to analyze and process the alarm information carried in the alarm message without analyzing the time and the sequence of the received alarm message.
The ordered message refers to a message which is related to a time sequence and sensitive to the time sequence, when a final receiver of the message receives the message, the final receiver of the message not only needs to analyze information carried by message content, but also needs to analyze a time relation between the received message and a message of the same type sent by the same original sender at the previous time, and carries out corresponding processing according to the time relation. For example, heartbeat messages in a network are typically ordered messages.
For computer devices in a computer network, a manager of a network system needs to know the status of each device and the service application on the device in real time, including whether the device is running, whether the service application is running, and the like. In order to collect the information conveniently, a state management server is arranged in the network, each device in the network periodically sends a message to the state management server at regular time, the message carries the state information of each device and the service application running on the device, and the periodic timing message carrying the state information of the device and the service application on the device is a heartbeat message.
In general, as a final receiver of a heartbeat message, a state management server first analyzes a relationship between a time of a heartbeat message last sent by an original sender of the received heartbeat message and a time of the heartbeat message received this time, and performs corresponding processing:
for receiving the heartbeat message of a certain node device for the first time, the state management server marks the node device as a new on-line node, marks the node and the service application carried by the heartbeat message sent by the node device as a normal operation state, and records the time of receiving the message.
For the heartbeat messages of the node equipment which has sent the heartbeat messages before, and the time interval between the received heartbeat message and the received heartbeat message of the node equipment before is within the set time interval range, the state management server considers that the node equipment and the service application state carried by the node equipment are in a normal operation state, records the time of receiving the heartbeat messages at the current time, and is used when the heartbeat messages of the node equipment are received at the next time.
For the heartbeat messages of the node equipment which has sent the heartbeat messages before, and the time interval between the received heartbeat message and the received heartbeat message is within the set time interval range, the service application which is carried by the node equipment for the previous time but not carried by the node equipment for the current time is considered to be out of service, and the state of the service application is marked as a non-running state. According to different system settings, the running state of the service application directly carried in the heartbeat message, such as normal running or non-running state, can also be set, so that the state management server can directly update the corresponding database without further judgment.
And for the condition that the heartbeat message of the node equipment is not received within a set time interval, the node equipment is considered to be out of service, and the state of the node equipment is marked as a non-running state. The service application running on the state management server is necessarily pushed out of the service, and the state management server marks the state of the service application as a non-running state.
The present application is preferably used for sending ordered messages. The present embodiment takes the heartbeat message as an example to perform corresponding description.
For sending the message, the following methods are generally included to obtain the message to be sent:
firstly, corresponding application programs on devices in a network organize information to be exchanged or transmitted together to form a message to be transmitted, the message to be transmitted can be obtained from the application programs, corresponding routing information such as a destination address is added to the message to be transmitted, and the message to be transmitted is transmitted to the destination address.
And secondly, the network equipment receives messages sent by other equipment, takes the received messages as messages to be sent, and sends the messages to be sent to corresponding destination addresses after necessary analysis processing is carried out on the messages to be sent. This includes both the case where the forwarding device receives a re-forwarded message and the case where it is the recipient of the message, but the received message needs to be forwarded to other message recipients due to different division of labor.
Taking a heartbeat message as an example, as a producer of the heartbeat message, when a corresponding application program of the node device collects the running state of the heartbeat message producing node and the running state information of the service application thereon, the heartbeat message is formed, and the heartbeat message includes the state of the heartbeat message producing node and the running state of the service application running thereon. After generating the heartbeat message, the heartbeat message generation node serves as an original sender of the heartbeat message to send the generated heartbeat message to a corresponding state management server, and the heartbeat message to be sent can be obtained from a corresponding application program on a node device (namely the original sender of the heartbeat message) generating the heartbeat message. For example, the heartbeat message includes the contents shown in table 1 below:
original sender/node ID | Business application ID | Business application ID | Business application ID |
192.168.0.10 | 1 | 2 | 3 |
TABLE 1
Wherein, the identification of the original sender of the heartbeat message (the generation node device of the heartbeat message) is its IP address: 192.168.0.10, the service application information carried by the original sender of the heartbeat message is the service applications with the service application identifications 1, 2 and 3, which indicates that the original sender of the heartbeat message is in a normal operation state, and the service application 1, the service application 2 and the service application 3 which are operated on the heartbeat message are in a normal operation state.
In addition to the producer of the heartbeat message, the heartbeat message can also be obtained on a forwarding device of the heartbeat message. For a large distributed cluster, when a single state management server is not enough to be responsible for the task of managing the states of all nodes in a distributed system, the states of distributed cluster management nodes and service applications may be adopted, and a plurality of state management servers form a distributed state management server cluster. The heartbeat message can also be obtained on the load balancing device for forwarding the heartbeat message, and the obtained heartbeat message is the message to be sent for the load balancing device for forwarding the heartbeat message.
Similarly, when the load balancing device is used to forward the heartbeat message to the distributed state management server cluster, any one state management server of the distributed state management server cluster can obtain the heartbeat message sent by the original sender of different heartbeat messages from the load balancing device. However, for ordered messages such as heartbeat messages, the final receiver needs to analyze the condition of the heartbeat message sent by the original sender last time, so that the final receiver of the heartbeat message needs to be fixed relative to the original sender. I.e. to try to make the heartbeat message sent by the same original sender within a certain time period receivable by the same final receiver. This requires that the status management server as the receiver not only receive the heartbeat message, but also forward the heartbeat message to other corresponding status management servers as needed. I.e. the heartbeat message it receives can also be considered as the heartbeat message it sends.
The message sending method provided by the application can be used for sending the heartbeat message to the state management server by each node generating the heartbeat message in the distributed cluster system, can also be used for forwarding the heartbeat message to other state management servers after the state management server in the distributed state management server cluster system receives the heartbeat message, and can also be used for forwarding the message by the message forwarding device.
Step S102, a list of available recipients is obtained.
In order to send a message to a corresponding recipient, the address of the recipient to which the transmission corresponds must be determined. The present embodiment utilizes a list of available recipients to determine the current recipient according to an algorithm that maintains consistency of the recipient's relationship with the original sender. It is necessary to obtain a list of available recipients. The recipients in the list of available recipients are considered to be recipients that are currently operating normally and are able to receive messages. Recipients known to have exited the service that are unable to receive messages are not included in the list of available recipients.
The present embodiment provides the following methods for obtaining the available recipient list:
a list of available recipients is obtained from a corresponding database. When there are more than one available receivers, especially more, the status of these receivers must be known at any time from the perspective of system management, and the system can be managed and maintained by constantly updating the operating status of these available receivers in the corresponding databases. For the receiver who needs to quit the service for various reasons and can not receive the corresponding message, the system marks the receiver as unavailable, and for the receiver with recovered receiving function, the system marks the receiver with updated state in the database, thereby facilitating any equipment in the system to inquire the available receiver information at any time. This step can then obtain a list of available recipients from the corresponding database. The list contains information of all the receivers available in the current year, such as the identification of the receivers and the like.
For the sender of the message, the sender can also maintain an available receiver list, and the receiver list is stored on a local storage medium, so that the sender can inquire at any time and can obtain the inquired result faster than the inquiry result from a database in the network every time, and the network resources are saved.
To preserve the accuracy of the stored available recipient status, the present application preferably employs periodically retrieving a list of available recipients from the respective database at regular intervals and updating the local available recipient list with the retrieved list of available recipients. Therefore, the inquiry from the database is not needed when the corresponding message is sent every time, the time and the network resource are saved, and the accuracy of the available receiver list can be ensured to a certain extent.
The list of available recipients includes an identification of the recipient for uniquely identifying the corresponding recipient within the network. The identifier of the receiver may be its name or an address in the network, or may be its unique number in the network. These are all able to uniquely identify a recipient across the entire network.
For a heartbeat message to be sent, the receiver is a state management server in the network. In the process of sending the heartbeat message from the beginning to the receiving of the final target state management server, whether the heartbeat message is the original sender of the heartbeat message, or the forwarding device, or the state management server, the available receiver list can be obtained by adopting any one of the above modes. For example, the list of available recipients is obtained from the corresponding database at regular time intervals, and the locally stored list of available recipients is updated with the list, and when the list of available recipients is obtained from the corresponding database at regular time intervals, the relationship between the regular time intervals and the time intervals of the heartbeat messages should be coordinated so as not to waste network resources or excessively burden devices.
The available receivers of the heartbeat message are the available state management servers in the distributed state management server cluster, the identification of the state management server usually adopts the host name or IP address of the server, for example, the list of available state management servers obtained in this embodiment is shown in table 2 below:
available state management server |
192.168.0.1 |
192.168.0.2 |
192.168.0.3 |
192.168.0.4 |
TABLE 2
The information in table 2 indicates that the current states of the state management server with the IP address of 192.168.0.1, the state management server with the IP address of 192.168.0.2, the state management server with the IP address of 192.168.0.3, and the state management server with the IP address of 192.168.0.4 are normal operation states, and can receive the heartbeat message.
Step S103, determining a receiver address of the message to be sent from the available receiver list according to an algorithm for maintaining consistency between the receiver and the original sender.
For ordered messages like heartbeat messages, if heartbeat messages of the same original sender are randomly sent to different receivers, it will lead to frequent and even chaotic changes in the management of the system on the state of the original sender and the business applications running on it. Consistency of the recipient's relationship with the original sender should be maintained. Namely:
when the receiver state is stable, the ordered message of the same original sender is sent to the same receiver, and the message of the same original sender is prevented from being sent to different receivers randomly.
And when the receiver corresponding to the original sender cannot receive the ordered message for various reasons, the message of the original sender is sent to other receivers. While the receiver that is to remain operating normally still receives the original sender's message to which it corresponds.
And when the receiver corresponding to the original sender resumes receiving the ordered messages, the receiver which resumes receiving the ordered messages and sends the ordered messages sent by the original sender to the receiver which resumes receiving the ordered messages.
When a new receiver joins the service, only a small number of messages of the original sender are adjusted to the newly joined receiver, and the receivers corresponding to most of the original senders are kept unchanged.
This is to maintain consistency of the relationship of the receiver to the original sender.
After the available receiver list is obtained, the receiver address corresponding to the message to be sent may be determined from the available receiver list in the following manner under the condition that the consistency is maintained:
and determining a receiver address corresponding to the message to be sent by using the identifier of the available receiver in the available receiver list and the identifier of the original sender of the message to be sent and adopting a consistent hash algorithm.
The consistent hash algorithm can well satisfy the requirement of keeping the consistency of the relationship between the receiver and the original sender, and the specific implementation of the consistent hash algorithm may have different ways or methods, and this embodiment only briefly describes the process of one of the methods:
respectively adopting the same hash algorithm (such as MD5), calculating to obtain a hash value corresponding to the identifier of each available receiver included in the available receiver list and a hash value corresponding to the identifier of the original sender of the message to be sent. And determining the receiver according to the relation between the hash value corresponding to the original sender identifier of the message to be sent and the hash value corresponding to the identifier of the available receiver.
For example, the hash value corresponding to the identifier of the available receiver and the hash value corresponding to the identifier of the original sender of the message to be sent are arranged on a ring according to size (this ring is called a hash ring), the available receiver corresponding to the hash value corresponding to the identifier of the available receiver closest to the identifier of the original sender of the message to be sent in a certain direction (for example, clockwise or counterclockwise direction) on the hash ring is taken as the current receiver corresponding to the message to be sent, and the address of the receiver is taken as the receiver address corresponding to the message to be sent.
For the case that the obtained message to be sent is the heartbeat message shown in table 1 in step S101, and the obtained available receiver list is the available receiver list shown in table 2 in step S102, that is, the original sender of the message to be sent is a node device with an IP address of 192.168.0.10, and the available receivers are a status management server with an IP address of 192.168.0.1, a status management server with an IP address of 192.168.0.2, a status management server with an IP address of 192.168.0.3, and a status management server with an IP address of 192.168.0.4, respectively.
Respectively performing the same hash operation (for example, MD5 algorithm) on the IP addresses of the original sender and the available receiver of the heartbeat message to be sent, to respectively obtain a hash value corresponding to the original sender of the heartbeat message to be sent (node device with an IP address of 192.168.0.10): 446d0be655ecd2fc9922965af3bd984f and the hash values for the respective available recipients:
state management server 192.168.0.1: f0fdb4c3f58e3e3f8e77162d893d3055,
state management server 192.168.0.2: 6f65e91667cf98dd13464deaf2739fde,
state management server 192.168.0.3: 8c27f6b5dc0e9e5a536aa0371648fb4a,
state management server 192.168.0.4: 0252f5158dc3a9531907fb42c00a 4138.
When the hash value corresponding to the IP address of the original sender of the heartbeat message to be sent with the IP address of 192.168.0.10 is between the hash value corresponding to the state management server with the IP address of 192.168.0.4 and the hash value corresponding to the state management server with the IP address of 192.168.0.2, and the hash value corresponding to the IP address of the state management server and the hash value corresponding to the IP address of the original sender of the heartbeat message to be sent are mapped on a circle from small to large clockwise, and the receiver is determined according to a rule that the hash value corresponding to the IP address of the available state management server closest to the IP address of the original sender of the heartbeat message to be sent is searched on a circle from the hash value corresponding to the IP address of the original sender of the heartbeat message to be sent, the receiver corresponding to the message to be sent is the state management server with the IP address of 192.168.0.2 shown in table 1.
The address of the status management server with the IP address of 192.168.0.2, i.e. the IP address of 192.168.0.2, is used as the receiver address of the heartbeat message to be sent as shown in table 1.
After the address of the receiver of the heartbeat message to be sent is determined, a bystander message can be sent to the address of the receiver corresponding to the original sender of the message to be sent, which is locally stored, according to the relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, which is locally stored.
In order to avoid that a receiver which originally receives a message mistakenly assumes that an original sender quits service because the message of the original sender is sent to a receiver which recovers service and does not receive the message of the original sender any more after the receiver which quits service recovers service, after the address of a state management server corresponding to the heartbeat message to be sent is determined, before the address of the receiver corresponding to the original sender of the message to be sent which is stored locally is updated, a disclaimer message is sent to the receiver corresponding to the original sender of the message to be sent which is stored locally, so that the receiver can not expect the subsequent message of the original sender any more.
After determining the status management server address corresponding to the message to be sent, the method may send a bystander message to a receiver that receives the message during the period when the receiver that recovers the service exits the service according to a relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, which is locally stored.
Specifically, it may be determined whether a receiver address corresponding to an original sender of the message to be sent, which is locally stored, is the same as an address of a receiver determined according to an algorithm for maintaining consistency of a relationship between the receiver and the original sender, to send the bystander message: when the address of the receiver corresponding to the original sender of the message to be sent stored locally is different from the address of the receiver determined according to the algorithm for keeping the consistency of the relation between the receiver and the original sender, it is indicated that the receiver of the previous message of the original sender of the message to be sent is different from the current receiver, and at this time, a disclaimer message can be sent to the previous receiver, namely, the receiver corresponding to the original sender of the message to be sent stored locally.
Or when the address of the receiver corresponding to the original sender of the message to be sent stored locally is different from the address of the receiver determined according to the algorithm for keeping the consistency of the relationship between the receiver and the original sender, further determining whether the available receiver list includes the receiver corresponding to the original sender of the message to be sent stored locally, and when the available receiver list includes the receiver corresponding to the original sender of the message to be sent stored locally, indicating that the receiver which has quit the service before recovers the service, at this time, sending a bystander message to the address of the receiver corresponding to the original sender of the message to be sent stored locally. Therefore, the message can be more accurately sent to the still effective receiver, the message is prevented from being sent to the receiver which quits the service, and resources are saved.
For example, for the heartbeat message in table 1, according to an algorithm for maintaining consistency of relationship between the receiver and the original sender, it is determined that the receiver is the status management server with the IP address of 192.168.0.2, and when the status management server with the IP address of 192.168.0.2 exits from service for some reason and can no longer receive the heartbeat message, the status management server with the IP address of 192.168.0.2 will not be included in the available receiver list. At this time, according to an algorithm for maintaining consistency between the receiver and the original sender, the hash value corresponding to the IP address (192.168.0.10) of the original sender of the heartbeat message to be sent is between the hash value corresponding to the state management server with the IP address of 192.168.0.4 and the hash value corresponding to the state management server with the IP address of 192.168.0.3, and according to the consistent hash algorithm, it can be determined that the state management server with the IP address of 192.168.0.3 will become the receiver of the heartbeat message to be sent as shown in table 1.
After the status management server with the IP address of 192.168.0.2 recovers the service, the available receiver list will again include the status management server with the IP address of 192.168.0.2, and then the receiver of the heartbeat message to be sent shown in table 1 will be determined as the status management server with the IP address of 192.168.0.2 again according to the consistent hash algorithm.
At this time, it is necessary to send an announcement message to the status management server with the IP address of 192.168.0.3 that receives the heartbeat message of the node device with the IP address of 192.168.0.10 during the time when the status management server with the IP address of 192.168.0.2 exits the server, and notify that the "heartbeat message of the node device with the IP address of 192.168.0.10 will be sent to the other status management server", so as to prevent the status management server with the IP address of 192.168.0.3 from marking its status as a non-operating status because it cannot receive the subsequent heartbeat message of the node device with the IP address of 192.168.0.10.
Specifically, whether the receiver address corresponding to the node device with the locally stored IP address of 192.168.0.10 is the same as the receiver address determined according to the consistent hash algorithm is judged, and if not, an farewell message is sent to the receiver address corresponding to the node device with the locally stored IP address of 192.168.0.10. When the state management server with the IP address of 192.168.0.2 exits the service, the address of the receiver corresponding to the node device with the IP address of 192.168.0.10 stored locally is updated to the IP address of 192.168.0.3 of the state management server with the IP address of 192.168.0.3. When the state management server with the IP address of 192.168.0.2 recovers the service, the receiver determined according to the consistent hash algorithm recovers to the state management server with the IP address of 192.168.0.2, and then a bye message needs to be sent to the IP address of 192.168.0.3 of the state management server with the IP address of 192.168.0.3.
Or further judging whether the available receiver list contains the address of the locally stored 192.168.0.3 state management server, and if so, sending an announcement message to the available receiver list.
After the address of the state management server corresponding to the heartbeat message to be sent is determined, in addition to determining to send a bystander message according to actual conditions, the receiver corresponding to the original sender of the message to be sent, which is locally stored, needs to be updated according to the relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, which is determined according to the algorithm for keeping the consistency of the relationship between the receiver and the original sender.
In order to determine whether a bystander message needs to be sent to a receiver that receives a message sent by an original sender of the message to be sent during a period in which a receiver that has recovered service exits service, it is locally necessary to retain receiver information up to the original sender that can currently receive the message to be sent.
And when the address of the receiver corresponding to the original sender of the locally stored heartbeat message to be sent is different from the address of the receiver determined according to the algorithm for keeping the consistency of the relation between the receiver and the original sender, updating the address of the receiver corresponding to the original sender of the locally stored heartbeat message to be sent by using the address of the receiver determined according to the algorithm for keeping the consistency of the relation between the receiver and the original sender.
For the situation that the bystander message needs to be sent, the receiver address corresponding to the original sender of the heartbeat message to be sent, which is stored locally, should be updated after the bystander message is sent. To avoid sending the bystander message to the wrong recipient.
In the heartbeat message shown in table 1, if the receiver address corresponding to the node device having the IP address of 192.168.0.10 stored locally is the IP address of 192.168.0.3 of the state management server having the IP address of 192.168.0.3, and the receiver address determined by the consistent hash algorithm is the IP address of 192.168.0.2 of the state management server having the IP address of 192.168.0.2, after the byttefect message is sent to the IP address of 192.168.0.3 of the state management server having the IP address of 192.168.0.3, the receiver address corresponding to the node device having the IP address of 192.168.0.10 stored locally is updated to the IP address of 192.168.0.2 of the state management server having the IP address of 192.168.0.2.
Step S104, sending the message to be sent to the receiver address of the message to be sent.
And after determining a receiver address corresponding to a message to be sent, taking the receiver address corresponding to the message to be sent as a destination address of the message to be sent, and sending the message to be sent.
For a producer of a heartbeat message, after the heartbeat message is produced and the address of the current recipient of the heartbeat message (namely, a state management server) is determined, the address of the recipient of the heartbeat message (namely, the state management server) is taken as the destination address of the heartbeat message, and the heartbeat message is sent to the state management server.
For a forwarding device of a heartbeat message, such as a load balancing device for forwarding the heartbeat message to a distributed state management server cluster, after receiving the heartbeat message sent by a producer of the heartbeat message and determining an address of a receiver (i.e., a state management server) of the heartbeat message, the address of the receiver (i.e., the state management server) of the heartbeat message is taken as a destination address of the heartbeat message, and the heartbeat message is sent to the state management server.
For a state management server in a distributed state management server cluster, after receiving a heartbeat message sent by a producer of the heartbeat message or a forwarding device of the heartbeat message and determining an address of a receiver (namely, the state management server) of the heartbeat message to be sent, taking the address of the receiver (namely, the state management server) of the heartbeat message this time as a destination address of the heartbeat message, and forwarding the heartbeat message to the state management server.
For example, whether the node device (original sender of the heartbeat message) generating the heartbeat message shown in table 1, the forwarding device, or the status management server receiving the heartbeat message, when determining that the IP address of the status management server with the receiver address of 192.168.0.2 is 192.168.0.2, the heartbeat message shown in table 1 is sent to 192.168.0.2.
The above is an embodiment of a method for sending a message according to the present application, where, when a distributed device cluster is used to receive a message, the message can always be correctly received, and a problem of erroneous determination processing caused by randomly distributing the message can be avoided as much as possible. While at the same time being able to serve the purpose of increasing the flexibility of extending or adjusting the cluster of devices that receive messages in a distributed manner. The effect of improving the availability of the system and the service is achieved.
The message sending method provided by the application can be preferably used for sending the heartbeat message to the state management server by each heartbeat message generation node in the distributed cluster system; the method can also be used for forwarding the heartbeat message to other state management servers after the state management servers in the distributed state management server cluster system receive the heartbeat message; and the method can also be used for forwarding the heartbeat message by the heartbeat message forwarding node in the distributed cluster system. Under the condition that the distributed state management server cluster is adopted to receive the heartbeat messages, the problem of wrong judgment processing of the state management server caused by random distribution of the heartbeat messages can be avoided as much as possible. And at the same time, the method can play a role in increasing the flexibility of expanding or adjusting the distributed state server cluster. The effect of improving the availability of the service system is achieved.
Accordingly, a second embodiment of the present application provides an apparatus for sending a message, whose structural block diagram is shown in fig. 2, and the apparatus includes the following units: a message acquisition unit U201, an available recipient acquisition unit U202, a recipient address determination unit U203, and a transmission unit U204.
The message acquiring unit U201 is configured to acquire a message to be sent;
the available receiver acquiring unit U202 is configured to acquire an available receiver list;
the receiver address determining unit U203 is configured to determine a receiver address of the message to be sent from the available receiver list according to an algorithm for maintaining consistency of a relationship between a receiver and an original sender;
the sending unit U204 is configured to send the message to be sent to the receiver address of the message to be sent.
A third embodiment of the present application provides a distributed device cluster system, a schematic structural diagram of which is shown in fig. 3, and the distributed device cluster system includes heartbeat message generation nodes N301, N302, N303, and N304 and state management nodes N305, N306, N307, and N308, where the heartbeat message generation nodes and the state management nodes are connected to each other through a network. Each node device may be a computer.
The heartbeat message sending devices provided by the present application are deployed on the respective heartbeat message generating nodes N301, N302, N303 and N304, and are configured to send the heartbeat messages generated by the heartbeat message sending devices to corresponding state management nodes.
In addition to the manner in which the message sending device provided by the present application may be disposed on each of the heartbeat message generation nodes N301, N302, N303, and N304, the message sending device provided by the present application may also be disposed on the state management nodes N305, N306, N307, and N308 instead of on each of the heartbeat message generation nodes N301, N302, N303, and N304.
In this case, the state management nodes N305, N306, N307, and N308 are connected to each other through a network, the heartbeat generating nodes N301, N302, N303, and N304 may randomly send a heartbeat message to any state management node, and a message sending device provided in this application and disposed on a state management node that receives a heartbeat message is configured to forward the heartbeat message to a corresponding state management node.
For the corresponding description, reference may be made to the description related to the first embodiment of the present application, and for details of the apparatus, reference may be made to the corresponding description related to the second embodiment of the present application, which is not repeated herein.
A fourth embodiment of the present application provides a distributed device cluster system, a schematic structural diagram of which is shown in fig. 4, and includes heartbeat message generation nodes N301, N302, N303, and N304; state management nodes N305, N306, N307, and N308, and heartbeat message forwarding nodes N309 and N310; and each heartbeat message generation node is connected with each heartbeat message forwarding node through a network, and each heartbeat message forwarding node is connected with each state management node through a network. Each node device may be a computer.
The heartbeat message sending devices provided by the present application are deployed on the respective heartbeat message generating nodes N301, N302, N303 and N304, and are configured to send the generated heartbeat messages to corresponding state management nodes through the heartbeat message forwarding nodes N309 and N310.
Except for the manner that the device for sending messages provided by the present application can be deployed on each of the heartbeat message generating nodes N301, N302, N303, and N304, the device for sending messages provided by the present application can also be deployed on the heartbeat message forwarding nodes N309 and N310, and when the heartbeat message forwarding nodes receive the heartbeat messages sent by each of the heartbeat message generating nodes N301, N302, N303, and N304, the device forwards the heartbeat messages to the corresponding state management nodes.
In addition to the two ways that the message sending device provided by the present application may be deployed on the respective heartbeat message generating nodes N301, N302, N303, and N304 or the heartbeat message forwarding nodes N309 and N310, the message sending device provided by the present application may also be deployed on the state management nodes N305, N306, N307, and N308 instead of the respective heartbeat message generating nodes N301, N302, N303, and N304.
In this case, the state management nodes N305, N306, N307, and N308 are connected to each other through a network, the heartbeat messages generated by the respective heartbeat generating nodes N301, N302, N303, and N304 may be randomly sent to any state management node by the heartbeat message forwarding nodes N309 and N310, and a message sending device provided in this application and disposed on the state management node that receives the heartbeat message is configured to forward the heartbeat message to the corresponding state management node.
For the corresponding description, reference may be made to the description related to the first embodiment of the present application, and for details of the apparatus, reference may be made to the corresponding description related to the second embodiment of the present application, which is not repeated herein.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Claims (28)
1. A method of transmitting a message, comprising the steps of:
acquiring a message to be sent;
acquiring an available receiver list;
determining a receiver address of the message to be sent from the available receiver list according to an algorithm for keeping consistency of the relation between the receiver and the original sender;
and sending the message to be sent to the address of the receiver of the message to be sent.
2. The method of claim 1, wherein the determining the current recipient address of the message to be sent from the list of available recipients according to an algorithm that maintains consistency of recipient to original sender relationship comprises:
and determining the receiver address of the message to be sent by using the identification of the available receiver in the available receiver list and the identification of the original sender of the message to be sent and adopting a consistent hash algorithm.
3. The method of sending messages according to claim 1, wherein the messages comprise ordered messages.
4. The method of claim 1, wherein the identification of the recipient comprises a name or address of the recipient.
5. The method of claim 1, wherein the identification of the original sender comprises a name or address of the original sender.
6. The method of claim 1, wherein obtaining the list of available recipients comprises:
a list of available recipients is obtained from a database.
7. The method of claim 1, wherein obtaining the list of available recipients comprises:
the list of available recipients is obtained locally.
8. The method of claim 7, wherein said step of locally obtaining said list of available recipients further comprises the steps of obtaining and storing a list of available recipients, comprising:
obtaining the list of available recipients from a database at regular time intervals;
storing the list of available recipients locally.
9. The method of claim 1, wherein said step of determining a recipient address of said message to be sent from said list of available recipients according to an algorithm that maintains consistency of recipient to original sender relationship further comprises the step of sending a farewell message, said step of determining said recipient address of said message to be sent comprising:
and sending a bystander message to the address of the receiver corresponding to the original sender of the message to be sent, which is locally stored, according to the relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, wherein the address of the receiver corresponds to the original sender of the message to be sent, which is locally stored.
10. The method according to claim 9, wherein the sending a byttee message to an address of a receiver corresponding to an original sender of the message to be sent, according to a relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, which is locally stored, comprises:
and when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent, sending a bystander message to the address of the receiver corresponding to the original sender of the locally stored message to be sent.
11. The method according to claim 9, wherein the sending a byttee message to an address of a receiver corresponding to an original sender of the message to be sent, according to a relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, which is locally stored, comprises:
and when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent and the available receiver list comprises the receiver corresponding to the original sender of the locally stored message to be sent, sending a bystander message to the address of the receiver corresponding to the original sender of the locally stored message to be sent.
12. The method according to claim 9, wherein the step of sending the farewell message to the address of the receiver corresponding to the original sender of the message to be sent, which is stored locally, further comprises the following steps:
and updating the locally stored receiver corresponding to the original sender of the message to be sent according to the locally stored relation between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent.
13. The method according to claim 12, wherein the updating the locally stored receiver corresponding to the original sender of the message to be sent according to the relationship between the locally stored receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent comprises:
and when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent, updating the receiver corresponding to the original sender of the locally stored message to be sent by using the receiver of the message to be sent.
14. The method according to any of claims 1 to 13, used in a distributed cluster system where each heartbeat message generating node sends heartbeat messages.
15. The method according to any of claims 1 to 13, wherein a state management server used in the distributed cluster of state management servers forwards the heartbeat message to other corresponding state management servers after receiving the heartbeat message.
16. The method of any one of claims 1 to 13, used by a heartbeat message forwarding node in a distributed cluster system to forward the heartbeat message.
17. An apparatus for sending a message, comprising:
a message obtaining unit, configured to obtain a message to be sent;
an available recipient acquiring unit for acquiring an available recipient list;
a receiver address determining unit, configured to determine a receiver address of the message to be sent from the available receiver list according to an algorithm that maintains consistency of a relationship between a receiver and an original sender;
and the sending unit is used for sending the message to be sent to the receiver address of the message to be sent.
18. The apparatus for sending a message according to claim 17, wherein the receiver address determining unit is specifically configured to determine the receiver address of the message to be sent by using a consistent hashing algorithm according to an identifier of an available receiver in the available receiver list and an identifier of an original sender of the message to be sent.
19. The message sending apparatus according to claim 17, wherein the available recipient obtaining unit is specifically configured to obtain the available recipient list from a database.
20. The apparatus for sending a message according to claim 17, wherein the available recipient obtaining unit is specifically configured to obtain the available recipient list locally.
21. The apparatus for sending a message according to claim 20, further comprising:
a recipient list periodic acquisition subunit configured to acquire the available recipient list from the database at fixed time intervals;
a recipient list storing subunit, configured to store the available recipient list locally.
22. The apparatus for sending a message according to claim 17, further comprising:
and the bystander message sending subunit is used for sending the bystander message to the address of the receiver corresponding to the original sender of the message to be sent, which is locally stored, according to the relationship between the receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent, wherein the receiver is locally stored.
23. The apparatus for sending a message according to claim 22, wherein the farewell message sending subunit is specifically configured to send the farewell message to an address of a receiver corresponding to an original sender of the locally stored message to be sent, when the receiver corresponding to the original sender of the locally stored message to be sent is different from the receiver of the message to be sent.
24. The device according to claim 22, wherein the farewell message sending subunit is specifically configured to send the farewell message to an address of a receiver corresponding to the original sender of the locally stored message to be sent, when a receiver corresponding to the original sender of the locally stored message to be sent is different from a receiver of the message to be sent, and the available receiver list includes a receiver corresponding to the original sender of the locally stored message to be sent.
25. The apparatus for sending a message according to claim 22, further comprising:
and the local updating subunit is configured to update the locally stored receiver corresponding to the original sender of the message to be sent according to a relationship between the locally stored receiver corresponding to the original sender of the message to be sent and the receiver of the message to be sent.
26. The apparatus for sending a message according to claim 25, wherein the local updating subunit is configured to update, when the locally stored receiver corresponding to the original sender of the message to be sent is different from the receiver of the message to be sent, the locally stored receiver corresponding to the original sender of the message to be sent by using the receiver of the message to be sent.
27. A distributed equipment cluster system comprises more than one heartbeat message generating node and more than one state management node, wherein each heartbeat message generating node is connected with each state management node through a network, the heartbeat message generating node generates and sends heartbeat messages to the corresponding state management nodes, and the state management nodes analyze and process the corresponding heartbeat messages,
the message sending device of any one of claims 17 to 26 is disposed on each heartbeat message generation node, and is used for sending the heartbeat message generated by each heartbeat message generation node to the corresponding state management node;
or the status management nodes are connected to each other through a network, and the message sending device of any one of claims 17 to 26 is deployed on each status management node, and is configured to forward the received heartbeat message sent by the heartbeat message generating node to the corresponding status management node.
28. A distributed equipment cluster system comprises more than one heartbeat message generating node, a heartbeat message forwarding node and more than one state management node, wherein the heartbeat message generating node is connected with the state management node through a network, the heartbeat message generating node generates and sends heartbeat messages to the heartbeat message forwarding node, the heartbeat message forwarding node receives and forwards the heartbeat messages to the corresponding state management node, and the state management node analyzes and processes the corresponding heartbeat messages, and is characterized in that:
the message sending device of any one of claims 17 to 26 is disposed on each heartbeat message generation node, and is used for sending the generated heartbeat message to the corresponding state management node through the heartbeat message forwarding node;
or the heartbeat message forwarding node is provided with the message sending device of any one of claim 17 to claim 26, and is used for forwarding the heartbeat message sent by the heartbeat message generating node to the corresponding state management node;
or the state management nodes are connected to each other through a network, and the message sending device of any one of claims 17 to 26 is deployed on each state management node, and is configured to forward the received heartbeat message sent by the heartbeat message generating node to the corresponding state management node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
HK18107498.2A HK1248415B (en) | 2018-06-08 | Method and device for sending messages and distributed device cluster system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
HK18107498.2A HK1248415B (en) | 2018-06-08 | Method and device for sending messages and distributed device cluster system |
Publications (2)
Publication Number | Publication Date |
---|---|
HK1248415A1 true HK1248415A1 (en) | 2018-10-12 |
HK1248415B HK1248415B (en) | 2021-06-18 |
Family
ID=
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9143422B2 (en) | Determining network node performance data based on location and proximity of nodes | |
TWI282228B (en) | Method and apparatus for autonomic failover | |
US7539150B2 (en) | Node discovery and communications in a network | |
CN111966289B (en) | Partition optimization method and system based on Kafka cluster | |
CN106850710A (en) | A kind of safe data cloud storage system, client terminal, storage server and application process | |
WO2012072344A1 (en) | Endpoint-to-endpoint communications status monitoring | |
CN103117901A (en) | Distributed heartbeat detection method, device and system | |
CN110545197B (en) | Node state monitoring method and device | |
US10715608B2 (en) | Automatic server cluster discovery | |
US10802896B2 (en) | Rest gateway for messaging | |
US20090182825A1 (en) | Method and system for providing source information of data being published | |
US20200329118A1 (en) | Data transmission scheduling method and system | |
CN110740064A (en) | Distributed cluster node fault processing method, device, equipment and storage medium | |
US20240020297A1 (en) | Metrics and events infrastructure | |
US8977595B1 (en) | Message-recovery file log locating and monitoring | |
US10812390B2 (en) | Intelligent load shedding of traffic based on current load state of target capacity | |
CN107493308B (en) | Method and device for sending message and distributed equipment cluster system | |
CN108509296B (en) | Method and system for processing equipment fault | |
CN116095180B (en) | A routing method, device and storage medium for log backhaul | |
HK1248415A1 (en) | Method and device for sending messages and distributed device cluster system | |
US11190432B2 (en) | Method and first node for managing transmission of probe messages | |
KR20140125223A (en) | Method for collecting information with management interface in contents network based on information centric networking, content network management system, and node apparatus | |
JP6816511B2 (en) | Session management program, session management method, information processing device, and information processing system | |
KR20240077270A (en) | Integrated monitoring system and method for multi-cluster | |
US10873514B2 (en) | Neighbor monitoring in a hyperscaled environment |