Health examination method and device, electronic equipment and readable storage medium

By obtaining and issuing health check strategies in the health check system, and reporting only the host whose health check results differ from the previous one, the problems of large amount of data and low transmission rate in the health check reporting process in the existing technology are solved, and more efficient resource utilization and transmission rate improvement are achieved.

CN119829358APending Publication Date: 2025-04-15CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411725876.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When reporting the process, the existing health check mechanism reports a large amount of information to the database without filtering, affecting the transmission rate and increasing the computing resource consumption of upstream components of the console.

Method used

By obtaining the health check policy to be configured from the database, sending it to the data plane, and obtaining the health check results of the backend host after the configuration takes effect, only the host whose health check results are different from the previous result is reported to achieve different reporting.

Benefits of technology

It effectively reduces the amount of reported data, improves the transmission rate, and reduces the consumption of computing resources in the console.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829358A_ABST
    Figure CN119829358A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a health examination method and device, electronic equipment and a readable storage medium. The health examination method comprises the steps that a to-be-configured health examination strategy is acquired from a database; issuing a to-be-configured health examination strategy to the data plane; under the condition of determining that the configuration of the to-be-configured health examination strategy on the data plane takes effect, obtaining a current health examination result and a previous health examination result of a plurality of back-end hosts in the data plane; under the condition that a target host of which the current health examination result is different from the last health examination result exists in the plurality of back-end hosts, obtaining the current health examination result of the target host; and the health examination result of the target host is reported to the console, so that the transmission efficiency is improved, and the computing resource consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a health examination method, device, electronic equipment and readable storage medium. Background Art

[0002] Load balancing is a key network communication technology that aims to distribute the load of computer resources, including disks, CPUs, and network connections, through different algorithms to achieve optimal resource utilization. In the load balancing system, health checks play a vital role. Health checks can dynamically remove or add backend machines based on the health check status of the backend host and the load balancing algorithm to ensure that all backend hosts are available, thereby improving the high availability of the system and achieving the best load effect.

[0003] During the health check, health check rules including health check network protocol, health check interval, healthy threshold, unhealthy threshold and health check target are specified. These rules are pulled from the database by the controller, converted into corresponding configurations and sent to the data plane to take effect, and the health check results are obtained. The configuration delivery process starts with the notification of the upstream component in the console. The controller will pull the corresponding resources and compare them with the resources in the local cache to determine whether the configuration needs to be changed. The health check results are reported to the database by the load balancing controller. Users can monitor the status of the backend host in real time through the console to detect and handle problems in a timely manner.

[0004] However, the existing health check mechanism reports a large amount of information to the database without filtering during the reporting process, which not only affects the transmission rate, but also increases the computing resource consumption of upstream components in the console. Summary of the invention

[0005] The present invention provides a health check method, device, electronic device and readable storage medium to solve the problem that the existing health check mechanism reports a large amount of information to the database without screening during the reporting process, which not only affects the transmission rate but also increases the computing resource consumption of the upstream components in the console.

[0006] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0007] In a first aspect, the present invention provides a health examination method, the method comprising:

[0008] Get the health check policy to be configured from the database;

[0009] Send the health check policy to be configured to the data plane;

[0010] When it is determined that the health check policy to be configured is effective in the configuration of the data plane, obtaining the current health check result and the previous health check result of several backend hosts in the data plane;

[0011] If there is a target host whose current health check result is different from the previous health check result among the plurality of backend hosts, obtaining the current health check result of the target host;

[0012] The health check result of the target host is reported to the console.

[0013] Optionally, the health check strategy includes at least one of a health check time interval, a health check target, a health check protocol, a health check retry count, and an Internet protocol and port for the health check;

[0014] The step of obtaining the health check strategy to be configured from the database includes:

[0015] In response to a user's creation or modification operation on a health check policy in a console, obtaining a health check policy to be configured;

[0016] Sending a creation completion notification or a modification completion notification to the database through the console, so that the database obtains the health check policy to be configured according to the first identity identifier and the first version information, and sends a configuration notification carrying the first identity identifier and the first version information to the controller, wherein the creation completion notification or the modification completion notification carries the first identity identifier and the first version information of the health check policy to be configured;

[0017] The health check policy to be configured is obtained from the database through the first identity identifier and the first version information.

