A server switching method, a moosefs system and a storage medium

By obtaining the actual operating status of the master server through the cluster monitoring module, the resource contention problem caused by the interruption of communication between the master and backup nodes in the MooseFS system is resolved, ensuring the high availability of the system.

CN115145782BActive Publication Date: 2025-11-28CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110341290.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-30
Publication Date
2025-11-28
Estimated Expiration
2041-03-30

AI Technical Summary

Technical Problem

In the MooseFS system, communication interruptions or misjudgments between the primary and backup nodes can lead to resource contention, resulting in system state chaos and data corruption.

Method used

The cluster monitoring module obtains the actual operating status information of the master server to prevent the backup node from misjudging the status of the master node, and thus decides whether to perform server switchover.

Benefits of technology

This avoids state chaos and data corruption in the MooseFS system when communication between the primary and backup nodes is interrupted, ensuring high system availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145782B_ABST
    Figure CN115145782B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of server switching methods, MooseFS system and storage medium, MooseFS system includes: main server, backup server and cluster monitoring module, server switching method includes: when backup server monitors that main server is abnormal, sends query request to cluster monitoring module;Wherein, query request carries the identification information of main server;Cluster monitoring module determines the first service information corresponding to main server according to identification information;Wherein, first service information represents the actual running state of main server;Cluster monitoring module sends query response to backup server;Wherein, query response carries first service information;Main server and backup server determine whether to carry out server switching according to first service information.The server switching method proposed in the application can prevent the main and backup nodes in MooseFS system from competing for resources, and realize the high availability of MooseFS system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed storage, in particular to a server switching method, a MooseFS system and a storage medium. BACKGROUND

[0002] Distributed storage refers to connecting multiple single computers to form a storage cluster, which can combine the storage and read-write capabilities of all machines. The MooseFS system is a kind of distributed file system, which solves the problem of limited storage capacity of a single machine by storing files in the cluster, and solves the limitation of the throughput of a single machine by network media, and guarantees data security through a multi-copy mechanism, and the system is easy to expand.

[0003] The Ucarp (Ucarp) is a Linux implementation version of the CARP (Common Access Redundancy Protocol), which allows the master server and other servers to share a virtual IP (Internet Protocol) address, and when the master server fails, the other servers will automatically replace the master server to provide services to the cluster.

[0004] However, in actual application, the phenomenon of misjudging that the master server fails usually occurs, at this time, the master server is still normally running and providing services to the cluster, but the Ucarp determines that the other servers replace the master server to provide services to the cluster, so that the other servers compete with the master server for resources, and further cause the problem of chaotic state of the MooseFS system and data damage. SUMMARY

[0005] The server switching method, the MooseFS system and the storage medium provided by the embodiments of the present application can avoid the problem of chaotic state of the MooseFS system and data damage caused by the master and backup nodes competing for resources in the MooseFS system, and further effectively realize high availability of the MooseFS system.

[0006] The technical scheme of the embodiments of the present application is as follows:

[0007] In a first aspect, the embodiments of the present application provide a server switching method, which is applied to a MooseFS system, wherein the MooseFS system comprises a master server, a backup server and a cluster monitoring module, and the method comprises the following steps:

[0008] When the backup server monitors that the master server is abnormally running, a query request is sent to the cluster monitoring module, wherein the query request carries identification information of the master server;

[0009] The cluster monitoring module determines first service information corresponding to the master server according to the identification information; wherein the first service information represents an actual running state of the master server;

[0010] The cluster monitoring module sends a query response to the backup server; wherein the query response carries the first service information;

[0011] The master server and the backup server determine whether to perform server switching according to the first service information.

[0012] In a second aspect, an embodiment of the present application provides a MooseFS system, characterized in that the MooseFS system comprises a master server, a backup server, and a cluster monitoring module, wherein:

[0013] The master server is configured to manage the MooseFS system and perform data transmission with the data nodes;

[0014] The backup server is configured to monitor a running state of the master server and save metadata in the master server;

[0015] The cluster monitoring module is configured to monitor actual running states of the master server and the data nodes.

[0016] In a third aspect, an embodiment of the present application provides a MooseFS system, comprising a master server, a backup server, and a cluster monitoring module, and further comprising a processor and a memory storing processor-executable instructions, wherein when the instructions are executed by the processor, the server switching method described above is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a program, which is applied to a MooseFS system comprising a master server, a backup server, and a cluster monitoring module, and characterized in that when the program is executed by a processor, the server switching method described above is implemented.

[0018] The embodiment of the present application provides a server switching method, a MooseFS system and a storage medium. The MooseFS system comprises a master server, a backup server and a cluster monitoring module. When the backup server monitors that the master server is abnormal, the backup server sends a query request to the cluster monitoring module. The query request carries identification information of the master server. The cluster monitoring module determines first service information corresponding to the master server according to the identification information. The first service information represents an actual running state of the master server. The cluster monitoring module sends a query response to the backup server. The query response carries the first service information. The master server and the backup server determine whether to perform server switching according to the first service information. That is to say, in the embodiment of the present application, when the backup server in the MooseFS system determines that the current state of the master server is abnormal, the backup server does not directly perform server switching processing, but first acquires the first service information corresponding to the master server through the cluster monitoring module, determines the actual running state of the master server through the first service information, and then determines whether to perform server switching processing. It can be seen that if an abnormal situation such as communication interruption between the master node and the backup node occurs in the process in which the master node normally manages the entire MooseFS system, the MooseFS system can prevent the backup node from making a false judgment on the state of the master node and competing for resources and services, thereby avoiding the state confusion and data damage of the MooseFS system, and ensuring the high availability of the MooseFS system. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The MooseFS system provided by the embodiment of the present application Figure 1 ;

[0020] Figure 2 The implementation process of the server switching method provided by the embodiment of the present application Figure 1

[0021] Figure 3 The implementation process of the server switching method provided by the embodiment of the present application Figure 2 ;

[0022] Figure 4 The MooseFS system provided by the embodiment of the present application Figure 2 ;

[0023] Figure 5 The implementation process of the server switching method provided by the embodiment of the present application Figure 3 ;

[0024] Figure 6 The implementation process of the server switching method provided by the embodiment of the present application Figure 4 ;

[0025] Figure 7 The MooseFS system structure for the embodiment of the present application Figure 3 ;

