CN113688021A - Load balancing service processing method, device, equipment and readable storage medium - Google Patents

Load balancing service processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113688021A
CN113688021A CN202110930460.4A CN202110930460A CN113688021A CN 113688021 A CN113688021 A CN 113688021A CN 202110930460 A CN202110930460 A CN 202110930460A CN 113688021 A CN113688021 A CN 113688021A
Authority
CN
China
Prior art keywords
load balancing
service
balancing service
process service
abnormal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110930460.4A
Other languages
Chinese (zh)
Other versions
CN113688021B (en
Inventor
张帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110930460.4A priority Critical patent/CN113688021B/en
Publication of CN113688021A publication Critical patent/CN113688021A/en
Application granted granted Critical
Publication of CN113688021B publication Critical patent/CN113688021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a load balancing service processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: detecting whether a load balancing service is configured in a node; if the load balancing service is configured, judging whether the target process service is normal; the target process service is a process service capable of prejudging the availability of the load balancing service; if the target process service is abnormal, determining that the load balancing service in the node is abnormal; and restarting the load balancing service to perform abnormal recovery on the load balancing service. According to the technical scheme disclosed by the application, the load balancing service abnormity can be automatically detected and detected in advance, the load balancing service is automatically restarted when the load balancing service is determined to be abnormal, so that the load balancing service can be automatically recovered abnormally, the load balancing service can be recovered normally in time, the availability of the load balancing service is ensured, and the stability and the reliability of the load balancing service are improved.

Description

Load balancing service processing method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing a load balancing service.
Background
Load balancing services are widely used because they can extend the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability. The high-level load balancing service provides domain name resolution service, and allocates IP for users according to a set balancing strategy during resolution, so that the balance of client services is realized.
The original advanced load balancing service comprises two process services, namely a pdns (Power DNS (Domain Name System)) process service and a loadbalance process service, wherein the pdns process service is a cross-platform open source DNS service component, and the loadbalance process service specifically provides Domain Name resolution and balance strategy service in the advanced load balancing service. The pdns process service receives a domain name request of a client and forwards the domain name request to the load balancing process service, and simultaneously manages the load balancing process service, including starting and stopping, and when the load balancing process service is abnormally quitted or the resolution is overtime, the pdns process service can pull up the load balancing process service again for recovery. If the load balancing service is abnormal, the service is always unavailable, but the service is generally discovered only after the load balancing service is unavailable at present, and the normal use of the load balancing service and the operation of the cluster are affected.
In summary, how to ensure the availability of the load balancing service to improve the stability and reliability of the load balancing service is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, a device and a readable storage medium for processing a load balancing service, so as to ensure availability of the load balancing service, so as to improve stability and reliability of the load balancing service.
In order to achieve the above purpose, the present application provides the following technical solutions:
a load balancing service processing method comprises the following steps:
detecting whether a load balancing service is configured in a node;
if the load balancing service is configured, judging whether the target process service is normal; the target process service is a process service capable of prejudging the availability of the load balancing service;
if the target process service is abnormal, determining that the load balancing service in the node is abnormal;
restarting the load balancing service to perform abnormal recovery on the load balancing service.
Preferably, the determining whether the target process service is normal includes:
judging whether pdns process service and load balancing process service are contained, whether the state of the pdns process service is normal or not and whether the state of the load balancing process service is normal or not;
and if any one of the lack of the pdns process service or the load balancing process service, the abnormal state of the pdns process service and the abnormal state of the load balancing process service is determined, determining that the target process service is abnormal.
Preferably, the determining whether the service state of the load balancing process is normal includes:
judging whether the time difference between the starting time of the load balancing process service and the current time is greater than or equal to a first threshold value or whether the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to a second threshold value;
and if the time difference between the starting time of the load balancing process service and the current time is greater than or equal to the first threshold, or the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to the second threshold, determining that the state of the load balancing process service is normal.
Preferably, after determining that there is an abnormality in the load balancing service in the node, the method further includes:
and recording the abnormal reason of the load balancing service in a log.
Preferably, after restarting the load balancing service to perform exception recovery on the load balancing service, the method further includes:
returning to the step of judging whether the target process service is normal or not;
counting the times of restarting the load balancing service within a preset time length;
and if the number of times of restarting the load balancing service within the preset time length reaches a third threshold value, sending a prompt.
Preferably, before determining whether the load balancing service is configured in the node, the method further includes:
judging whether the cluster is in a normal state or not;
if the cluster is in a normal state, judging whether the CTDB service is normal;
and if the CTDB service is normal, executing the step of judging whether the load balancing service is configured in the node.
Preferably, the detecting whether the load balancing service is configured in the node includes:
and detecting whether the load balancing service is configured in the node at regular time.
A load balancing service processing apparatus comprising:
the detection module is used for judging whether the nodes are configured with load balancing services or not;
the first judgment module is used for judging whether the target process service is normal or not if the load balancing service is configured; the target process service is a process service capable of prejudging the availability of the load balancing service;
a determining module, configured to determine that the load balancing service in the node is abnormal if the target process service is abnormal;
and the restarting module is used for restarting the load balancing service so as to perform abnormal recovery on the load balancing service.
A load balancing service processing apparatus comprising:
a memory for storing a computer program;
a processor for implementing the steps of the load balancing service processing method as claimed in any one of the above when executing the computer program.
A readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the load balancing service handling method according to any one of the preceding claims.
The application provides a load balancing service processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: detecting whether a load balancing service is configured in a node; if the load balancing service is configured, judging whether the target process service is normal; the target process service is a process service capable of prejudging the availability of the load balancing service; if the target process service is abnormal, determining that the load balancing service in the node is abnormal; and restarting the load balancing service to perform abnormal recovery on the load balancing service.
According to the technical scheme disclosed by the application, whether the load balancing service in the node is abnormal is determined by detecting whether the load balancing service is configured in the node and judging whether the process service capable of prejudging the availability of the load balancing service in the node is abnormal when the load balancing service is configured in the node, so that the load balancing service is automatically detected and detected in advance, and the load balancing service is conveniently found to be abnormal in time. When the process service capable of prejudging the availability of the load balancing service is determined to be abnormal, the load balancing service is considered to be abnormal, at the moment, the load balancing service is automatically restarted to automatically recover the load balancing service from the abnormality, so that the load balancing service can be recovered to be normal in time, the availability of the load balancing service is ensured, and the stability and the reliability of the load balancing service are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a load balancing service processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a load balancing service processing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a load balancing service processing device according to an embodiment of the present application.
Detailed Description
In the load balancing service, the pdns process service receives a domain name request of a client and forwards the domain name request to the load balancing process service, and simultaneously manages the load balancing process service, including starting and stopping, and the pdns service can also pull up the load balancing process service again when the load balancing process service abnormally exits or the resolution is overtime, which is very helpful for the reliability of the service. However, if the pdns process service itself is abnormal, the following abnormal scenario occurs: 1) the abnormal pdns causes the service of the load balancing process not to be pulled up after exiting; 2) the failure of the pdns process service causes the withdrawal of both the pdns process service and the load balancing service; 3) the abnormal communication between the PDSN process service and the load balancing process service is caused by the abnormal PDSN process service, the load balancing service process is repeatedly restarted by the PDSN process service, the load balancing service is unavailable, the load balancing service cannot be used under the abnormal scenes, and the fault detection and recovery function is not provided in the prior art, so that the load balancing service can be found by related personnel only when the load balancing service is unavailable, and the load balancing service can be always in an unavailable state if the related personnel cannot find the unavailable load balancing service in time.
Therefore, the application provides a load balancing service processing method, device, equipment and computer readable storage medium, which are used for ensuring the availability of the load balancing service so as to improve the stability and reliability of the load balancing service.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, which shows a flowchart of a load balancing service processing method provided in an embodiment of the present application, a load balancing service processing method provided in an embodiment of the present application may include:
s11: detecting whether a load balancing service is configured in a node; if yes, go to step S12;
in the present application, whether a load balancing service is configured in each node in a cluster may be detected, specifically, whether the load balancing service is configured in a detected node may be detected by checking whether a configuration file of the load balancing service (the configuration file is specifically:/etc/pns/loadbalance. xml) is configured in the node, if it is determined that the configuration file of the load balancing service is configured in the node, it is determined that the load balancing service is configured in the node, and if it is determined that the configuration file of the load balancing service is not configured in the node, it is determined that the load balancing service is not configured in the node, so as to improve convenience of configuration detection of the load balancing service.
In addition, when detecting whether the load balancing service is configured in the detection node by checking whether the configuration file of the load balancing service is configured in the node, specifically, whether a domain name and a corresponding IP are configured in the configuration file may be detected, and if the domain name and the corresponding IP are configured in the configuration file, it is determined that the load balancing service is configured in the node, otherwise, it is determined that the load balancing service is not configured in the node, so as to improve the efficiency of detecting the configuration of the load balancing service through the detection of the domain name and the corresponding IP. Specifically, whether a domain name is configured in the configuration file (if the keyword exists, it indicates that the domain name is configured) may be detected by detecting whether the keyword is "domain name", and whether a corresponding IP is configured in the configuration file (if the keyword exists, it indicates that the corresponding IP is configured) may be detected by detecting whether the keyword is "address".
In the above detection, if it is determined that the load balancing service is configured in the node, step S12 may be executed, and if it is determined that the load balancing service is not configured in the node, a prompt may be issued that the load balancing service is not configured in the current cluster.
S12: judging whether the target process service is normal or not; the target process service is a process service capable of prejudging the availability of the load balancing service; if not, step S13 is executed, and if yes, it is determined that the load balancing service in the node is not abnormal, and in this case, the step S12 may be executed again.
S13: and determining that the load balancing service in the node has an abnormity.
If it is determined that the load balancing service is configured in the node, whether the target process service is normal or not can be determined, wherein the target process service mentioned herein specifically refers to a process service capable of prejudging the availability of the load balancing service, that is, the process service capable of characterizing and prejudging the availability of the load balancing service by whether the target process service is normal or not, if the target process service is normal, it indicates that the load balancing service is not abnormal and the load balancing service is available, and if the target process service is abnormal, it indicates that the load balancing service is abnormal and an unavailable condition occurs subsequently, that is, it is determined whether the process service capable of prejudging the availability of the load balancing service is normal or not, so that the advance determination and the automatic determination of the unavailable condition of the load balancing service can be achieved.
It should be noted that the process services mentioned herein include, but are not limited to, a pdns service, and a load balancing process service.
S14: and restarting the load balancing service to perform abnormal recovery on the load balancing service.
If the load balancing service in the node is determined to be abnormal, the load balancing service can be automatically restarted to automatically recover the load balancing service from abnormality, namely the load balancing service can be recovered to be normal in time, so that the availability of the load balancing service is ensured, and the stability and the reliability of the load balancing service are improved. Because the restart time of the load balancing service is short and the restart has little influence on the load balancing service, the load balancing service can be abnormally recovered by executing a load-manager restart command (balance-manager restart).
According to the technical scheme disclosed by the application, whether the load balancing service in the node is abnormal is determined by detecting whether the load balancing service is configured in the node and judging whether the process service capable of prejudging the availability of the load balancing service in the node is abnormal when the load balancing service is configured in the node, so that the load balancing service is automatically detected and detected in advance, and the load balancing service is conveniently found to be abnormal in time. When the process service capable of prejudging the availability of the load balancing service is determined to be abnormal, the load balancing service is considered to be abnormal, at the moment, the load balancing service is automatically restarted to automatically recover the load balancing service from the abnormality, so that the load balancing service can be recovered to be normal in time, the availability of the load balancing service is ensured, and the stability and the reliability of the load balancing service are improved.
The load balancing service processing method provided in the embodiment of the present application, which is used for determining whether a target process service is normal, may include:
judging whether the pdns process service and the load balancing process service are contained, whether the state of the pdns process service is normal or not and whether the state of the load balancing process service is normal or not;
and if any one of the lack of any one of the pdns process service or the load balancing process service, the abnormal state of the pdns process service and the abnormal state of the load balancing process service is determined to exist, determining that the target process service is abnormal.
In this application, when determining whether the target process service is normal, it may be specifically determined whether the node includes two process services, namely, a pdns process service and a load balancing process service, and whether the state of the pdns process service is normal (which may be determined by a system status pdns command), and whether the state of the load balancing process service is normal, if the node lacks any one of the two process services, namely, the pdns process service and the load balancing process service, it is determined that the target process service is abnormal, and if the node includes the two process services, but the state of the pdns process service is abnormal and/or the state of the load balancing process service is abnormal, it is also determined that the target process service is abnormal, that is, as long as the node lacks any one of the pdns process service or the load balancing process service, and the state of the pdns process service is abnormal, And if any condition of the abnormal state of the load balancing process service exists, determining that the target process service is abnormal, namely determining that the load balancing service has an abnormality.
Through the process, the accuracy of judging whether the target process service is normal or not can be improved, so that the abnormity of the load balancing service can be found in time, and the abnormity of the load balancing service can be recovered in time, and the availability, the stability and the reliability of the load balancing service can be improved.
The load balancing service processing method provided in the embodiment of the present application, which determines whether a state of a load balancing process service is normal, may include:
judging whether the time difference between the starting time of the load balancing process service and the current time is greater than or equal to a first threshold value or whether the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to a second threshold value;
and if the time difference between the starting time of the load balancing process service and the current time is greater than or equal to a first threshold value, or the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to a second threshold value, determining that the state of the load balancing process service is normal.
In the application, when judging whether the state of the load balancing process service is normal, whether the process service is normal can be determined by judging whether the load balancing process service is frequently pulled up, if it is determined that the load balancing process service is frequently pulled up, the state of the load balancing service is determined to be abnormal, and if it is determined that the load balancing process service is not frequently pulled up, the state of the load balancing service is determined to be normal.
Specifically, it may be determined whether a time difference between the start time of the load balancing process service and the current time (the time difference mentioned here is an absolute value of the time difference) is greater than or equal to a first threshold, where the current time mentioned here refers to the current time of the cluster, or whether a time difference between the start time of the load balancing process service and the start time of the pdns process service (the time difference mentioned here is also an absolute value of the time difference) is less than or equal to a second threshold, where the first threshold may be specifically 5 minutes, and the second threshold may be specifically 2s, and of course, the sizes of the first threshold and the second threshold may also be adjusted according to actual situations. It should be noted that the start time of the load balancing process service mentioned above refers to the start time corresponding to the one start of the load balancing process service that is closest to the current time.
If the time difference between the starting time of the load balancing process service and the current time is greater than or equal to the first threshold, it is indicated that the starting time of the load balancing process service is far away from the current time, that is, the load balancing process service is not started recently, and therefore it is indicated that the load balancing process service is not frequently pulled up, and the state of the load balancing process service is normal; if the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is smaller than or equal to the second threshold, it indicates that the difference between the starting time of the load balancing process service and the starting time of the pdns process service is relatively small, and the two are started almost together (normally, the pdns process service and the load balancing process service are started almost simultaneously), and therefore, it indicates that the load balancing process service is not frequently pulled up by the pdns process service, and the state of the load balancing process service is normal. That is, if the time difference between the start time of the load balancing process service and the current time is greater than or equal to the first threshold, or if the time difference between the start time of the load balancing process service and the start time of the pdns process service is less than or equal to the second threshold, it indicates that the load balancing process service is not frequently pulled up, and the status is normal.
If the time difference between the starting time of the load balancing process service and the current time is smaller than a first threshold value, and if the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is larger than a second threshold value, it is indicated that the starting time of the load balancing process service is closer, and the starting time of the pdns process service is farther, that is, the load balancing process service is frequently pulled up, and at this time, it is determined that the state of the load balancing process service is abnormal.
The load balancing service processing method provided by the embodiment of the present application may further include, after determining that the load balancing service in the node is abnormal:
the cause of the anomaly of the load balancing service is recorded in a log.
After determining that there is an abnormality in load balancing in a node, the cause of the abnormality of the load balancing service may be determined according to the determination of the cause of the abnormality of the target process service, specifically, if there is no pdns process service or any one of the load balancing process services, it is determined that the cause of the abnormality is a lack of a corresponding process service, and specifically, which process service is lack of determines the cause of the abnormality as a lack of the corresponding process service, for example: if the pdns process service is lacked, determining that the abnormal reason is the lack of the pdns process service; if the state of the pdns process service is abnormal, determining that the abnormal reason is the abnormal state of the pdns process service; and if the state of the load balancing process service is abnormal, determining that the abnormal reason is the state abnormality of the load balancing process service.
The problem positioning can be conveniently carried out when relevant personnel subsequently patrol the log by recording the abnormal reason, and the processing can be conveniently carried out according to the abnormal reason.
The load balancing service processing method provided in the embodiment of the present application may further include, after restarting the load balancing service to perform abnormal recovery on the load balancing service:
returning to execute the step of judging whether the target process service is normal or not;
counting the restarting times of the load balancing service within a preset time length;
and if the restarting times of the load balancing service in the preset time length reach a third threshold value, sending a prompt.
In this application, after the load balancing service is restarted to perform abnormal recovery on the load balancing service, the step of determining whether the target process service is normal may be continuously performed, that is, the step S12 is returned to, and if the load balancing service is restarted subsequently, the number of times that the load balancing service is restarted within the preset time length may be counted, where the preset time length may be set according to a requirement.
And judging whether the restarting frequency of the load balancing service in the preset time length reaches a third threshold value, if so, indicating that the cluster environment or the compatibility of the cluster and the load balancing is in a problem, at the moment, sending a prompt so that relevant personnel can take corresponding measures in time according to the prompt, and stopping executing the steps of judging whether the process service capable of prejudging the availability of the load balancing service is normal and restarting the load balancing service at the same time of sending the prompt so as to avoid influencing the cluster.
The load balancing service processing method provided in the embodiment of the present application may further include, before determining whether a load balancing service is configured in a node, that:
judging whether the cluster is in a normal state or not;
if the cluster is in a normal state, judging whether the CTDB service is normal;
and if the CTDB service is normal, executing a step of judging whether the load balancing service is configured in the node.
In the present application, considering that the cluster is an environment in which the load balancing service is located, before determining whether the load balancing service is configured in the node, it may be determined whether the cluster is in a normal state (specifically, it may be checked and determined through an icfs-s command), if the cluster is in an abnormal state, the subsequent process does not need to be executed, so as to prevent erroneous determination, and facilitate improvement of processing efficiency, and if the cluster is in a normal state, the subsequent process is executed. Meanwhile, considering that the IP used by the load balancing service depends on the CTDB (a lightweight cluster database implementation) service, if the CTDB service is abnormal, even if the node is configured with the load balancing service, the load balancing service cannot be normally used, therefore, after determining that the cluster is in a normal state, it may be determined whether the CTDB service is normal (specifically, it may be checked and determined through CTDB status command), if the CTDB service is abnormal, the subsequent process is not performed any more, so as to prevent erroneous determination and improve processing efficiency, and if the CTDB service is normal, the step of determining whether the node is configured with the load balancing service is performed again.
The method for judging the cluster and the CBDT service in advance can improve the accuracy and efficiency of judging the load balancing service abnormity.
The load balancing service processing method provided in the embodiment of the present application, which detects whether a load balancing service is configured in a node, may include:
and detecting whether the load balancing service is configured in the node at regular time.
When detecting whether the load balancing service is configured in the node, whether the load balancing service is configured in the node may be detected at regular time, for example, whether the load balancing service is configured in the node may be detected every 5 minutes, so as to avoid waste of resources. Of course, whether the load balancing service is configured in the node may also be detected in real time to improve the accuracy of the detection, or whether the load balancing service is configured in the node may be detected by receiving a detection instruction to meet the requirements of related personnel.
It should be noted that, during timing detection, the timing task may be implemented by presetting a timing task, specifically, a timing task corresponding to load balancing service processing may be added to a crontab (daemon of the timing task) of the Linux system, for example: the Crontab use case, performs the detection service every 5 minutes: and 5, starting whether the load balancing service is configured in the detection node or not in a timing cycle manner, namely starting the load balancing service processing in a timing manner, exiting after the processing is finished, and automatically starting after the timing task is met.
An embodiment of the present application further provides a load balancing service processing apparatus, see fig. 2, which shows a schematic structural diagram of the load balancing service processing apparatus provided in the embodiment of the present application, and the load balancing service processing apparatus may include:
the detection module 21 is configured to determine whether a load balancing service is configured in a node;
a first determining module 22, configured to determine whether the target process service is normal if the load balancing service is configured; the target process service is a process service capable of prejudging the availability of the load balancing service;
the determining module 23 is configured to determine that the load balancing service in the node is abnormal if the target process service is abnormal;
and the restarting module 24 is used for restarting the load balancing service so as to perform exception recovery on the load balancing service.
In an embodiment of the present application, the first determining module 22 may include:
the judging unit is used for judging whether the pdns process service and the load balancing process service are contained, whether the state of the pdns process service is normal or not and whether the state of the load balancing process service is normal or not;
and the determining unit is used for determining that the target process service is abnormal if any one of the lack of any one of the pdns process service or the load balancing process service, the abnormal state of the pdns process service and the abnormal state of the load balancing process service is determined.
In an embodiment of the present application, a determining unit of a load balancing service process may include:
a judging subunit, configured to judge whether a time difference between the start time of the load balancing process service and the current time is greater than or equal to a first threshold, or whether a time difference between the start time of the load balancing process service and the start time of the pdns process service is less than or equal to a second threshold;
and the determining subunit is used for determining that the state of the load balancing process service is normal if the time difference between the starting time of the load balancing process service and the current time is greater than or equal to a first threshold value, or the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to a second threshold value.
The load balancing service processing provided by the embodiment of the present application may further include:
and the recording module is used for recording the abnormal reason of the load balancing service in the log after determining that the load balancing service in the node is abnormal.
The load balancing service processing provided by the embodiment of the present application may further include:
the return module is used for returning to execute the step of judging whether the target process service is normal or not after restarting the load balancing service to perform abnormal recovery on the load balancing service;
the statistical module is used for counting the times of restarting the load balancing service within a preset time length;
and the prompting module is used for sending a prompt if the restarting times of the load balancing service in the preset time length reach a third threshold value.
The load balancing service processing provided by the embodiment of the present application may further include:
the second judgment module is used for judging whether the cluster is in a normal state before judging whether the load balancing service is configured in the node;
the third judging module is used for judging whether the CTDB service is normal or not if the cluster is in a normal state;
and the execution module is used for executing the step of judging whether the load balancing service is configured in the node or not if the CTDB service is normal.
In an embodiment of the load balancing service processing provided in this application, the detection module 21 may include:
and the detection unit is used for detecting whether the load balancing service is configured in the node at regular time.
An embodiment of the present application further provides a load balancing service processing device, see fig. 3, which shows a schematic structural diagram of a load balancing service processing device provided in an embodiment of the present application, and the load balancing service processing device may include:
a memory 31 for storing a computer program;
the processor 32, when executing the computer program stored in the memory 31, may implement the following steps:
detecting whether a load balancing service is configured in a node; if the load balancing service is configured, judging whether the target process service is normal; the target process service is a process service capable of prejudging the availability of the load balancing service; if the target process service is abnormal, determining that the load balancing service in the node is abnormal; and restarting the load balancing service to perform abnormal recovery on the load balancing service.
An embodiment of the present application further provides a readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps may be implemented:
detecting whether a load balancing service is configured in a node; if the load balancing service is configured, judging whether the target process service is normal; the target process service is a process service capable of prejudging the availability of the load balancing service; if the target process service is abnormal, determining that the load balancing service in the node is abnormal; and restarting the load balancing service to perform abnormal recovery on the load balancing service.
The readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For a description of a relevant part in a load balancing service processing apparatus, a device, and a computer readable storage medium provided in the embodiments of the present application, reference may be made to a detailed description of a corresponding part in a load balancing service processing method provided in the embodiments of the present application, and details are not described here again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for processing load balancing services, comprising:
detecting whether a load balancing service is configured in a node;
if the load balancing service is configured, judging whether the target process service is normal; the target process service is a process service capable of prejudging the availability of the load balancing service;
if the target process service is abnormal, determining that the load balancing service in the node is abnormal;
restarting the load balancing service to perform abnormal recovery on the load balancing service.
2. The method of claim 1, wherein determining whether the target process service is normal comprises:
judging whether pdns process service and load balancing process service are contained, whether the state of the pdns process service is normal or not and whether the state of the load balancing process service is normal or not;
and if any one of the lack of the pdns process service or the load balancing process service, the abnormal state of the pdns process service and the abnormal state of the load balancing process service is determined, determining that the target process service is abnormal.
3. The method according to claim 2, wherein determining whether the state of the load balancing process service is normal comprises:
judging whether the time difference between the starting time of the load balancing process service and the current time is greater than or equal to a first threshold value or whether the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to a second threshold value;
and if the time difference between the starting time of the load balancing process service and the current time is greater than or equal to the first threshold, or the time difference between the starting time of the load balancing process service and the starting time of the pdns process service is less than or equal to the second threshold, determining that the state of the load balancing process service is normal.
4. The method for processing the load balancing service according to claim 2, further comprising, after determining that the load balancing service in the node has an abnormality:
and recording the abnormal reason of the load balancing service in a log.
5. The method for processing the load balancing service according to claim 1, further comprising, after restarting the load balancing service to recover the load balancing service from an exception:
returning to the step of judging whether the target process service is normal or not;
counting the times of restarting the load balancing service within a preset time length;
and if the number of times of restarting the load balancing service within the preset time length reaches a third threshold value, sending a prompt.
6. The method of processing load balancing services according to claim 1, further comprising, before determining whether a load balancing service is configured in a node:
judging whether the cluster is in a normal state or not;
if the cluster is in a normal state, judging whether the CTDB service is normal;
and if the CTDB service is normal, executing the step of judging whether the load balancing service is configured in the node.
7. The method according to claim 1, wherein detecting whether a load balancing service is configured in a node comprises:
and detecting whether the load balancing service is configured in the node at regular time.
8. A load balancing service processing apparatus, comprising:
the detection module is used for judging whether the nodes are configured with load balancing services or not;
the first judgment module is used for judging whether the target process service is normal or not if the load balancing service is configured; the target process service is a process service capable of prejudging the availability of the load balancing service;
a determining module, configured to determine that the load balancing service in the node is abnormal if the target process service is abnormal;
and the restarting module is used for restarting the load balancing service so as to perform abnormal recovery on the load balancing service.
9. A load balancing service processing apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the load balancing service handling method according to any of claims 1 to 7 when executing said computer program.
10. A readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the load balancing service processing method according to any one of claims 1 to 7.
CN202110930460.4A 2021-08-13 2021-08-13 Load balancing service processing method, device, equipment and readable storage medium Active CN113688021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110930460.4A CN113688021B (en) 2021-08-13 2021-08-13 Load balancing service processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110930460.4A CN113688021B (en) 2021-08-13 2021-08-13 Load balancing service processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113688021A true CN113688021A (en) 2021-11-23
CN113688021B CN113688021B (en) 2023-12-22