[0018] Optionally, after sending the health check policy to be configured to the data plane, the method further includes:

[0019] Obtaining the configuration status of the data plane regarding the health check policy to be configured;

[0020] If the configuration is successful, the local cache is updated using the health check policy to be configured;

[0021] If the configuration is unsuccessful, the local cache will not be updated.

[0022] Optionally, updating the local cache by using the health check policy to be configured includes:

[0023] Obtain the historical health check policy in the local cache, the second identity identifier and the second version information of the historical health check policy;

[0024] Retrieving the first identity identifier of the health check policy to be configured from the second identity identifier of the historical health check policy;

[0025] If a consistent target identity is retrieved, the target historical health check policy corresponding to the target identity is updated to the health check policy to be configured, and the second version information of the target historical health check policy is updated to the first version information of the health check policy to be configured;

[0026] If no consistent identity is found during the search, the health check policy to be configured carrying the first identity and the first version information is stored in a local cache.

[0027] Optionally, after not updating the local cache if the configuration is unsuccessful, the method further includes:

[0028] Obtain the full health check strategy from the database and local cache according to the preset period;

[0029] If there is a difference between the full health check policy in the database and the local cache, the health check policy to be configured is re-acquired from the database and sent to the data plane.

[0030] Optionally, after obtaining the current health check result and the previous health check result of the plurality of backend hosts in the data plane, the step includes:

[0031] If there is no target host among the plurality of backend hosts whose health check result is different from the previous health check result, the health check result will not be reported.

[0032] Optionally, after reporting the health check result of the target host to the console, the method further includes:

[0033] The health check result is stored in the local cache.

[0034] In a second aspect, the present invention provides a health examination device, the device comprising:

[0035] The first acquisition module is used to obtain the health check policy to be configured from the database;

[0036] A sending module, used for sending the health check policy to be configured to the data plane;

[0037] A second acquisition module is used to obtain the current health check result and the previous health check result of several backend hosts in the data plane when it is determined that the health check policy to be configured is effective in the configuration of the data plane;

[0038] A third acquisition module is used to acquire the current health check result of the target host when there is a target host whose current health check result is different from the previous health check result among the plurality of the backend hosts;

[0039] The reporting module is used to report the health check result of the target host to the console.

[0040] In a third aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned health check method when executing the program.

[0041] In a fourth aspect, the present invention provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-mentioned health check method.

[0042] In an embodiment of the present invention, a health check policy to be configured is obtained from a database; the health check policy to be configured is sent to the data plane; when it is determined that the configuration of the health check policy to be configured on the data plane is effective, the current health check result and the previous health check result of several backend hosts in the data plane are obtained; information is obtained only when it is determined that the configuration is effective, so as to avoid obtaining invalid information and wasting computing resources. When there is a target host whose current health check result is different from the previous health check result among several backend hosts, the current health check result of the target host is obtained; the current health check result of the target host is reported to the console, and the configuration of the health check policy to be configured on the data plane is checked to avoid obtaining invalid information and wasting computing resources. At the same time, the health check results are differentially reported by comparison, which not only greatly improves the transmission rate but also reduces the consumption of computing resources in the console. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 is an interactive flow chart of a health check method provided by an embodiment of the present invention;

[0045] Figure 2 is a flowchart of the steps of a health examination method provided by an embodiment of the present invention;

[0046] Figure 3 yes Figure 2The flowchart of step 101 in a health examination method provided by an embodiment of the present invention is shown;

[0047] Figure 4 yes Figure 2 A flow chart of issuing a health check strategy in a health check method provided by an embodiment of the present invention is shown;

[0048] Figure 5 yes Figure 2 A flow chart of reporting health check results in a health check method provided by an embodiment of the present invention is shown;

[0049] Figure 6 is a structural diagram of a health examination device provided by an embodiment of the present invention;