[0026] Figure 8 The implementation flow of the server switching method for the embodiment of the present application Figure 5 ;

[0027] Figure 9 The implementation flow of the server switching method for the embodiment of the present application Figure 6 ;

[0028] Figure 10 The implementation flow of the server switching method for the embodiment of the present application Figure 7 ;

[0029] Figure 11 The implementation flow of the server switching method for the embodiment of the present application Figure 8 ;

[0030] Figure 12 The MooseFS system structure for the embodiment of the present application Figure 4 ;

[0031] Figure 13 The MooseFS system structure for the embodiment of the present application Figure 5 ;

[0032] Figure 14 The MooseFS system structure for the embodiment of the present application Figure 6 . DETAILED DESCRIPTION

[0033] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, but not to limit the application. In addition, it should be noted that, for the convenience of description, only the parts related to the application are shown in the drawings.

[0034] With the development of Internet technology and the gradual deepening of various information systems, new data sources are constantly emerging, and the amount of business data is gradually increasing, which significantly increases the demand for unstructured file storage. However, the traditional centralized storage usually uses high-end storage such as storage area network (SAN) and network attached storage (NAS) to cope with the explosive growth of data. Since the space and capacity of such storage cannot be expanded at will, upgrading the equipment requires high monetary costs, and there are disadvantages such as low storage efficiency, insufficient horizontal expansion function, poor load balancing capability, and low concurrent access performance. The introduction of distributed storage can well solve the problems existing in traditional SAN, NAS and other storage.

[0035] The MooseFS system is a distributed file system that stores files through the client of the MooseFS system, instead of the traditional direct storage of local disks. However, the overall failure rate of the MooseFS system is high, and the brain split problem caused by abnormal communication between the master node and the backup node may occur, resulting in chaos in the state of the MooseFS system and data damage. To ensure that the MooseFS system does not lose important data in the face of the above abnormal situations and continuously provides services to users, and to improve the overall high availability of the MooseFS system, it has become a technical problem to be solved.

[0036] To solve the problems existing in the existing MooseFS system, the embodiments of the present application provide a server switching method, a MooseFS system and a storage medium, and a script adjustment is made based on the MooseFS 3.0 mechanism. Specifically, the MooseFS system includes a master server, a backup server and a cluster monitoring module. When the backup server detects that the master server is running abnormally, it sends a query request to the cluster monitoring module; the query request carries the identification information of the master server; the cluster monitoring module determines the first service information corresponding to the master server according to the identification information; the first service information represents the actual running state of the master server; the cluster monitoring module sends a query response to the backup server; the query response carries the first service information; and the master server and the backup server determine whether to perform server switching according to the first service information. Thus, in the case of abnormal network communication, the backup node can prevent misjudgment of the state of the master node, and prevent the brain split problem caused by resource and service contention, thereby preventing the MooseFS system from being in chaos and data damage, and ensuring the high availability of the MooseFS system.

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application.

[0038] Embodiment one

[0039] The embodiment of the present application provides a server switching method, which is applied to a MooseFS system, Figure 1 The MooseFS system is shown in the figure Figure 1 As shown in the figure Figure 1 The MooseFS system 10 can include a master server 11, a backup server 12 and a cluster monitoring module 13.

[0040] In the embodiment of the present application, the master server 11 is responsible for maintaining the namespace of the entire MooseFS system 10 and exposing to users for use, for data transmission with a plurality of data nodes, and for managing the entire MooseFS system 10.

[0041] The backup server 12 is connected with the master server 11, can perform master-backup switching when the master server fails, take over the work of the master server 11, and can synchronize the metadata of the master server 11 in real time, adopt the Rsync and Sersync architecture, synchronize the changed files or directories, and not only has high transmission rate, but also can achieve the purpose of real-time synchronization and backup of metadata.

[0042] The cluster monitoring module 13 is used for monitoring the master server 11 and the backup server 12, through real-time monitoring of the master server and the backup server, preventing misjudgment of the state of the master server by the backup server when some abnormal conditions such as communication failure occur, and mistakenly considering that the master server fails at this time, and causing the brain split problem caused by the contention for resources and services, thereby achieving the effect of preventing the MooseFS system 10 from being in a state of chaos and data damage.

[0043] The embodiment of the present application provides a server switching method, Figure 2 The implementation process of the server switching method provided in the embodiment of the present application is shown in the figure Figure 1 As shown in the figure Figure 2 In the embodiment of the present application, the server switching method can include the following steps:

[0044] Step 101, when the backup server monitors that the master server runs abnormally, a query request is sent to the cluster monitoring module, wherein the query request carries the identification information of the master server.

[0045] In the embodiment of the present application, the backup server in the MooseFS system can first monitor the master server in real time based on the heartbeat monitoring mechanism, when the backup server determines that the current state of the master server is abnormal based on the heartbeat monitoring mechanism, the backup server will request the cluster monitoring module to query the current state of the master server, that is, a query request is sent to the cluster monitoring module, wherein the query request carries the identification information of the master server.

[0046] It should be noted that in the embodiments of the present application, the backup server sends a heartbeat packet to the master server in a timely manner based on a heartbeat monitoring mechanism, and receives feedback information, and if the sent heartbeat packet does not receive feedback information within a preset time, it is judged that the current state of the master server is abnormal. Further, a query request is sent to the cluster monitoring module, wherein the query request carries identification information of the master server.

[0047] In the embodiments of the present application, the query request can be used to obtain the service state of the master server. Specifically, when the backup server does not receive feedback information within a preset time, it is judged that the current state of the master server is abnormal, and the backup server sends the first service information of the master server monitored by the cluster monitoring module through a request, so that the service state of the master server can be determined according to the received first service information.

[0048] In the embodiments of the present application, the identification information can be used to represent the identity information of the master server, and further, the cluster monitoring module can determine the first service information corresponding to the master server from all the service information of the nodes stored by the cluster monitoring module according to the identification information sent by the backup server. The setting method of the identification information is not limited in the present application.

[0049] It should be noted that since the monitoring of the master server by the backup server based on the heartbeat monitoring mechanism may cause misjudgment due to communication interruption between the master and the backup, when the backup server judges that the master server may have a fault at this time, a query request needs to be sent to the cluster monitoring module to determine the real state of the master server at this time, instead of directly performing master-backup switching according to the fault judgment.