Family

ID=78579821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110930460.4A Active CN113688021B (en) 2021-08-13 2021-08-13 Load balancing service processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113688021B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710503A (en) * 2022-04-21 2022-07-05 思必驰科技股份有限公司 Service scheduling method, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130054806A1 (en) * 2011-08-31 2013-02-28 Metaswitch Networks Ltd Load Balancing for SIP Services
CN106330610A (en) * 2016-08-29 2017-01-11 浪潮(北京)电子信息产业有限公司 Load balance processing system and method
CN107766152A (en) * 2017-10-19 2018-03-06 郑州云海信息技术有限公司 Management method, system, device and the readable storage medium storing program for executing of load balancing service
US20180167453A1 (en) * 2016-12-14 2018-06-14 Huawei Technologies Co., Ltd. Distributed load balancing system, health check method, and service node
CN110162405A (en) * 2019-05-31 2019-08-23 福建南威软件有限公司 A kind of method and system of automated service discovery and load balancing
CN111475302A (en) * 2020-04-08 2020-07-31 安徽洲峰电子科技有限公司 Method for balancing service load in process based on content
CN112929416A (en) * 2021-01-22 2021-06-08 苏州浪潮智能科技有限公司 Load balancing method, device, equipment and storage medium of domain name system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130054806A1 (en) * 2011-08-31 2013-02-28 Metaswitch Networks Ltd Load Balancing for SIP Services
CN106330610A (en) * 2016-08-29 2017-01-11 浪潮(北京)电子信息产业有限公司 Load balance processing system and method
US20180167453A1 (en) * 2016-12-14 2018-06-14 Huawei Technologies Co., Ltd. Distributed load balancing system, health check method, and service node
CN107766152A (en) * 2017-10-19 2018-03-06 郑州云海信息技术有限公司 Management method, system, device and the readable storage medium storing program for executing of load balancing service
CN110162405A (en) * 2019-05-31 2019-08-23 福建南威软件有限公司 A kind of method and system of automated service discovery and load balancing
CN111475302A (en) * 2020-04-08 2020-07-31 安徽洲峰电子科技有限公司 Method for balancing service load in process based on content
CN112929416A (en) * 2021-01-22 2021-06-08 苏州浪潮智能科技有限公司 Load balancing method, device, equipment and storage medium of domain name system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑海山: "基于开源软件的DNS查询日志分析系统", 厦门大学学报(自然科学版), vol. 56, no. 2 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710503A (en) * 2022-04-21 2022-07-05 思必驰科技股份有限公司 Service scheduling method, electronic device and storage medium