[0050] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] The current health check is implemented by a "control-transmission separation" architecture, such as Figure 1 As shown, the user operates the health check in the console, including creating a health check policy or modifying the information in the health check policy. After the creation or modification is completed, the new health check policy is sent to the database. The controller will periodically pull the health check policy from the database and compare it with the content of the local cache. If there is a new health check policy, it will be pulled, and then the new health check policy will be sent to the data plane. The new health check policy sent will be executed in the data plane. After the execution is completed, the execution result will be reported to the controller. At the same time, the controller will also pull the health check policy from the database and the data plane respectively to compare with the content of the local cache to ensure the consistency of the data. The controller will report the obtained execution result to the database, and report the execution result to the console through the database for display. However, the information reported to the console by the above method for the execution result of the health check policy is unfiltered, and the data volume is large, which affects the transmission rate. In addition, in the process of the controller sending the health check policy configuration, in order to ensure the consistency of the upstream and downstream data, the upstream and downstream are periodically pulled and then compared with the local cache. The periodic pulling will affect the performance of the controller, and there is redundancy in the upstream and downstream caches. Based on this, an embodiment of the present invention proposes a health check method.

[0053] Reference Figure 2 , Figure 2 is a flowchart of a health check method provided by an embodiment of the present invention, such as Figure 2 As shown, the method may include:

[0054] Step 101: Obtain the health check policy to be configured from the database.

[0055] In the embodiment of the present invention, the health check strategy includes at least one of the time interval of the health check, the target of the health check, the protocol of the health check, the number of retries of the health check, and the Internet protocol and port of the health check. Among them, the health check strategy to be configured is generated in the console, that is, the user creates or modifies the health check strategy on the console (for example, the management interface) according to his own needs, and sends a notification to the database after completion. The update message of the subscription console can also be pre-set in the database. The sent notification contains the first identity (for example, the policy ID) and the first version information (for example, the version number) of the health check strategy to be configured, so that the database can identify and manage these strategies. After receiving the notification, the database parses the notification message, obtains the corresponding health check strategy from the database according to the identity and version information therein, and then generates a new configuration notification, including the identity and version information of the strategy, and sends it to the controller. The controller parses the configuration notification and requests the corresponding health check strategy from the database according to the identity and version information therein.

[0056] Further, step 101, such as Figure 3 As shown:

[0057] Step 1011, in response to the user's creation operation or modification operation on the health check policy in the console, obtain the health check policy to be configured.

[0058] Step 1012, sending a creation completion notification or a modification completion notification to the database through the console, so that the database obtains the health check policy to be configured based on the first identity identifier and the first version information, and sends a configuration notification carrying the first identity identifier and the first version information to the controller, wherein the creation completion notification or the modification completion notification carries the first identity identifier and the first version information of the health check policy to be configured.

[0059] Step 1013: Obtain the health check policy to be configured from the database through the first identity identifier and the first version information.

[0060] For example, suppose a user creates a new health check policy on the console, configures the check frequency to be once every 5 minutes, and the check target is server A, and generates the first identity "12345" and the first version information "1.0" for it. A creation completion notification is generated based on the above content, and the field information included in the notification is: action": "create", "policy_id": "12345", "version": "1.0", "policy_config": "check_frequency": "5minutes", "check_target": "serverA". After receiving the notification, the database parses the notification content, accurately obtains the corresponding health check policy from the console according to "policy_id" and "version", and generates a configuration notification at the same time. The field information included in the notification is: "policy_id": "12345", "version": "1.0", "action": "configure". After receiving the configuration notification, the controller parses the notification content and requests the corresponding health check policy from the database according to "policy_id" and "version".

[0061] Through the above steps, the health check policy to be configured can be accurately and effectively transmitted, which facilitates the subsequent accurate and effective execution of corresponding operations based on the health check policy created or modified by the user on the console.

[0062] Step 102: Send the health check policy to be configured to the data plane.

[0063] The embodiment of the present invention is applied to a controller. After the controller obtains the health check policy to be configured from the database, it first converts the format of the policy into the data format required by the data plane, and then sends it to the data plane for execution. Then the execution result is obtained from the data plane. However, in some special cases, an exception may occur in the sending process, resulting in a failure to send. When configuring the health check policy to be configured on the data plane, an exception may also occur. These will cause the current health check policy configuration of the data plane to fail, thereby affecting the execution result. In order to avoid obtaining meaningless execution results, it is necessary to first confirm whether the data plane (for example, network equipment, server, host, etc.) has successfully applied the policy. Therefore, the controller sends a query request to the data plane to obtain the current health check policy configuration of the data plane. The controller checks the configuration status returned by the data plane. If the status is "configured" (successful configuration), the health check policy information in the local cache is updated to ensure that the cache is consistent with the actual configuration. If the status is not "configured" (unsuccessful configuration), the local cache is not updated to avoid inconsistency between the cache and the actual configuration. The specific steps include:

[0064] Obtain the configuration status of the health check policy to be configured on the data plane;

[0065] If the configuration is successful, the local cache is updated through the health check policy to be configured;

[0066] If the configuration is unsuccessful, the local cache will not be updated.

[0067] Through the above steps, the system can effectively confirm whether the data plane has successfully applied the health check policy, and update or not update the local cache according to the configuration results. Specifically, the system first queries the data plane for the current health check policy configuration, and then decides whether to update the local cache based on the query results. If the configuration is successful, the local cache is updated; if the configuration is unsuccessful, the local cache is not updated to ensure that the cache is consistent with the actual configuration.

[0068] It should be noted that after determining that the health check policy to be configured is successfully configured in the data plane, the controller needs to modify the local cache configuration to ensure that the cache is consistent with the actual configuration. When configuring the cache, it is necessary to obtain the historical health check policies already in the local cache and extract the second identity identifiers (e.g., policy ID) and second version information (e.g., version number) of these policies for subsequent retrieval and update operations. Compare the first identity identifier (e.g., policy ID) of the health check policy to be configured with the second identity identifier of the historical health check policy in the local cache to find out whether there is a consistent identity identifier. If the historical health check policy corresponding to the target identity identifier is found, it is determined that the content of this historical health check policy has been updated at this time, so its configuration information is updated to the configuration information of the health check policy to be configured, and the version information is updated to the version information of the health check policy to be configured. If the retrieved health check policy to be configured does not exist in the local cache, the health check policy to be configured carrying the first identity identifier and the first version information needs to be stored in the local cache. The specific steps include:

[0069] Obtain the historical health check policy in the local cache, the second identity identifier and the second version information of the historical health check policy;

[0070] Retrieve the first identity identifier of the health check policy to be configured from the second identity identifiers of the historical health check policies;

[0071] If a consistent target identity is retrieved, the target historical health check policy corresponding to the target identity is updated to the health check policy to be configured, and the second version information of the target historical health check policy is updated to the first version information of the health check policy to be configured;

[0072] If no consistent identity is found during the search, the health check policy to be configured carrying the first identity and the first version information is stored in the local cache.

[0073] For example, all historical health check policies are read from the local cache. The field information includes: ["policy_id":"12345","version":"1.0","check_frequency":"5minutes","check_target":"serverA"], ["policy_id":"67890","version":"2.0","check_frequenc y":"10minutes","check_target":"serverB"]. Assume that the "policy_id":"12345","version":"2.0" of the health check policy to be configured is, and the first identifier "12345" of the health check policy to be configured is compared with the second identifier of the historical health check policy in the local cache. It is found that the historical health check policy with the identifier "12345" exists in the local cache. Its configuration information is updated to the configuration information of the health check policy to be configured, and the version information is updated to "2.0". Assume that the "policy_id":"54321","version":"1.0" of the health check policy to be configured, because no consistent identity is retrieved, the health check policy to be configured carrying the first identity "54321" and the first version information "1.0" is stored in the local cache.

[0074] In this way, the system can ensure that the policies in the local cache are consistent with the actual configuration. At the same time, by flexibly expanding new policies, the system can adapt to changing needs and can also achieve minimal modifications, making the system more efficient, reliable and flexible in managing health check policies.

[0075] In addition, after determining that the health check policy to be configured is not successfully configured in the data plane, the embodiment of the present invention will continue to configure the data plane. However, during configuration, it is necessary to determine whether reconfiguration is required, so the embodiment of the present invention is set to obtain all health check policies from the database and the local cache according to a preset period (for example, every hour, every day, etc.), and compare the full health check policies in the database and the local cache. If a difference is found (for example, the full health check policy of the database and the full health check policy in the local cache have inconsistent versions of health check policies, indicating that there is a modified version of the health check policy that has not been issued normally, or the full health check policy of the database and the full health check policy in the local cache have inconsistent identity identifiers. Health check policies, indicating that there is a new version of the health check policy that has not been issued normally), then the difference part of the policy is re-obtained from the database, and these policies are issued to the data plane, and then the configuration of the data plane is checked again. If it fails, continue to perform the above operations until the configuration is completed. The specific steps include:

[0076] Obtain the full health check strategy from the database and local cache according to the preset period;