[0050] Step 102, the cluster monitoring module determines the first service information corresponding to the master server according to the identification information; wherein the first service information represents the actual running state of the master server.

[0051] In the embodiments of the present application, when the backup server determines that the current state of the master server is abnormal based on the heartbeat monitoring mechanism, the backup server sends a query request to the cluster monitoring module, and the cluster monitoring module in the MooseFS system can further determine the first service information of the master server according to the identification information after receiving the query request sent by the backup server and carrying the identification information.

[0052] In the embodiments of the present application, the first service information of the master server can be first service information obtained by the cluster monitoring module monitoring the master server, and is first service information generated according to all services running on the master server, which indicates another service state information obtained by the cluster monitoring module at the upper layer of the backup server monitoring the master server, in addition to the current state information obtained by the backup server monitoring the master server, that is, the first service information, which is used to indicate the actual running state of the master server.

[0053] For example, in the embodiments of the present application, when the cluster monitoring module determines the first service information corresponding to the master server according to the identification information, the cluster monitoring module can monitor the service state of the master server at all times and store the first service information according to the identification information at the same time, so that when the cluster monitoring module receives the query request sent by the backup server, the cluster monitoring module can locate the corresponding first service information stored in advance in the cluster monitoring module according to the identification information carried in the query request; or the cluster monitoring module can not store the first service information in advance, but directly query the first state information of the master server according to the identification information.

[0054] For example, in the embodiments of the present application, when the cluster monitoring module determines the first service information corresponding to the master server according to the identification information, the cluster monitoring module can obtain the first service information by monitoring the master server, and then determine the service state of the master server according to the first service information, especially when the backup server needs to make a more objective judgment and determination on the service state of the master server according to the first service information sent by the cluster monitoring module.

[0055] Step 103, the cluster monitoring module sends a query response carrying the first service information to the backup server.

[0056] In the embodiments of the present application, after the cluster monitoring module determines the first service information corresponding to the master server according to the identification information, the cluster monitoring module sends a query response carrying the first service information to the backup server in response to the query request sent by the backup server, so that the backup server can obtain the first service information of the master server monitored by the cluster monitoring module.

[0057] Step 104, the master server and the backup server determine whether to perform server switching according to the first service information.

[0058] In the embodiments of the present application, after the cluster monitoring module sends the query response to the backup server, the master server and the backup server determine whether to perform server switching according to the first service information.

[0059] In the embodiments of the present application, server switching refers to switching the backup server and the main server, using the backup server to replace the work of the main server, and then providing services for the system.

[0060] It should be noted that, since the first service information represents the actual running state of the main server, the main server and the backup server can determine whether server switching is needed based on the first service information. If it is determined according to the first service information that server switching is needed, server switching is performed, and the backup server replaces the work of the main server. If it is determined according to the first service information that server switching is not needed, server switching is not performed.

[0061] Figure 3 Implementation process of the server switching method provided in the embodiments of the present application Figure 2 As shown in Figure 3 In the embodiments of the present application, the main server and the backup server determine whether to perform server switching according to the first service information, that is, step 104 can include the following steps:

[0062] Step 104a, if the first service information received by the backup server is normal, the main server and the backup server do not perform server switching processing.

[0063] In the embodiments of the present application, the main server and the backup server determine whether to perform server switching according to the first service information. If the backup server determines that the first service information of the main server at this time is normal, the main server and the backup server do not perform server switching processing.

[0064] In the embodiments of the present application, if the first service information obtained by the backup server is normal, it indicates that the backup server may misjudge the current service state of the main server, that is, the main server does not have a fault, and it may be that the communication between the main server and the backup server is not connected, and the backup server does not receive the information fed back by the main server, so that the backup server mistakenly thinks that the state of the main server is abnormal. Therefore, according to the obtained first service information, the backup server can determine that the main server is in a normal running state, so that the main server and the backup server do not perform server switching processing, avoiding the problem of brain split caused by communication disconnection, which causes system confusion and data loss, and ensuring the high availability of the MooseFS system.

[0065] In the embodiments of the present application, when the main server is temporarily unresponsive due to too high load, that is, the main server is in a false death state, it will also cause the backup server to judge that the main server has been down, resulting in a misjudgment, and thus may cause the problem of brain split. The specific fault information is not limited in the present application.

[0066] Step 104b: If the first service information received by the backup server is abnormal, the primary server and the backup server shall perform a server switchover process.

[0067] In this embodiment, the cluster monitoring module sends a query response to the backup server. The query response carries first service information. If the query response received by the backup server shows that the first service information is abnormal, it indicates that the current state of the master server is indeed abnormal. Then, the master server and the backup server perform server switching, and the backup server takes over the work of the master server, thereby reducing the fault handling time of the MooseFS system and ensuring the high availability of the MooseFS system.

[0068] This application provides a server switching method, a MooseFS system, and a storage medium. The MooseFS system includes a master server, a backup server, and a cluster monitoring module. When the backup server detects an abnormal operation of the master server, it sends a query request to the cluster monitoring module. The query request carries the master server's identification information. The cluster monitoring module determines the first service information corresponding to the master server based on the identification information. The first service information represents the actual operating status of the master server. The cluster monitoring module sends a query response to the backup server, carrying the first service information. The master server and the backup server determine whether to perform a server switch based on the first service information. In other words, in this embodiment, when the backup server in the MooseFS system determines that the master server's current state is abnormal, it does not directly perform a server switch. Instead, it first obtains the first service information corresponding to the master server through the cluster monitoring module, determines the master server's actual operating status through the first service information, and then determines whether to perform a server switch. As can be seen, if an abnormal situation such as communication interruption between the primary and backup nodes occurs during the normal management of the entire MooseFS system by the primary node, the MooseFS system can prevent the backup node from misjudging the status of the primary node and competing for resources and services by monitoring the primary and backup nodes through the cluster monitoring module. This avoids the MooseFS system from becoming chaotic and data from being corrupted, thus ensuring the high availability of the MooseFS system.

[0069] Example 2

[0070] Based on the above embodiment one, in another embodiment of this application, Figure 4 A schematic diagram of the MooseFS system's structure. Figure 2 ,like Figure 4 As shown, the cluster monitoring module 13 in the MooseFS system 10 may include a service monitoring submodule 131, a threshold monitoring submodule 132, an information storage submodule 133, and a global monitoring submodule 134.

