CN112995254B - Method, equipment, system, device and component for transmitting heartbeat information - Google Patents

Method, equipment, system, device and component for transmitting heartbeat information Download PDF

Info

Publication number
CN112995254B
CN112995254B CN201911284517.7A CN201911284517A CN112995254B CN 112995254 B CN112995254 B CN 112995254B CN 201911284517 A CN201911284517 A CN 201911284517A CN 112995254 B CN112995254 B CN 112995254B
Authority
CN
China
Prior art keywords
object storage
storage device
target object
state
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911284517.7A
Other languages
Chinese (zh)
Other versions
CN112995254A (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 CN201911284517.7A priority Critical patent/CN112995254B/en
Publication of CN112995254A publication Critical patent/CN112995254A/en
Application granted granted Critical
Publication of CN112995254B publication Critical patent/CN112995254B/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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, equipment, a system, a device and a component for transmitting heartbeat information, wherein the method is applied to a component deployed in a storage node in a distributed storage system, the storage node comprises a plurality of object storage devices, the component is in communication connection with the object storage devices, and the object storage devices are in communication with the object storage devices in other storage nodes in the distributed storage system through the component, and the method comprises the following steps: receiving a first heartbeat message sent by a specified object storage device, wherein the specified object storage device is an object storage device in a storage node where a component is located, and the first heartbeat message comprises: a device identification of the target object storage device; the target object storage device is an object storage device in other storage nodes; determining the state of the target object storage equipment according to the equipment identification of the target object storage equipment; and sending a second heartbeat message to the specified object storage device under the condition that the state of the target object storage device is in the online state.

Description

Method, equipment, system, device and assembly for transmitting heartbeat information
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, device, system, apparatus, and component for transmitting heartbeat information.
Background
At present, with the continuous progress of the informatization process, the amount of various data needing to be stored is continuously increased, and therefore, a distributed storage system (such as a ceph cloud storage cluster) is more and more widely applied. The distributed storage system comprises a plurality of storage nodes and a monitoring node, wherein each storage node comprises a plurality of object storage devices. For each object storage device in each storage node, the object storage device needs to send heartbeat information to each object storage device in the other storage nodes.
When each object storage device in each storage node sends heartbeat information to each object storage device in other storage nodes, a corresponding long TCP connection needs to be established. Thus, for a storage node, if the storage node includes more object storage devices and/or corresponds to a plurality of other storage nodes, a large number of long TCP connections will be established on the storage node.
However, when a large number of TCP long connections are established on the storage node, resource consumption of the distributed storage system is excessive, and the core of the storage node is under excessive pressure, which results in instability of the distributed storage system.
Disclosure of Invention
An object of the present invention is to provide a new technical solution for transmitting heartbeat information.
According to a first aspect of the present invention, there is provided a method for transmitting heartbeat information, which is applied to a component deployed in a storage node in a distributed storage system, where the storage node further includes a plurality of object storage devices, the component is communicatively connected to the plurality of object storage devices, and the plurality of object storage devices communicate with object storage devices in other storage nodes in the distributed storage system through the component, where the method includes:
receiving a first heartbeat message sent by a specified object storage device, wherein the specified object storage device is an object storage device in a storage node where the component is located, and the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the other storage nodes;
determining the state of the target object storage device according to the device identifier of the target object storage device;
and sending a second heartbeat message to the specified object storage device under the condition that the state of the target object storage device is in an online state, wherein the second heartbeat message is heartbeat information constructed by the component simulating the target object storage device.
Optionally, the method further includes: and when the state of the target object storage device is an offline state, not sending the second heartbeat message to the specified object storage device.
Optionally, the determining the state of the target object storage device according to the device identifier of the target object storage device includes:
searching a state list stored in advance for the latest state corresponding to the device identifier which is the same as the device identifier of the target object storage device; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
Optionally, before the determining the state of the target object storage device according to the device identifier of the target object storage device, the method includes:
and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
Optionally, the second heartbeat information includes:
a device identification of the target object storage device, a latest online time of the target object storage device.
Optionally, the second heartbeat message is used to: the specified object storage device judges whether the target object storage device has a fault or not, and reports fault information for indicating that the target object storage device has the fault to a monitoring node of the distributed storage system under the condition that the target object storage device is determined to have the fault; wherein the target object storage device has a fault when a difference between a latest online time of the target object storage device included in the second heartbeat message and a time when the specified object storage device transmits the first heartbeat information is greater than a preset threshold.
Optionally, the method further includes:
and under the condition that the designated object storage equipment does not receive the second heartbeat information within a preset time period, the designated object storage equipment determines that the target object storage equipment has a fault and reports fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system.
According to a second aspect of the present invention, there is provided a storage node comprising: a component, one or more object storage devices; wherein the content of the first and second substances,
the object storage device is used for sending a first heartbeat message to the component; wherein the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in other storage nodes in a distributed system where the storage node is located;
the component is used for determining the state of the target object storage device according to the device identification of the target object storage device after receiving the first heartbeat message; and sending a second heartbeat message to the object storage device under the condition that the state of the target object storage device is in an online state, wherein the second heartbeat message is heartbeat information constructed by the component simulating the target object storage device.
Optionally, the assembly is further configured to:
and under the condition that the state of the target object storage equipment is an off-line state, not sending the second heartbeat message to the object storage equipment.
Optionally, the component is specifically configured to:
searching a state list stored in advance for the latest state corresponding to the device identifier which is the same as the device identifier of the target object storage device; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
Optionally, the component is further configured to:
and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
Optionally, the second heartbeat information includes:
a device identification of the target object storage device, a latest online time of the target object storage device.
Optionally, the object storage device is further configured to:
judging whether the target object storage equipment has a fault or not, and reporting fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system under the condition that the target object storage equipment is determined to have the fault; and when the difference between the latest online time of the target object storage device included in the second heartbeat message and the time when the object storage device sends the first heartbeat information is greater than a preset threshold value, the target object storage device has a fault.
Optionally, the object storage device is further configured to:
and under the condition that the second heartbeat information is not received within a preset time period, the object storage equipment determines that the target object storage equipment has a fault, and reports fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system.
According to a third aspect of the present invention, there is provided a distributed storage system, including a first storage node and a second storage node, wherein a first component is deployed in the first storage node; the first storage node is in communication connection with an object storage device in the first storage node through the first component, and the object storage device in the first storage node is in communication connection with an object storage device in the second storage node through the first component; wherein the content of the first and second substances,
an object storage device in the first storage node to send a first heartbeat message to the first component; wherein the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the second storage node;
the first component is configured to determine, after receiving the first heartbeat message, a state of the target object storage device according to the device identifier of the target object storage device; and sending a second heartbeat message to the object storage device in the first storage node under the condition that the state of the target object storage device is in an online state, wherein the second heartbeat message is the heartbeat information constructed by the first component simulating the target object storage device.
Optionally, the first component is further configured to:
and when the state of the target object storage device is an offline state, not sending the second heartbeat message to the object storage device in the first storage node.
Optionally, the first component is specifically configured to:
searching a state list stored in advance for the latest state corresponding to the equipment identifier which is the same as the equipment identifier of the target object storage equipment; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
Optionally, the first component is further configured to:
and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
Optionally, the second heartbeat information includes:
a device identification of the target object storage device, a latest online time of the target object storage device.
Optionally, the object storage device in the first storage node is further configured to:
judging whether the target object storage equipment has a fault or not, and reporting fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system under the condition that the target object storage equipment is determined to have the fault; wherein, in a case that a difference between a latest online time of the target object storage device included in the second heartbeat message and a time when the object storage device in the first storage node transmits the first heartbeat information is greater than a preset threshold, the target object storage device has a fault.
Optionally, the object storage device in the first storage node is further configured to:
under the condition that the second heartbeat information is not received within a preset time period, the object storage equipment in the first storage node determines that the target object storage equipment has a fault and indicates that the target object is stored
According to a fourth aspect of the present invention, there is provided an apparatus for transmitting heartbeat information, the apparatus comprising:
a receiving module, configured to receive a first heartbeat message sent by a specified object storage device, where the specified object storage device is an object storage device in a storage node where the component is located, and the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the other storage nodes;
the determining module is used for determining the state of the target object storage equipment according to the equipment identification of the target object storage equipment;
a sending module, configured to send a second heartbeat message to the specified object storage device when the state of the target object storage device is an online state, where the second heartbeat message is heartbeat information that the component simulates the structure of the target object storage device.
According to a fifth aspect of the present invention, there is provided a component, deployed in each storage node of a distributed storage system, comprising an apparatus as described in the fourth aspect; alternatively, the first and second liquid crystal display panels may be,
the method comprises the following steps: a processor and a memory;
the memory is for storing executable instructions for controlling the processor to perform the method according to any one of the first aspects.
According to a sixth aspect of the present invention, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the method of any one of the first aspects.
In an embodiment of the invention, a component is communicatively coupled to an object storage device in a storage node in a distributed storage system by deploying the component on the storage node. In this way, the component receives the first heartbeat information sent by the specified object storage device to the target object storage device through the communication connection with the specified object storage device, and then determines the state of the target object storage device according to the device identifier of the target object storage device contained in the first heartbeat information. In the event that the device identification of the target object storage device is online, the component simulates the target object storage device to construct heartbeat information, i.e., generates second heartbeat information, and sends the second heartbeat information to the designated object storage device. The heartbeat interaction between the designated object storage device and the target object storage device in other storage nodes is realized through the deployed components, so that the condition that heartbeat connection needs to be established between the object storage devices among the storage nodes is avoided, namely, the heartbeat connection of the storage nodes is realized by the components in the storage nodes, further, the heartbeat connection number is reduced, the resource consumption of the distributed storage system is reduced, the pressure of the inner cores of the storage nodes where the components are located is reduced, and the stability of the distributed storage system is further improved.
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 storage node in a distributed storage system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a storage node in a distributed storage system according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for transmitting heartbeat information according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a distributed storage system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for transmitting heartbeat information according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an assembly 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 exemplary only and not as 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 >
Fig. 1 is a block diagram of a hardware configuration of a storage node in a distributed storage system according to an embodiment of the present invention.
The storage 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 the like. 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 plurality of devices are shown for each storage node 1000 in fig. 1, the present invention may relate to only some of the devices, for example, the storage node 1000 relates to only the memory 1200 and the processor 1100.
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.
< examples of the methods >
The embodiment of the invention provides a method for transmitting heartbeat information, wherein the method is applied to components deployed in storage nodes in a distributed storage system. That is to say, in the present embodiment, a component is deployed in a storage node in a distributed storage system, and the component is configured to execute the heartbeat method for transmission provided in the present embodiment.
The storage nodes in the distributed storage system also comprise a plurality of object storage devices, the components are in communication connection with the object storage devices, and the object storage devices are in communication with the object storage devices in other storage nodes in the distributed storage system through the components.
As can be seen from the above, the structure of the storage node in the present embodiment can be as shown in fig. 2. The object storage device may be referred to as an OSD, which may also provide data storage services for hard disks, and each hard disk may have an OSD service.
As shown in fig. 3, the method for transmitting heartbeat information according to this embodiment includes the following steps S3100 to S3300:
s3100, receiving first heartbeat information sent by the designated object storage device.
The specified object storage device is an object storage device in a storage node where the component is located, the first heartbeat information includes a device identifier of the target object storage device, and the target object storage device is an object storage device in other storage nodes.
In this embodiment, the component receives the first heartbeat information sent by the object storage device in the storage node where the component is located, that is, the specified object storage device. The first heartbeat information may include, in addition to the device identifier of the target object storage device, a device identifier of the specified object storage device and a time for sending the first heartbeat information, but is not limited thereto.
S3200, determining the state of the target object storage device according to the device identification of the target object storage device.
In one embodiment, a state list of other storage nodes is stored in the component in advance, and the state list includes device identifiers of object storage devices included in the storage nodes in the other storage nodes and corresponding latest states. Based on this, in one embodiment, the specific implementation of S3200 may be as follows S3210 and S3220:
s3210, searching for the latest state corresponding to the device identifier which is the same as the device identifier of the target object storage device in a pre-stored state list; the state list includes device identifiers of object storage devices included in storage nodes in other storage nodes and corresponding states.
S3220 takes the found latest status as the status of the target object storage device.
In this embodiment, the status includes an online status and an offline status. Wherein, the online state is generally called Up state, and the corresponding offline state is called Down state.
In the present embodiment, the manner of acquiring the status list is not limited. Any way of obtaining the above state list is within the scope of the present application.
In an embodiment, since the distributed storage system further includes a monitoring node, and the monitoring node records the latest status of the object storage device included in each storage node, the status list in S3210 may be constructed by the monitoring node sending the latest status of the object storage device to the component in this embodiment.
In another embodiment, the status list may also be a status list that is recorded for each of the other storage nodes and is constructed by each of the other storage nodes based on the latest status of its own included object storage device. Therefore, the status list in S3210 may be obtained by the component in this embodiment from other storage nodes. It can be understood that the obtaining may be that each storage node in the other storage nodes broadcasts its own status list through its own component, and the component in this embodiment receives the broadcasted status list. Based on this, before S3200, the method for transmitting heartbeat information according to this embodiment further includes the following S3230:
s3230, acquiring the state list broadcast by other storage nodes.
In one embodiment, the other storage nodes may periodically broadcast their own status lists according to a set time period. Based on this, the component updates the corresponding state list that has been stored each time according to the most recently received state list.
In addition, in this embodiment, the component further needs to broadcast the state list of the storage node where the component is located, so that other storage nodes can obtain the state list of the component.
In one embodiment, the state list may further include a latest online time of the corresponding object storage device. The latest online time may be the time that the object storage device last sent information, or the last time the information sent by the component was received. Wherein, the information involved in the latest online time may be heartbeat information.
And S3300, when the state of the target object storage device is on-line, sending second heartbeat information to the designated object storage device.
And the second heartbeat information is heartbeat information constructed by the component simulation target object storage device.
In this embodiment, when it is determined that the target object storage device is online based on the foregoing S3200, this indicates that the target object storage device can perform normal communication with the specified object storage device. At this time, the component needs to simulate the target object storage device to construct heartbeat information, i.e. construct second heartbeat information, in response to the first heartbeat information sent by the specified object storage device.
In an embodiment, the second heartbeat information includes: a device identification of the target object storage device, a latest online time of the target object storage device. Wherein the latest online time can be determined according to the status list.
Corresponding to the above S3300, the method for transmitting heartbeat information according to this embodiment further includes the following S3400:
and S3400, under the condition that the state of the target object storage device is an offline state, not sending second heartbeat information to the specified corresponding storage device.
In this embodiment, when the state of the target object storage device is the offline state, it is described that the target object storage device cannot perform normal communication with the specified object storage device. At this time, the component is not required to send the second heartbeat information to the specified object storage device.
In an embodiment of the invention, a component is communicatively coupled to an object storage device in a storage node in a distributed storage system by deploying the component on the storage node. In this way, the component receives the first heartbeat information sent by the specified object storage device to the target object storage device through the communication connection with the specified object storage device, and then determines the state of the target object storage device according to the device identifier of the target object storage device contained in the first heartbeat information. In the event that the device identification of the target object storage device is online, the component simulates the target object storage device to construct heartbeat information, i.e., generates second heartbeat information, and sends the second heartbeat information to the designated object storage device. The heartbeat interaction between the designated object storage device and the target object storage device in other storage nodes is realized through the deployed components, so that the condition that heartbeat connection needs to be established between the object storage devices among the storage nodes is avoided, namely, the heartbeat connection of the storage nodes is realized by the components in the storage nodes, further, the heartbeat connection number is reduced, the resource consumption of the distributed storage system is reduced, the pressure of the inner cores of the storage nodes where the components are located is reduced, and the stability of the distributed storage system is further improved.
In the event that the state of the target object storage device is offline, the component will not send the second heartbeat information to the designated object storage device. Therefore, when the designated object storage device does not receive the second heartbeat information sent by the component within a preset time period, the designated object storage device can determine that the target object storage device has a fault, and further, the designated object storage device can report fault information indicating that the target object storage device has the fault to a monitoring node of the distributed storage system. Therefore, the monitoring node can timely and accurately acquire the state of the object storage equipment in the storage node. Based on this, on the basis of any of the above embodiments, the method for transmitting heartbeat information provided in this embodiment further includes the following S3500:
and S3500, under the condition that the designated object storage equipment does not receive the second heartbeat information within the preset time period, the designated object storage equipment determines that the target object storage equipment has a fault, and reports fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system.
In one embodiment, the predetermined time period may be determined empirically by a technician, and in one example, the predetermined time period may be 1 min.
The second heartbeat information comprises the latest online time of the target object storage, and the designated object storage device can determine whether the target object storage device has a fault according to the latest online time of the target object storage device in the second heartbeat information. Specifically, when the difference between the latest online time of the target object storage device included in the second heartbeat message and the time when the designated object storage device sends the first heartbeat information is greater than a preset threshold, the designated object storage device determines that the target object storage device has a fault. Further, the specified object storage device may report failure information indicating that the target object storage device has a failure to the monitoring node of the distributed storage system. Therefore, the monitoring node can timely and accurately acquire the state of the object storage equipment in the storage node. Based on this, on the basis of any of the above embodiments, the method for transmitting heartbeat information provided in this embodiment further includes the following S3600:
s3600, the designated object storage device judges whether the target object storage device has a fault or not, and reports fault information for indicating that the target object storage device has the fault to a monitoring node of the distributed storage system under the condition that the target object storage device is determined to have the fault; and when the difference between the latest online time of the target object storage device included in the second heartbeat message and the time when the first heartbeat information is sent by the specified object storage device is greater than a preset threshold value, the target object storage device has a fault.
In one embodiment, the preset threshold may be determined empirically by a skilled person, and in one example, the preset threshold may be 1 min.
In one embodiment, when sending failure information indicating that a target object storage device has a failure to the monitoring node, the designated object storage device may first send the failure information to the corresponding component, and the component reports the failure information to the monitoring node. In this embodiment, the component sends the failure information to the monitoring node, so that it is not necessary to specify the object storage device to establish a connection with the monitoring node, and send the failure information to the monitoring node based on the connection. Thus, a connection channel is established between the component and the monitoring node. This can further reduce the resource consumption of the distributed storage system and the kernel pressure of the storage node where the component is located, thereby further improving the stability of the distributed storage system.
< embodiment of storage node >
The embodiment provides a storage node which comprises a component and one or more object storage devices. The structure of the storage node may be as shown in fig. 2. Wherein:
the object storage device is used for sending a first heartbeat message to the component; wherein the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in other storage nodes in a distributed system where the storage node is located;
the component is configured to determine a state of the target object storage device according to the device identifier of the target object storage device after receiving the first heartbeat message; and sending a second heartbeat message to the object storage device when the state of the target object storage device is in an online state, wherein the second heartbeat message is heartbeat information constructed by the component simulating the target object storage device.
In one embodiment, the assembly is specifically configured to:
searching a state list stored in advance for the latest state corresponding to the equipment identifier which is the same as the equipment identifier of the target object storage equipment; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
In one embodiment, the assembly is further configured to:
and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
In one embodiment, the second heartbeat information includes:
a device identification of the target object storage device, a latest online time of the target object storage device.
In one embodiment, the object storage device is further configured to:
judging whether the target object storage equipment has a fault or not, and reporting fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system under the condition that the target object storage equipment is determined to have the fault; and when the difference between the latest online time of the target object storage device included in the second heartbeat message and the time when the object storage device sends the first heartbeat information is greater than a preset threshold value, the target object storage device has a fault.
In one embodiment, the object storage device is further configured to:
and under the condition that the second heartbeat information is not received within a preset time period, the object storage equipment determines that the target object storage equipment has a fault, and reports fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system.
It should be noted that the object storage device mentioned in this embodiment is a specified object storage device in the foregoing method embodiment. In addition, the specific implementation manners of the components and the object storage device in the embodiment of the apparatus of the present invention may refer to the related contents in the embodiment of the method of the present invention, and are not described herein again.
< embodiment of distributed storage System >
The present embodiment provides a distributed storage system 40, and as shown in fig. 4, the distributed storage system 40 includes a first storage node 41 and a second storage node 42. A first component 411 is disposed in the first storage node 41; the first storage node 41 is in communication connection with the object storage device 412 in the first storage node 41 through the first component 411, and the object storage device 412 in the first storage node 41 is in communication with the object storage device 42 in the second storage node through the first component 411.
It is understood that the second storage node 42 may be plural. And there may be a plurality of object storage devices 412 in the first storage node 41 communicatively connected to the first component.
Wherein the object storage 412 in the first storage node 41 is configured to send a first heartbeat message to the first component 411; wherein the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the second storage node 42;
the first component 411 is configured to determine, after receiving the first heartbeat message, a state of the target object storage device according to a device identifier of the target object storage device; and in a case that the state of the target object storage device is an online state, sending a second heartbeat message to the object storage device 412 in the first storage node 41, where the second heartbeat message simulates heartbeat information constructed by the target object storage device for the first component 411.
In one embodiment, the first component 411 is further configured to:
in a case where the state of the target object storage device is an offline state, the second heartbeat message is not sent to the object storage device 412 in the first storage node 41.
In one embodiment, the first component 411 is specifically configured to:
searching a state list stored in advance for the latest state corresponding to the device identifier which is the same as the device identifier of the target object storage device; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
In one embodiment, the first component 411 is further configured to:
and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
In one embodiment, the second heartbeat information includes:
a device identification of the target object storage device, a latest online time of the target object storage device.
In one embodiment, the object storage 412 in the first storage node 41 is further configured to:
judging whether the target object storage equipment has a fault or not, and reporting fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system under the condition that the target object storage equipment is determined to have the fault; wherein, in a case that a difference between a latest online time of the target object storage device included in the second heartbeat message and a time when the object storage device 412 in the first storage node 41 transmits the first heartbeat information is greater than a preset threshold, the target object storage device has a fault.
In one embodiment, the object storage 412 in the first storage node 41 is further configured to:
in a case that the second heartbeat information is not received within a preset time period, the object storage device 412 in the first storage node 41 determines that the target object storage device has a fault, and reports fault information indicating that the target object storage device has the fault to a monitoring node of the distributed storage system.
It should be noted that the object storage device 412 in the first storage node 41 mentioned in this embodiment is a specified object storage device in the foregoing method embodiment. The first component 411 is the component mentioned in the above method embodiment. In addition, for specific implementation manners of the first component 411 and the object storage device 412 in the apparatus embodiment of the present invention, reference may be made to relevant contents of the method embodiment of the present invention, and details are not described herein again.
In addition, it is understood that a second component having the same or similar function as the first component 411 is disposed in the second storage node 42.
< embodiment of the apparatus >
The present embodiment provides an apparatus 50 for transmitting heartbeat information. The apparatus 50 comprises: a receiving module 51, a determining module 52 and a sending module 53. Wherein:
a receiving module 51, configured to receive a first heartbeat message sent by a specified object storage device, where the specified object storage device is an object storage device in a storage node where the component is located, and the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the other storage nodes;
a determining module 52, configured to determine a state of the target object storage device according to the device identifier of the target object storage device;
a sending module 53, configured to send a second heartbeat message to the specified object storage device when the state of the target object storage device is an online state, where the second heartbeat message is heartbeat information that the component simulates the structure of the target object storage device.
In one embodiment, the sending module 53 is further configured to: and when the state of the target object storage device is an offline state, not sending the second heartbeat message to the specified object storage device.
In one embodiment, the determining module 52 is specifically configured to:
searching a state list stored in advance for the latest state corresponding to the device identifier which is the same as the device identifier of the target object storage device; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
In one embodiment, the apparatus 50 for transmitting heartbeat newness further includes an acquisition module. Wherein the acquisition module is configured to: and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
In one embodiment, the second heartbeat information includes:
a device identification of the target object storage device, a latest online time of the target object storage device.
In one embodiment, the second heartbeat message is for: the specified object storage device judges whether the target object storage device has a fault or not, and reports fault information for indicating that the target object storage device has the fault to a monitoring node of the distributed storage system under the condition that the target object storage device is determined to have the fault; wherein the target object storage device has a fault when a difference between a latest online time of the target object storage device included in the second heartbeat message and a time when the specified object storage device transmits the first heartbeat information is greater than a preset threshold.
In an embodiment, when the designated object storage device does not receive the second heartbeat information within a preset time period, the designated object storage device determines that the target object storage device has a fault, and reports fault information for indicating that the target object storage device has the fault to a monitoring node of the distributed storage system.
It should be noted that, for specific implementation manners of each module in the apparatus embodiment of the present invention, reference may be made to relevant contents in the method embodiment of the present invention, and details are not described herein again.
< embodiment of Assembly >
The present embodiment provides an assembly 60. The component 60 is deployed in each storage node of the distributed storage system, and comprises the apparatus 50 for transmitting heartbeat information in the embodiment of the apparatus as described above; alternatively, the first and second electrodes may be,
the method comprises the following steps: a processor 61 and a memory 62;
the memory 62 is adapted to store executable instructions for controlling the processor 61 to perform a method according to any of the above method embodiments.
< embodiment of storage Medium >
The present embodiments provide a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement a method as in any one of the above method embodiments.
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 encoding device, such as punch cards or in-groove raised 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 in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
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 terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the technology 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 (12)

1. A method for transmitting heartbeat information, applied to a component deployed in a storage node in a distributed storage system, wherein the storage node further includes a plurality of object storage devices, the component is communicatively connected to the plurality of object storage devices, and the plurality of object storage devices communicate with object storage devices in other storage nodes in the distributed storage system through the component, the method comprising:
receiving a first heartbeat message sent by a specified object storage device, wherein the specified object storage device is an object storage device in a storage node where the component is located, and the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the other storage nodes;
determining the state of the target object storage equipment according to the equipment identification of the target object storage equipment;
and sending a second heartbeat message to the specified object storage device under the condition that the state of the target object storage device is in an online state, wherein the second heartbeat message is heartbeat information constructed by the component simulating the target object storage device.
2. The method of claim 1, further comprising: and when the state of the target object storage device is an offline state, not sending the second heartbeat message to the specified object storage device.
3. The method of claim 1, wherein determining the state of the target object storage device based on the device identification of the target object storage device comprises:
searching a state list stored in advance for the latest state corresponding to the device identifier which is the same as the device identifier of the target object storage device; the state list comprises the device identification of the object storage device included by the storage node in the other storage nodes and the corresponding latest state;
and taking the found latest state as the state of the target object storage equipment.
4. The method of claim 3, prior to said determining the status of the target object storage device from the device identification of the target object storage device, comprising:
and acquiring a state list broadcasted by each storage node in the other storage nodes, wherein the state list broadcasted by each storage node comprises the equipment identifier of the object storage equipment in the storage node and the latest state corresponding to the object storage equipment.
5. The method of claim 1, wherein the second heartbeat information comprises:
a device identification of the target object storage device, a latest online time of the target object storage device.
6. The method of claim 2, wherein the second heartbeat message is used to: the specified object storage device judges whether the target object storage device has a fault or not, and reports fault information for indicating that the target object storage device has the fault to a monitoring node of the distributed storage system under the condition that the target object storage device is determined to have the fault; wherein the target object storage device has a fault when a difference between a latest online time of the target object storage device included in the second heartbeat message and a time when the specified object storage device transmits the first heartbeat information is greater than a preset threshold.
7. The method of claim 1, further comprising:
and under the condition that the designated object storage equipment does not receive the second heartbeat information within a preset time period, the designated object storage equipment determines that the target object storage equipment has a fault and reports fault information for indicating that the target object storage equipment has the fault to a monitoring node of the distributed storage system.
8. A storage node, comprising: a component, one or more object storage devices; wherein, the first and the second end of the pipe are connected with each other,
the object storage device is used for sending a first heartbeat message to the component; wherein the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in other storage nodes in the distributed system where the storage node is located;
the component is configured to determine a state of the target object storage device according to the device identifier of the target object storage device after receiving the first heartbeat message; and sending a second heartbeat message to the object storage device when the state of the target object storage device is in an online state, wherein the second heartbeat message is heartbeat information constructed by the component simulating the target object storage device.
9. A distributed storage system is characterized by comprising a first storage node and a second storage node, wherein a first component is deployed in the first storage node; the first storage node is in communication connection with an object storage device in the first storage node through the first component, and the object storage device in the first storage node is in communication connection with an object storage device in the second storage node through the first component; wherein, the first and the second end of the pipe are connected with each other,
an object storage device in the first storage node to send a first heartbeat message to the first component; wherein the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in the second storage node;
the first component is configured to determine, after receiving the first heartbeat message, a state of the target object storage device according to a device identifier of the target object storage device; and sending a second heartbeat message to the object storage device in the first storage node under the condition that the state of the target object storage device is in an online state, wherein the second heartbeat message is the heartbeat information constructed by the first component simulating the target object storage device.
10. An apparatus for transmitting heartbeat information, the apparatus comprising:
a receiving module, configured to receive a first heartbeat message sent by a specified object storage device, where the specified object storage device is an object storage device in a storage node where a component is located, and the first heartbeat message includes: a device identification of the target object storage device; the target object storage device is an object storage device in other storage nodes;
the determining module is used for determining the state of the target object storage equipment according to the equipment identification of the target object storage equipment;
a sending module, configured to send a second heartbeat message to the specified object storage device when the state of the target object storage device is an online state, where the second heartbeat message is heartbeat information that the component simulates the structure of the target object storage device.
11. A component, deployed in each storage node of a distributed storage system, comprising the apparatus of claim 10; alternatively, the first and second electrodes may be,
the method comprises the following steps: a processor and a memory;
the memory is to store executable instructions to control the processor to perform the method of any one of claims 1-7.
12. A computer-readable storage medium, wherein the storage medium stores computer instructions, which when executed by a processor, implement the method of any one of claims 1-7.
CN201911284517.7A 2019-12-13 2019-12-13 Method, equipment, system, device and component for transmitting heartbeat information Active CN112995254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911284517.7A CN112995254B (en) 2019-12-13 2019-12-13 Method, equipment, system, device and component for transmitting heartbeat information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911284517.7A CN112995254B (en) 2019-12-13 2019-12-13 Method, equipment, system, device and component for transmitting heartbeat information

Publications (2)

Publication Number Publication Date
CN112995254A CN112995254A (en) 2021-06-18
CN112995254B true CN112995254B (en) 2022-07-19

Family

ID=76342049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911284517.7A Active CN112995254B (en) 2019-12-13 2019-12-13 Method, equipment, system, device and component for transmitting heartbeat information

Country Status (1)

Country Link
CN (1) CN112995254B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506263B (en) * 2020-03-31 2022-07-12 新华三技术有限公司成都分公司 Heartbeat connection establishment method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710554A (en) * 2012-06-25 2012-10-03 深圳中兴网信科技有限公司 Distributed message system and service status detection method thereof
CN108092857A (en) * 2018-01-15 2018-05-29 郑州云海信息技术有限公司 A kind of distributed system heartbeat detecting method and relevant apparatus
CN109002478A (en) * 2018-06-19 2018-12-14 郑州云海信息技术有限公司 The fault handling method and relevant device of distributed file system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7778191B2 (en) * 2008-12-12 2010-08-17 Mitel Networks Corporation System and method for fast detection of communication path failures
CN106936662B (en) * 2015-12-31 2020-01-31 杭州华为数字技术有限公司 method, device and system for realizing heartbeat mechanism

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710554A (en) * 2012-06-25 2012-10-03 深圳中兴网信科技有限公司 Distributed message system and service status detection method thereof
CN108092857A (en) * 2018-01-15 2018-05-29 郑州云海信息技术有限公司 A kind of distributed system heartbeat detecting method and relevant apparatus
CN109002478A (en) * 2018-06-19 2018-12-14 郑州云海信息技术有限公司 The fault handling method and relevant device of distributed file system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Multicast in the Data Center Overview draft-ietf-mboned-dc-deploy-00;M. McBride等;《IETF 》;20130218;全文 *

Also Published As

Publication number Publication date
CN112995254A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN108156205B (en) Message pushing method, client, server and programmable device
CN103313216B (en) Message prompt method, system and device for communication account
CN111708557B (en) Method, device and storage medium for updating configuration file
CN105204743A (en) Interaction control method and device for speech and video communication
CN110825411B (en) Upgrading method and device for TWS (two way satellite System) earphone system and computer-readable storage medium
CN107342083B (en) Method and apparatus for providing voice service
CN107205041B (en) Audio device upgrading method, audio device and intelligent sound box
CN110022260B (en) Cross-environment receipt message processing method and system
CN113704063B (en) Performance monitoring method, device, equipment and storage medium of cloud mobile phone
CN110688169A (en) Application program acceleration method and device, storage medium and electronic equipment
WO2014153311A1 (en) Automatic version management
CN112099836A (en) Configuration file updating method, configuration server, version control server and system
US10205813B2 (en) Method and system for detecting abnormal contact information and server
US10587719B2 (en) Updating a profile
CN112995254B (en) Method, equipment, system, device and component for transmitting heartbeat information
US20200211027A1 (en) Business rules processing framework
CN112243024B (en) Service control method, device, server and storage medium
EP3828705A1 (en) Method and apparatus for processing a service of an abnormal server
CN105227597A (en) A kind of method, Apparatus and system obtaining terminal equipment screen-picture
CN112233196A (en) Live broadcast room green screen detection method, device, equipment and storage medium
CN111478953A (en) Self-construction method, device, system, equipment and storage medium of server cluster
CN111597112A (en) Automatic test method and device and electronic equipment
CN111162960B (en) Method and server for starting debugging panel
CN115865852A (en) Instant messaging session information processing method and device and electronic equipment
CN111124874A (en) Method for debugging webpage, debugging server and main control 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