[0077] If there is a difference between the full health check policy in the database and the local cache, the health check policy to be configured is re-obtained from the database and sent to the data plane.

[0078] Through the above steps, the full health check policy in the database and local cache is regularly compared to ensure that they are consistent. If a difference is found, the system will re-obtain the policy of the different part from the database and send it to the data plane to ensure that the configuration of the data plane is consistent with that in the database, ensuring the stability and reliability of the system.

[0079] In addition, in the embodiment of the present invention, when comparing health check policies, it is only necessary to obtain the full health check policy from the database and compare it with the content of the local cache, without obtaining the full health check policy from the data plane. As a result, the database cache assumes the role of the data plane cache in the existing architecture, reducing the consumption of computing resources, and the full amount is pulled from the database component, and the comparison is performed to see whether the perception configuration is successfully issued, thereby ensuring the consistency of upstream and downstream data.

[0080] In summary, if Figure 4As shown, during the delivery process of the health check policy to be configured, first, the database delivers the health check policy to be configured to the controller, and the controller delivers the health check policy to be configured to the data plane. Then the controller checks whether the delivery of the health check policy to be configured on the data plane is successful. If successful, the local cache is configured. If unsuccessful, the health check policy is periodically pulled from the database and compared with the health check policy of the local cache. If a difference is found, the health check policy to be configured is re-delivered.

[0081] Step 103, when it is determined that the health check policy to be configured is effective in the data plane configuration, obtain the current health check results and the previous health check results of several backend hosts in the data plane.

[0082] In the embodiment of the present invention, after the configuration of the health check strategy to be configured takes effect on the data plane, it is determined that the data plane will generate an execution result according to the health check strategy to be configured. However, when reporting the execution result, it is not reported in full, but the health check result of this time is compared with the health check result of the previous time. If there is no difference, it is considered that the health check strategy to be configured this time will not cause new problems, and there is no need to report it at this time. The specific steps include:

[0083] If there is no target host among several backend hosts whose health check result differs from the previous health check result, the health check result will not be reported.

[0084] It should be noted that although the health check result is not reported, a check completion notification is still sent to inform the console that the health check was successfully completed to avoid other abnormalities that cause the console to be unable to receive messages, resulting in the console mistakenly believing that there is no problem with the health check, which in turn affects the load balancing of computer resources.

[0085] Step 104 , when there is a target host among the plurality of backend hosts whose health check result is different from that of the previous health check, the health check result of the target host is obtained.

[0086] In the embodiment of the present invention, the last health check result is stored in the local cache, and the last health check result is obtained from the local cache, and then the controller compares it with the current health check result, and determines that there is a difference, and then determines different target hosts with problems according to the difference results. Then only the current health check result of the target host is obtained.

[0087] It should be noted that when performing the first health check report, since the local cache does not contain the previous health check result, the first report is a full report, and subsequent reports are made based on the difference results, that is, only the current health check result of the target host is obtained for reporting.

[0088] Step 105: Report the health check result of the target host to the console.

[0089] In the embodiment of the present invention, only the health check result of the target host is reported to the console. The reporting process is as follows: Figure 5 As shown, the controller obtains the health check result from the data plane, compares the health check result with the previous health check result in the console, reports the difference, reports the difference report to the database, and sends it from the database to the console.

[0090] It should be noted that after each report, it will be backed up in the local cache to facilitate the comparison of subsequent health check results. The specific steps include:

[0091] Store the health check result in the local cache.

[0092] The above settings can reduce the amount of reported data, and the speed of comparison in memory is faster than the database component comparing from the database and then comparing in memory, thereby reducing the pressure on the database.

[0093] In an embodiment of the present invention, a health check policy to be configured is obtained from a database; the health check policy to be configured is sent to the data plane; when it is determined that the configuration of the health check policy to be configured on the data plane is effective, the current health check result and the previous health check result of several backend hosts in the data plane are obtained; information is obtained only when it is determined that the configuration is effective, so as to avoid obtaining invalid information and wasting computing resources. When there is a target host whose current health check result is different from the previous health check result among several backend hosts, the current health check result of the target host is obtained; the current health check result of the target host is reported to the console, and the configuration of the health check policy to be configured on the data plane is checked to avoid obtaining invalid information and wasting computing resources. At the same time, the health check results are differentially reported by comparison, which not only greatly improves the transmission rate but also reduces the consumption of computing resources in the console.