[0071] Figure 5 Implementation flow of the server switching method Figure 3 As shown in Figure 5 The method for determining the first service information corresponding to the master server according to the identification information by the cluster monitoring module includes the following steps:

[0072] In step 102a, the service monitoring submodule monitors the service state of the master server based on the heartbeat monitoring mechanism, and obtains at least one service information corresponding to at least one service; wherein one service corresponds to one service information.

[0073] It should be noted that in the embodiments of the present application, the at least one service of the master server can include at least one of a plurality of services such as a heartbeat information storage service, a MooseFS system running log storage service, and a MooseFS system data node service, which are not limited in the present application.

[0074] In step 102b, if all the at least one service information is normal, it is determined that the first service information is normal.

[0075] In step 102c, if any one of the at least one service information is abnormal, it is determined that the first service information is abnormal.

[0076] For example, in the present application, if the service monitoring submodule monitors that the storage heartbeat information service, the MooseFS system running log storage service, and the MooseFS system data node service of the master server are all normal, it is considered that the first service information of the master server is normal at this time.

[0077] Further, in the embodiments of the present application, the information storage submodule in the cluster monitoring module can receive the heartbeat monitoring file corresponding to the master server sent by the service monitoring submodule, and store the heartbeat monitoring file.

[0078] It should be noted that in the embodiments of the present application, the information storage submodule stores the heartbeat monitoring file, i.e. the service heartbeat related information, in the pre-established shared directory, and the information storage submodule serves the service monitoring submodule.

[0079] Figure 6 Implementation flow of the server switching method Figure 4 As shown in Figure 6 The method for determining the first service information corresponding to the master server according to the identification information by the cluster monitoring module includes the following steps:

[0080] In step 102d, the cluster monitoring module obtains the heartbeat monitoring file corresponding to the master server stored by the information storage submodule.

[0081] In the embodiment of the present application, the information storage submodule receives the heartbeat monitoring file corresponding to the master server sent by the service monitoring submodule, and stores the heartbeat monitoring file. When the cluster monitoring module needs to obtain the heartbeat monitoring file, the heartbeat monitoring file can be obtained from the information storage submodule.

[0082] Step 102e, the cluster monitoring module performs checking processing according to the heartbeat maintenance file and the heartbeat monitoring file, and obtains a checking result.

[0083] In the embodiment of the present application, after the cluster monitoring module obtains the heartbeat monitoring file, the checking processing can be performed according to the heartbeat maintenance file and the heartbeat monitoring file, and the checking result can be obtained.

[0084] It should be noted that, in the embodiment of the present application, the heartbeat maintenance file is the heartbeat information of the master server obtained by the backup server based on the heartbeat monitoring mechanism.

[0085] It should be noted that, in the embodiment of the present application, the heartbeat monitoring file is the heartbeat monitoring information of the master server obtained by the service monitoring submodule in the cluster monitoring module.

[0086] Step 102f, if the checking result is checking success, it is determined that the first service information corresponding to the master server is normal.

[0087] Step 102g, if the checking result is checking failure, it is determined that the first service information corresponding to the master server is abnormal.

[0088] In the embodiment of the present application, the cluster monitoring module performs checking processing according to the heartbeat maintenance file and the heartbeat monitoring file, if the checking result is checking success, it is determined that the first service information of the master server is normal, and if the checking result is checking failure, it is determined that the first service information corresponding to the master server is abnormal.

[0089] In the embodiment of the present application, checking success means that, after comparing or checking the heartbeat maintenance file and the heartbeat monitoring file, it is found that the heartbeat monitoring file shows that the first service information of the master server is normal, that is, it can be determined that the heartbeat maintenance file shows that the state of the master server is abnormal and may be misjudged, the master server should be in a normal service state at this time, and the result is checking success; checking failure means that, after comparing or checking the heartbeat maintenance file and the heartbeat monitoring file, it is still found that the heartbeat monitoring file shows that the first service information of the master server is abnormal, and it can be determined that the master server has an abnormality at this time, that is, the result is checking failure.

[0090] The embodiment of the application provides a server switching method, a MooseFS system and a storage medium. The MooseFS system comprises a master server, a backup server and a cluster monitoring module. When the backup server monitors that the master server is abnormal, the backup server sends a query request to the cluster monitoring module. The query request carries identification information of the master server. The cluster monitoring module determines first service information corresponding to the master server according to the identification information. The first service information represents an actual running state of the master server. The cluster monitoring module sends a query response to the backup server. The query response carries the first service information. The master server and the backup server determine whether to perform server switching according to the first service information. That is to say, in the embodiment of the application, when the backup server in the MooseFS system determines that the current state of the master server is abnormal, the backup server does not directly perform server switching processing, but first obtains the first service information corresponding to the master server through the cluster monitoring module, determines the actual running state of the master server through the first service information, and then determines whether to perform server switching processing. It can be seen that if abnormal conditions such as communication interruption between the master node and the backup node occur in the process in which the master node normally manages the entire MooseFS system, the MooseFS system can prevent the backup node from misjudging the state of the master node and competing for resources and services, thereby avoiding the state confusion and data damage of the MooseFS system, and ensuring the high availability of the MooseFS system.

[0091] Embodiment three

[0092] Based on the above-mentioned embodiments one and two, in another embodiment of the application, Figure 7 The MooseFS system method provided in the embodiment of the application has the component structure as shown in the figure Figure 3 As shown in the figure Figure 7 The MooseFS system 10 further comprises a data node 14.

[0093] It should be noted that in the embodiment of the application, the MooseFS system can further comprise a plurality of data nodes 14 for providing storage services of real file data.

[0094] Figure 8 The implementation flow of the server switching method provided in the embodiment of the application is shown in the figure Figure 5 As shown in the figure Figure 8 In the embodiment of the application, the server switching method can comprise the following steps:

[0095] In step 201, the service monitoring submodule monitors the data node based on the heartbeat monitoring mechanism, and obtains second service information corresponding to the data node.

[0096] In the embodiments of the present application, the MooseFS system further comprises a plurality of data nodes, and the service monitoring submodule also monitors the plurality of data nodes in the system and obtains second service information of the plurality of data nodes, the second service information representing service states of the data nodes.