Also Published As

Publication number Publication date
CN113688021B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN110515820B (en) Server fault maintenance method and device, server and storage medium
CN106533805B (en) Micro-service request processing method, micro-service controller and micro-service architecture
CN111880906A (en) Virtual machine high-availability management method, system and storage medium
CN109586989B (en) State checking method, device and cluster system
CN111478792B (en) Cutover information processing method, system and device
CN113688021A (en) Load balancing service processing method, device, equipment and readable storage medium
CN110011854B (en) MDS fault processing method, device, storage system and computer readable storage medium
CN113965576B (en) Container-based big data acquisition method, device, storage medium and equipment
CN112650624B (en) Cluster upgrading method, device, equipment and computer readable storage medium
CN112069032A (en) Availability detection method, system and related device for virtual machine
CN115314361B (en) Server cluster management method and related components thereof
CN110442467B (en) Data sharing method, terminal and computer readable storage medium
CN111181777A (en) Service degradation method, device, computer equipment and storage medium
CN111190709A (en) Method and device for processing request, electronic equipment and readable storage medium
CN113112023B (en) Inference service management method and device of AIStation inference platform
CN116149932A (en) Method and device for detecting software system state and electronic equipment
CN109408123B (en) Method and device for reloading configuration file
CN112612652A (en) Distributed storage system abnormal node restarting method and system
CN110362464B (en) Software analysis method and equipment
CN113220510A (en) Device detection method, detection device, and computer-readable storage medium
CN113242141B (en) Fault detection method and device for user plane network element
JP2677240B2 (en) Automatic restart processor for AIN system
CN116643852A (en) Method and device for checking timing task
CN117997722A (en) Multi-center cluster fault processing method, device, equipment and storage medium
CN113722181A (en) BMC process monitoring method, device, system and medium of server

Legal Events

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