[0094] Figure 6 : is a structural diagram of a health examination device provided by an embodiment of the present invention, and the device may include:

[0095] The first acquisition module 201 is used to acquire the health check policy to be configured from the database.

[0096] The sending module 202 is used to send the health check policy to be configured to the data plane.

[0097] The second acquisition module 203 is used to acquire the current health check result and the previous health check result of several backend hosts in the data plane when it is determined that the health check policy to be configured is effective in the data plane.

[0098] The third acquisition module 204 is used to acquire the current health check result of the target host when there is a target host whose current health check result is different from the previous health check result among the plurality of backend hosts.

[0099] The reporting module 205 is used to report the health check result of the target host to the console.

[0100] Optionally, the health check strategy includes at least one of a health check time interval, a health check target, a health check protocol, a health check retry count, and a health check Internet protocol and port.

[0101] The first acquisition module 201 specifically includes:

[0102] The first acquisition submodule is used to acquire the health check policy to be configured in response to the user's creation operation or modification operation on the health check policy in the console.

[0103] The first sending submodule is used to send a creation completion notification or a modification completion notification to the database through the console, so that the database obtains the health check policy to be configured according to the first identity identifier and the first version information, and sends a configuration notification carrying the first identity identifier and the first version information to the controller, wherein the creation completion notification or the modification completion notification carries the first identity identifier and the first version information of the health check policy to be configured.

[0104] The second acquisition submodule is used to acquire the health check policy to be configured from the database through the first identity identifier and the first version information.

[0105] Optionally, the health check device further includes:

[0106] The fourth acquisition module is used to obtain the configuration status of the data plane regarding the health check policy to be configured.

[0107] The update module is used to update the local cache through the health check strategy to be configured if the configuration is successful.

[0108] Configuration module, used to not update the local cache if the configuration is unsuccessful.

[0109] Optionally, the update module specifically includes:

[0110] The third acquisition submodule is used to obtain the historical health check policy in the local cache, the second identity identifier and the second version information of the historical health check policy.

[0111] The first retrieval submodule is used to retrieve the first identity identifier of the health check policy to be configured from the second identity identifiers of the historical health check policies.

[0112] The first update submodule is used to update the target historical health check policy corresponding to the target identity to the health check policy to be configured if a consistent target identity is retrieved, and update the second version information of the target historical health check policy to the first version information of the health check policy to be configured.

[0113] The second updating submodule is used to store the health check policy to be configured carrying the first identity identifier and the first version information into the local cache if no consistent identity identifier is found in the retrieval.

[0114] Optionally, the health check device further includes:

[0115] The fifth acquisition module is used to obtain the full health check strategy from the database and local cache according to a preset period.

[0116] The sixth acquisition module is used to re-acquire the health check policy to be configured from the database if there is a difference between the full health check policy in the database and the local cache, and send the health check policy to be configured to the data plane.

[0117] The difference detection module is used to not report the health check result of this time if there is no target host among several backend hosts whose health check result of this time is different from that of the previous health check.

[0118] The storage module is used to store the health check results in the local cache.

[0119] In an embodiment of the present invention, a health check policy to be configured is obtained from a database; the health check policy to be configured is sent to the data plane; when it is determined that the configuration of the health check policy to be configured on the data plane is effective, the current health check result and the previous health check result of several backend hosts in the data plane are obtained; information is obtained only when it is determined that the configuration is effective, so as to avoid obtaining invalid information and wasting computing resources. When there is a target host whose current health check result is different from the previous health check result among several backend hosts, the current health check result of the target host is obtained; the current health check result of the target host is reported to the console, and the configuration of the health check policy to be configured on the data plane is checked to avoid obtaining invalid information and wasting computing resources. At the same time, the health check results are differentially reported by comparison, which not only greatly improves the transmission rate but also reduces the consumption of computing resources in the console.

[0120] The present invention also provides an electronic device, Figure 7 is a structural block diagram of an electronic device provided by an embodiment of the present invention, see Figure 7 , comprising a processor 301, a memory 302, and a computer program 3021 stored in the memory and executable on the processor, wherein when the processor executes the program, the following steps of the health check method are implemented:

[0121] Get the health check policy to be configured from the database;