[0097] It should be noted that, in the embodiments of the present application, the data nodes can use a dual-network card binding technology, which can not only improve the network transmission speed, but also ensure that the data nodes can still work normally and efficiently when one of the network cards fails. For example, when one of the network cards of a data node fails, the other network card immediately takes over all the loads, so that the service is not interrupted, and the subsequent maintenance is performed by maintenance personnel, thereby ensuring the normal use of the system as a whole.

[0098] In step 202, if the second service information is suspended, service pull-up processing is performed, and the data node is monitored again to obtain updated second service information.

[0099] In step 203, if the updated second service information is suspended, alarm processing is performed.

[0100] In the embodiments of the present application, the service monitoring submodule monitors the data nodes based on the heartbeat monitoring mechanism, and after obtaining the second service information corresponding to the data nodes, if it is found that the second service state is suspended, the second service is pulled up; if the second service state cannot be started again, alarm processing is performed.

[0101] In the embodiments of the present application, if the second service information is suspended, service pull-up processing is performed, and the data node is monitored again to obtain updated second service information; if the updated second service information is suspended, alarm processing is performed.

[0102] Further, in the embodiments of the present application, the information storage submodule in the cluster monitoring module can receive the second service information corresponding to the data nodes sent by the service monitoring submodule, and store the second service information.

[0103] In the embodiments of the present application, after the service monitoring submodule monitors the data nodes based on the heartbeat monitoring mechanism, obtains the second service information corresponding to the data nodes and performs processing, the information storage submodule is further used for storing the second service information of the data nodes.

[0104] The embodiment of the present application provides a server switching method, a MooseFS system and a storage medium. The MooseFS system comprises a master server, a backup server and a cluster monitoring module. When the backup server monitors that the master server is abnormal, the backup server sends a query request to the cluster monitoring module. The query request carries identification information of the master server. The cluster monitoring module determines first service information corresponding to the master server according to the identification information. The first service information represents an actual running state of the master server. The cluster monitoring module sends a query response to the backup server. The query response carries the first service information. The master server and the backup server determine whether to perform server switching according to the first service information. That is to say, in the embodiment of the present application, when the backup server in the MooseFS system determines that the current state of the master server is abnormal, the backup server does not directly perform server switching processing, but first acquires the first service information corresponding to the master server through the cluster monitoring module, determines the actual running state of the master server through the first service information, and then determines whether to perform server switching processing. It can be seen that if an abnormal situation such as communication interruption between the master node and the backup node occurs in the process in which the master node normally manages the entire MooseFS system, the MooseFS system can prevent the backup node from misjudging the state of the master node and contending for resources and services, thereby avoiding the state confusion and data damage of the MooseFS system, and ensuring the high availability of the MooseFS system.

[0105] Embodiment four

[0106] Based on the above embodiments one to three, in another embodiment of the present application, Figure 9 The implementation process of the server switching method provided in the embodiment of the present application is shown in Figure 6 As shown in Figure 9 In the embodiment of the present application, the server switching method can further comprise the following steps:

[0107] In step 301, the threshold monitoring submodule acquires the first state parameter corresponding to the master server.

[0108] In the embodiment of the present application, the threshold monitoring submodule can acquire the first state parameter corresponding to the master server.

[0109] It should be noted that in the embodiment of the present application, the first state parameter is a running state parameter of the master server, which can include a plurality of parameters representing the running state, such as a central processing unit (CPU) usage rate, a memory usage rate, an input / output (I / O) access rate and a disk storage rate, and the present application does not make specific limitation.

[0110] Step 302, if the first state parameter is greater than the first preset state threshold, an alarm processing is performed; wherein the first state parameter is used for monitoring the running state of the master server.

[0111] In the embodiment of the present application, after the threshold monitoring sub-module acquires the first state parameter corresponding to the master server, the first state parameter and the first preset state threshold can be compared, so that further processing can be performed according to the comparison result.

[0112] Specifically, in the present application, after the threshold monitoring sub-module acquires the first state parameter corresponding to the master server, the first state parameter and the first preset threshold are compared, if the first state parameter is greater than the first preset state threshold, an alarm processing is performed; wherein the first state parameter is used for monitoring the running state of the master server.

[0113] In the embodiment of the present application, the first preset threshold is a value preset according to the running parameter of the master server, which is used for monitoring the running state of the master server. When the first state parameter is greater than the first preset state threshold, it indicates that the running state of the master server at this time may exist overload condition, an alarm is performed to notify the cluster management personnel to maintain in time, so as to avoid the master server from malfunctioning and causing chaos of the MooseFS system and data loss, achieving the effect of high availability of the MooseFS system.

[0114] Figure 10 Implementation process of the server switching method proposed in the embodiment of the present application Figure 7 As shown in Figure 10 In the embodiment of the present application, the server switching method can further include the following steps:

[0115] Step 303, the threshold monitoring sub-module acquires the second state parameter corresponding to the data node.

[0116] In the embodiment of the present application, the second state parameter is the running state parameter of each data node, which can include the CPU usage rate, the memory usage rate, the I / O access rate, the disk storage rate and other parameters representing the running state of the data node, which is not limited in the present application.

[0117] Step 304, if the second state parameter is greater than the second preset state threshold, an alarm processing is performed; wherein the second state parameter is used for monitoring the running state of the data node.

[0118] In the embodiment of the present application, after the threshold monitoring sub-module acquires the second state parameter corresponding to the data node, if the second state parameter is greater than the second preset state threshold, an alarm processing is performed; wherein the second state parameter is used for monitoring the running state of the data node.

[0119] In the embodiments of the present application, the second preset state threshold is a value preset according to the running parameter of the data node, which is used to monitor the running state of the data node. When the second state parameter is greater than the second preset state threshold, it indicates that the running state of the data node may be overloaded at this time, an alarm is given, the cluster management personnel is notified to maintain in time, so as to avoid the data node from malfunctioning and causing the load of the remaining data nodes to increase, which may lead to the data node being down, thereby realizing high availability of the data node.

[0120] It should be noted that the first state parameter and the second state parameter are respectively the running state parameters of the master server and the data node, which respectively represent the running states of the master server and the data node; the first preset state threshold and the second preset state threshold are respectively values preset for the running states of the master server and the data node, which are used to give a warning for the running states of the master server and the data node.

[0121] Figure 11 Implementation process of the server switching method proposed in the embodiments of the present application Figure 8 As shown in Figure 11 In the embodiments of the present application, the server switching method can further include the following steps:

[0122] Step 305, the global monitoring submodule monitors the service monitoring submodule, the threshold monitoring submodule and the information storage submodule, and obtains the first service process corresponding to the service monitoring submodule, the second service process corresponding to the threshold monitoring submodule and the third service process corresponding to the information storage submodule.

[0123] In the embodiments of the present application, the global monitoring submodule is a submodule in the cluster monitoring module, which is used to monitor the remaining three submodules in the cluster monitoring module, i.e. the service monitoring submodule, the threshold monitoring submodule and the information storage submodule, on the service process, so as to ensure that the service processes of the service monitoring submodule, the threshold monitoring submodule and the information storage submodule can remain in a normal state, thereby realizing high availability of the cluster monitoring module.

[0124] Step 306, if any one of the first service process, the second service process and the third service process is abnormal, an alarm is given to ensure high availability of the cluster monitoring module.

[0125] In the embodiments of the present application, after the global monitoring submodule monitors the service monitoring submodule, the threshold monitoring submodule and the information storage submodule, and obtains the first service process corresponding to the service monitoring submodule, the second service process corresponding to the threshold monitoring submodule and the third service process corresponding to the information storage submodule, if any one of the first service process, the second service process and the third service process is abnormal, an alarm is given.

[0126] In the embodiments of the present application, through the monitoring of the first service process, the second service process and the third service process by the global monitoring module, when the process is abnormal, the abnormal condition is alarmed, the cluster management personnel is informed to maintain, and the high availability of the cluster monitoring module is ensured.

[0127] Figure 12 The composition structure of the MooseFS system provided in the embodiments of the present application is shown Figure 4 As shown in Figure 12 In the embodiments of the present application, the MooseFS system can include a master server, a backup server, a data node, a switch, a cluster monitoring module and a client application.

[0128] In the embodiments of the present application, the master server and the backup server form a master-backup high-availability module, and the high-availability function between the master server and the backup server is mainly realized by Ucarp and virtual IP technology. The virtual IP technology provides a floating access point between the application and the data node, and the connection and interaction between the application and the data node are not affected during the master-backup switching.

[0129] In the embodiments of the present application, the backup server can synchronize the metadata of the master server in real time, adopts Rsync and Sersync architecture, Sersync records any change of a file or a directory name under the monitored directory, and Rsync is responsible for real-time transmission of files. In this way, under the cooperation of Rsync and Sersync architecture, the changed files or directories can be synchronized, not only the transmission rate is high, but also the purpose of real-time synchronization and backup of metadata is achieved, effectively preventing the problem of metadata loss of the backup server caused by the failure of the master-backup server synchronization metadata mechanism.

[0130] In the embodiments of the present application, the switch is used to connect the servers and assist the servers to complete the work of data receiving and forwarding. The switch in the present application uses double network cards, so that the failure of any switch will not affect the normal use of the system, and the availability of the switch is improved.

[0131] In the embodiments of the present application, the data node uses double network card binding technology, which not only can improve the network transmission speed, but also can ensure that when one of the network cards fails, normal and efficient work can still be realized. For example, when one of the network cards of a data node fails, the other network card immediately takes over all the load, so that the service is not interrupted, and waits for the subsequent maintenance of the maintenance personnel, thereby ensuring the normal use of the whole system.

[0132] In the embodiments of the present application, the cluster monitoring module comprises a service monitoring submodule, a threshold monitoring submodule, an information storage submodule, and a global monitoring submodule. The cluster monitoring module is used to monitor the master server, the backup server, and the data nodes, and to realize the overall high availability of the MooseFS system.

[0133] The embodiments of the present application provide a server switching method, a MooseFS system, and a storage medium. The MooseFS system comprises a master server, a backup server, and a cluster monitoring module. When the backup server monitors that the master server is running abnormally, the backup server sends a query request to the cluster monitoring module. The query request carries identification information of the master server. The cluster monitoring module determines first service information corresponding to the master server according to the identification information. The first service information represents the actual running state of the master server. The cluster monitoring module sends a query response to the backup server. The query response carries the first service information. The master server and the backup server determine whether to perform server switching according to the first service information. That is, in the embodiments of the present application, when the backup server in the MooseFS system determines that the current state of the master server is abnormal, the backup server does not directly perform server switching processing, but first acquires the first service information corresponding to the master server through the cluster monitoring module, determines the actual running state of the master server through the first service information, and then determines whether to perform server switching processing. It can be seen that if an abnormal situation such as communication interruption between the master node and the backup node occurs in the process in which the master node normally manages the entire MooseFS system, the MooseFS system can prevent the backup node from making a false judgment on the state of the master node and competing for resources and services, thereby avoiding the state confusion and data damage of the MooseFS system, and ensuring the high availability of the MooseFS system.

[0134] Embodiment five

[0135] Based on the server switching method provided in the above embodiments one to four, as shown in the foregoing Figure 1 The embodiments of the present application provide a MooseFS system 10, which comprises a master server 11, a backup server 12, and a cluster monitoring module 13, wherein:

[0136] The master server is configured to manage the MooseFS system and perform data transmission with the data nodes.

[0137] The backup server is configured to monitor the running state of the master server and save the metadata in the master server.

[0138] The cluster monitoring module is configured to monitor the actual running states of the master server and the data nodes.

[0139] Figure 13 Structure diagram of MooseFS system proposed in embodiments of the present application Figure 5 As shown in Figure 13 The MooseFS system 10 proposed in embodiments of the present application includes a sending unit 15, a determining unit 16, and an executing unit 17.

[0140] The sending unit 15 is configured to send a query request to the cluster monitoring module when the backup server monitors that the primary server is abnormal; wherein the query request carries identification information of the primary server.

[0141] The determining unit 16 is configured to determine first service information corresponding to the primary server according to the identification information by the cluster monitoring module; wherein the first service information represents an actual running state of the primary server.

[0142] Further, the sending unit 15 is further configured to send a query response to the backup server by the cluster monitoring module; wherein the query response carries the first service information.

[0143] The determining unit 16 is further configured to determine whether to perform server switching according to the first service information by the primary server and the backup server.

[0144] The executing unit 17 is configured to not perform server switching processing by the primary server and the backup server if the first service information is normal.