[0122] Send the health check policy to be configured to the data plane;

[0123] When it is determined that the health check policy to be configured is effective in the configuration of the data plane, obtaining the current health check result and the previous health check result of several backend hosts in the data plane;

[0124] If there is a target host whose current health check result is different from the previous health check result among the plurality of backend hosts, obtaining the current health check result of the target host;

[0125] The health check result of the target host is reported to the console.

[0126] The present invention also provides a readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the health check method of the aforementioned embodiment.

[0127] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0128] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other equipment. According to the above description, it is obvious that the structure required for constructing such a system is. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for disclosing the best mode of the present invention.

[0129] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0130] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.

[0131] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0132] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0133] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0136] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0137] It should be noted that the various data-related processes in the embodiments of the present application are all carried out in compliance with the corresponding data protection laws and policies of the country where the device is located, and with the authorization given by the owner of the corresponding device.

Claims

1. A health examination method, characterized in that: The method comprises: Get the health check policy to be configured from the database; Send the health check policy to be configured to the data plane; When it is determined that the health check policy to be configured is effective in the configuration of the data plane, obtaining the current health check result and the previous health check result of several backend hosts in the data plane; If there is a target host whose current health check result is different from the previous health check result among the plurality of backend hosts, obtaining the current health check result of the target host; The health check result of the target host is reported to the console.

2. The method according to claim 1, characterized in that: The health check strategy includes at least one of a health check time interval, a health check target, a health check protocol, a health check retry count, and an Internet protocol and port for the health check; The step of obtaining the health check strategy to be configured from the database includes: In response to a user's creation or modification operation on a health check policy in a console, obtaining a health check policy to be configured; Sending a creation completion notification or a modification completion notification to the database through the console, so that the database obtains the health check policy to be configured according to the first identity identifier and the first version information, and sends a configuration notification carrying the first identity identifier and the first version information to the controller, wherein the creation completion notification or the modification completion notification carries the first identity identifier and the first version information of the health check policy to be configured; The health check policy to be configured is obtained from the database through the first identity identifier and the first version information.

3. The method according to claim 1, characterized in that: After sending the health check policy to be configured to the data plane, the method further includes: Obtaining the configuration status of the data plane regarding the health check policy to be configured; If the configuration is successful, the local cache is updated using the health check policy to be configured; If the configuration is unsuccessful, the local cache will not be updated.

4. The method according to claim 3, characterized in that: The updating of the local cache by the health check strategy to be configured includes: Obtain the historical health check policy in the local cache, the second identity identifier and the second version information of the historical health check policy; Retrieving the first identity identifier of the health check policy to be configured from the second identity identifier of the historical health check policy; If a consistent target identity is retrieved, the target historical health check policy corresponding to the target identity is updated to the health check policy to be configured, and the second version information of the target historical health check policy is updated to the first version information of the health check policy to be configured; If no consistent identity is found during the search, the health check policy to be configured carrying the first identity and the first version information is stored in a local cache.

5. The method according to claim 3, characterized in that: After the above-mentioned if the configuration is unsuccessful, the local cache is not updated, the following step is also included: Obtain the full health check strategy from the database and local cache according to the preset period; If there is a difference between the full health check policy in the database and the local cache, the health check policy to be configured is re-acquired from the database and sent to the data plane.

6. The method according to claim 1, characterized in that: After obtaining the current health check result and the previous health check result of the plurality of backend hosts in the data plane, the method includes: If there is no target host among the plurality of backend hosts whose health check result is different from the previous health check result, the health check result will not be reported.

7. The method according to claim 1, characterized in that: After reporting the health check result of the target host to the console, the method further includes: The health check result is stored in the local cache.

8. A health examination device, characterized in that: The device comprises: The first acquisition module is used to obtain the health check policy to be configured from the database; A sending module, used for sending the health check policy to be configured to the data plane; A second acquisition module is used to obtain the current health check result and the previous health check result of several backend hosts in the data plane when it is determined that the health check policy to be configured is effective in the configuration of the data plane; A third acquisition module is used to acquire the current health check result of the target host when there is a target host whose current health check result is different from the previous health check result among the plurality of the backend hosts; The reporting module is used to report the health check result of the target host to the console.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the health examination method as described in any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, causes the processors to execute the health examination method according to any one of claims 1 to 7.