[0145] Further, the executing unit 17 is further configured to perform server switching processing by the primary server and the backup server if the first service information is abnormal.

[0146] In embodiments of the present application, further, as shown in Figure 13 The MooseFS system proposed in embodiments of the present application can further include an obtaining unit 18.

[0147] The obtaining unit 18 is configured to obtain at least one service state corresponding to at least one service by a node service monitoring submodule based on a heartbeat monitoring mechanism for service state monitoring of the primary server.

[0148] Further, in embodiments of the present application, the determining unit 16 is specifically configured to determine that the current service state is normal if all the at least one service state is normal; and determine that the current service state is abnormal if any one of the at least one service state is abnormal.

[0149] In embodiments of the present application, further, as shown in Figure 13 The MooseFS system proposed in embodiments of the present application can further include an alarm unit 19.

[0150] The alarm unit 19 is configured to perform alarm processing if the first state parameter is greater than the first preset state threshold; wherein the first state parameter is used to monitor the motion state of the master server.

[0151] Further, in the embodiment of the present application, the acquisition unit 18 is further configured to acquire, by the threshold monitoring submodule, the first state parameter corresponding to the master server.

[0152] In the embodiment of the present application, further, as shown in Figure 13 The MooseFS system provided in the embodiment of the present application can further include a receiving unit 110 and a storage unit 111.

[0153] The receiving unit 110 is configured to receive, by the information storage submodule, the first service information corresponding to the master server sent by the service monitoring submodule.

[0154] The storage unit 111 is configured to store the first service information.

[0155] Further, in the embodiment of the present application, the acquisition unit 18 is further configured to acquire, by the cluster monitoring module, the first service information of the master server stored by the information storage submodule; and the cluster monitoring module performs checking processing according to the heartbeat maintenance file and the first service information to obtain a checking result.

[0156] Further, in the embodiment of the present application, the determination unit 16 is further configured to determine that the current service state of the master server is normal if the checking result is checking success; and determine that the first service information corresponding to the master server is abnormal if the checking result is checking failure.

[0157] In the embodiment of the present application, further, as shown in Figure 13 The MooseFS system provided in the embodiment of the present application can further include a monitoring unit 112.

[0158] The monitoring unit 112 is configured to monitor, by the global monitoring submodule, the service monitoring submodule, the threshold monitoring submodule and the information storage submodule to obtain the first service process corresponding to the service monitoring submodule, the second service process corresponding to the threshold monitoring submodule, and the third service process corresponding to the information storage submodule.

[0159] Further, in the embodiment of the present application, the alarm unit 19 is further configured to perform alarm processing if any one of the first service process, the second service process and the third service process is abnormal.

[0160] Further, in the embodiment of the present application, the acquisition unit 18 is further configured to monitor, by the service monitoring submodule, the data node based on the heartbeat monitoring mechanism to acquire the second service information corresponding to the data node.

[0161] Further, in the embodiment of the present application, the execution unit 17 is further used for pulling up the second service if the second service state is suspended, and performing alarm processing if the second service state is unable to be started again.

[0162] Further, in the embodiment of the present application, the acquisition unit 18 is further used for the threshold monitoring submodule to acquire the second state parameter of the data node.

[0163] Further, in the embodiment of the present application, the execution unit 17 is further used for performing alarm processing if the second state parameter is greater than the second preset state threshold.

[0164] Further, in the embodiment of the present application, the receiving unit 110 is further used for the information storage submodule to receive the second service information corresponding to the data node sent by the service monitoring submodule.

[0165] Further, in the embodiment of the present application, the storage unit 111 is further used for storing the second service information.

[0166] Figure 14 The MooseFS system structure diagram provided by the embodiment of the present application Figure 6 As shown in Figure 14 The MooseFS system provided by the present application further includes a processor 113, a memory 114 storing executable instructions of the processor 113, a communication interface 115, and a bus 116 for connecting the processor 113, the memory 114 and the communication interface 115.

[0167] In the embodiments of the present application, the processor 113 can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that, for different devices, the electronic device used to implement the functions of the processor can also be other devices, and the embodiments of the present application are not limited specifically. The memory 114 can also be included, which can be connected with the processor 113, wherein the memory 114 is used to store executable program codes, the program codes including computer operation instructions, and the memory 114 can include a high-speed RAM memory and can also include a non-volatile memory, for example, at least two disk memories.

[0168] In the embodiments of the present application, the bus 116 is used to connect the communication interface 115, the processor 113, and the memory 114, and the mutual communication among these devices.

[0169] In the embodiments of the present application, the memory 114 is used to store instructions and data.

[0170] Further, in the embodiments of the present application, the processor 113 is used to send a query request to the cluster monitoring module when the backup server monitors that the main server is abnormal; wherein the query request carries identification information of the main server; the cluster monitoring module determines first service information corresponding to the main server according to the identification information; wherein the first service information represents an actual running state of the main server; the cluster monitoring module sends a query response to the backup server; wherein the query response carries the first service information; and the main server and the backup server determine whether to perform server switching according to the first service information.

[0171] In practical applications, the memory 114 can be a volatile memory, such as a random-access memory (RAM), or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), or a combination of the above types of memories, and provides instructions and data to the processor 111.

[0172] In addition, each functional module in the embodiment can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional module.

[0173] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiment can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the embodiment method. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0174] The embodiment of the application provides a server switching method, a MooseFS system and a storage medium. The MooseFS system comprises a master server, a backup server and a cluster monitoring module. When the backup server monitors that the master server is abnormal, the backup server sends a query request to the cluster monitoring module. The query request carries identification information of the master server. The cluster monitoring module determines first service information corresponding to the master server according to the identification information. The first service information represents an actual running state of the master server. The cluster monitoring module sends a query response to the backup server. The query response carries the first service information. The master server and the backup server determine whether to perform server switching according to the first service information. That is, in the embodiment of the application, when the backup server in the MooseFS system determines that the current state of the master server is abnormal, the backup server does not directly perform server switching processing, but first acquires the first service information corresponding to the master server through the cluster monitoring module, determines the actual running state of the master server through the first service information, and then determines whether to perform server switching processing. It can be seen that if abnormal conditions such as communication interruption between the master node and the backup node occur in the process in which the master node normally manages the entire MooseFS system, the MooseFS system can prevent the backup node from making a false judgment on the state of the master node and competing for resources and services, thereby avoiding state confusion and data damage of the MooseFS system, and ensuring high availability of the MooseFS system.

[0175] The embodiment of the application provides a first computer readable storage medium, which stores a program. The program is executed by a first processor to implement the method in the first embodiment to the fourth embodiment.

[0176] Specifically, the program instructions of the server switching method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the server switching method in the storage medium are read by an electronic device or executed, the following steps are included:

[0177] When the backup server monitors that the master server is abnormal, the backup server sends a query request to the cluster monitoring module. The query request carries identification information of the master server.

[0178] The cluster monitoring module determines first service information corresponding to the master server according to the identification information. The first service information represents an actual running state of the master server.

[0179] The cluster monitoring module sends a query response to the backup server. The query response carries the first service information.

[0180] The main server and the backup server determine whether to perform server switching according to the first service information.

[0181] Those skilled in the art will understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage, etc.) containing computer-usable program code.

[0182] The present application is described with reference to the implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce an apparatus for implementing the functions specified in the flowcharts and / or block diagrams, the flows and / or blocks, or the combination of the flows and / or blocks. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one flow or multiple flows and / or blocks

[0183] These computer program instructions can also be stored in a computer-readable memory capable of causing the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatuses, which implement the functions specified in the flowcharts and / or block diagrams, the flows and / or blocks, or the combination of the flows and / or blocks. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one flow or multiple flows and / or blocks

[0184] These computer program instructions can also be loaded into the computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable devices to produce a computer-implemented process, so that the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in the flowcharts and / or block diagrams, the flows and / or blocks, or the combination of the flows and / or blocks. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one flow or multiple flows and / or blocks

[0185] The above description is only for the preferred embodiments of the present application, and is not used to limit the protection scope of the present application.

Claims

1. A server switching method, characterized by, The server switching method is applied to a distributed file system MooseFS system, and the MooseFS system comprises a master server, a backup server and a cluster monitoring module, and the method comprises the following steps: When the backup server monitors that the master server is abnormal, a query request is sent to the cluster monitoring module, wherein the query request carries identification information of the master server; The cluster monitoring module determines first service information corresponding to the master server according to the identification information, wherein the first service information represents an actual running state of the master server; The cluster monitoring module sends a query response to the backup server, wherein the query response carries the first service information; The master server and the backup server determine whether to perform server switching according to the first service information; The cluster monitoring module comprises a threshold monitoring submodule, and the method further comprises the following steps: The threshold monitoring submodule obtains a first state parameter corresponding to the master server; If the first state parameter is greater than a first preset state threshold, an alarm processing is performed, wherein the first state parameter is used for monitoring the running state of the master server.

2. The method of claim 1, wherein, The master server and the backup server determine whether to perform server switching according to the first service information, comprising: If the first service information received by the backup server is normal, the master server and the backup server do not perform server switching processing; If the first service information received by the backup server is abnormal, the master server and the backup server perform server switching processing.

3. The method of claim 1, wherein, The cluster monitoring module further comprises a service monitoring submodule, and the cluster monitoring module determines the first service information corresponding to the master server according to the identification information, comprising: The service monitoring submodule performs service state monitoring on the master server based on a heartbeat monitoring mechanism to obtain at least one service information corresponding to at least one service, wherein one service corresponds to one service information; If all the at least one service information is normal, it is determined that the first service information is normal; If any one of the at least one service information is abnormal, it is determined that the first service information is abnormal.

4. The method of claim 3, wherein, The cluster monitoring module further comprises an information storage submodule, and the method further comprises the following steps: The information storage submodule receives the heartbeat monitoring file corresponding to the master server sent by the service monitoring submodule and stores the heartbeat monitoring file.

5. The method of claim 4, wherein, The query request further carries a heartbeat maintenance file of the master server, and the cluster monitoring module determines the first service information corresponding to the master server according to the identification information, comprising: The cluster monitoring module obtains the heartbeat monitoring file corresponding to the master server stored by the information storage submodule; The cluster monitoring module performs verification processing according to the heartbeat maintenance file and the heartbeat monitoring file to obtain a verification result; If the verification result is verification success, it is determined that the first service information corresponding to the master server is normal; If the check result is a check failure, it is determined that the first service information corresponding to the master server is abnormal.

6. The method of claim 5, wherein, The cluster monitoring module further comprises a global monitoring submodule, and the method further comprises: The global monitoring submodule monitors the service monitoring submodule, the threshold monitoring submodule, and the information storage submodule, and obtains a first service process corresponding to the service monitoring submodule, a second service process corresponding to the threshold monitoring submodule, and a third service process corresponding to the information storage submodule; If any one of the first service process, the second service process, and the third service process is abnormal, an alarm process is performed to ensure high availability of the cluster monitoring module.

7. The method of claim 3, wherein, The MooseFS system further comprises a data node, and the method further comprises: The service monitoring submodule monitors the data node based on a heartbeat monitoring mechanism, and obtains second service information corresponding to the data node; If the second service information is suspended, a service pull-up process is performed, and the data node is monitored again to obtain updated second service information; If the updated second service information is suspended, an alarm process is performed.

8. A MooseFS system for performing the server switchover method of claim 1, characterized by The MooseFS system comprises a master server, a backup server, and a cluster monitoring module, wherein The master server is configured to manage the MooseFS system and perform data transmission with a data node; The backup server is configured to monitor a running state of the master server and save metadata in the master server; The cluster monitoring module is configured to monitor actual running states of the master server and the data node; The cluster monitoring module comprises a threshold monitoring submodule. The threshold monitoring submodule is configured to obtain a first state parameter corresponding to the master server, and perform an alarm process if the first state parameter is greater than a first preset state threshold; the first state parameter is used to monitor a running state of the master server.

9. A MooseFS system, characterized by The MooseFS system comprises a master server, a backup server, and a cluster monitoring module, and further comprises a processor and a memory storing processor-executable instructions; when the instructions are executed by the processor, the method of any one of claims 1-7 is implemented.

10. A computer readable storage medium having stored thereon a program for use in a MooseFS system, the MooseFS system comprising: A master server, a backup server, and a cluster monitoring module, wherein the program is executed by a processor to implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for implementing high availability cluster based on quorum disk and dual link

    CN109495312A