A method and device for isolating a web application service node
Through detection requests and status judgments between the web server and the web application service node, rapid isolation and failure analysis of the web application service node is realized, and the problem of isolation means destroying operation information in the existing technology is solved, and maintenance and repair are improved efficiency.
Patent Information
- Application Number
- CN202211411233.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-11-11
AI Technical Summary
Existing web application service node isolation methods will destroy operational information, resulting in difficulty in troubleshooting and repairing.
By periodically sending detection requests between the web server and the web application service node, the node status is judged based on the returned status code and keyword. If an abnormality is done, the service will be suspended and the node will be isolated to avoid information destruction caused by closing the node.
It realizes rapid isolation and failure analysis of web application service nodes, improves maintenance and repair efficiency, and avoids business impact.
Smart Images

Figure CN115801550B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of web technology, and in particular to a method and device for isolating a web application service node. Background Art
[0002] When an exception occurs during the operation of a web application service, it is necessary to isolate the web application service node where the exception occurs, and perform fault analysis and repair on the isolated web application service node.
[0003] The existing isolation method is to shut down the web application service node to achieve the purpose of isolation, and then restart it after the repair is completed.
[0004] Existing isolation methods will destroy the operation information of web application service nodes. Technical personnel cannot perform fault analysis based on the operation information, making the maintenance and repair of web application service nodes difficult. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for isolating a web application service node to avoid the destruction of operation information caused by shutting down the web application service node, so that technicians can perform fault analysis based on the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0007] A first aspect of an embodiment of the present invention discloses a method for isolating a web application service node, which is applied to a web server, wherein the web server is connected to a plurality of web application service nodes, each of which is used to provide a web application service, and the method comprises:
[0008] The web server periodically sends a detection request to each web application service node; the detection request includes a detection request in a URL format;
[0009] For each web application service node, when the web server receives a status code and / or a keyword returned by the web application service node, determining whether the status code and / or the keyword indicates a detection failure;
[0010] If yes, isolating the web application service node;
[0011] If not, detecting whether the web application service node is abnormal;
[0012] If there is no abnormality in the web application service node, determining that the web application service node is in a normal service state;
[0013] If the web application service node is abnormal, the web application service node receives and responds to the pause instruction sent by the administrator, suspends providing the web application service, causes the web server to fail to detect the web application service node, and then causes the web server to isolate the web application service node.
[0014] Preferably, for each web application service node, when the web server receives the status code and / or keyword returned by the web application service node, determining whether the status code and / or the keyword indicates a detection failure includes:
[0015] For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether all the status codes and / or the keywords indicate detection failure, where N is a positive integer greater than 1.
[0016] Preferably, for each web application service node, when the web server receives the status code and / or keyword returned by the web application service node, determining whether the status code and / or the keyword indicates a detection failure includes:
[0017] For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether the number of status codes and / or keywords indicating detection failure exceeds a preset number, where N is a positive integer greater than 1.
[0018] Preferably, it also includes:
[0019] When the web server receives a user request, it forwards the user request to any non-isolated web application service node.
[0020] A second aspect of an embodiment of the present invention discloses a method for isolating a web application service, which is applied to a web application service node, the web application service node is used to provide a web application service, the web application service node is connected to a web server, and the method includes:
[0021] The web application service node receives a detection request periodically sent by the web server, wherein the detection request includes a detection request in a URL format;
[0022] When the web application service provided by the web application service node is in an unavailable service state, the web application service node returns a status code and / or a keyword indicating a detection failure to the web server, so that the web server isolates the web application service node;
[0023] When the web application service provided by the web application service node is in an available service state, the web application service node returns a status code and / or a keyword indicating successful detection to the web server;
[0024] When the web application service node receives a pause instruction sent by the administrator, it pauses providing the web application service, causing the web server to fail in detecting the web application service node, and then causing the web server to isolate the web application service node.
[0025] Preferably, it also includes:
[0026] When the web application service node receives the recovery instruction sent by the administrator, it recovers to provide the web application service, so that the web server detects the web application service node successfully, thereby releasing the isolation state between the web application service node and the web server.
[0027] A third aspect of an embodiment of the present invention discloses a web application service node isolation device, which is applied to a web server, wherein the web server is connected to a plurality of web application service nodes, each of which is used to provide a web application service, and the device comprises:
[0028] A detection unit, used for the web server to periodically send a detection request to each web application service node; the detection request includes a detection request in a URL format;
[0029] a judging unit, configured to judge, for each web application service node, whether the status code and / or the keyword indicates a detection failure when the web server receives the status code and / or the keyword returned by the web application service node;
[0030] The isolation unit is used to isolate the web application service node when the status code and / or the keyword indicate detection failure; detect whether the web application service node is abnormal when the status code and / or the keyword indicate detection success; if the web application service node is normal, determine that the web application service node is in a normal service state; if the web application service node is abnormal, the web application service node receives and responds to a pause instruction sent by an administrator, suspends providing the web application service, causes the web server to fail to detect the web application service node, and then causes the web server to isolate the web application service node.
[0031] Preferably, the judging unit is specifically used for:
[0032] For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it is determined whether all of the status codes and / or the keywords indicate detection failure, where N is a positive integer greater than 1;
[0033] or,
[0034] For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether the number of status codes and / or keywords indicating detection failure exceeds a preset number, where N is a positive integer greater than 1.
[0035] Preferably, it also includes:
[0036] The forwarding unit is used to forward the user request to any non-isolated web application service node when the web server receives the user request.
[0037] A fourth aspect of an embodiment of the present invention discloses an isolation device for a web application service node, which is applied to a web application service node, the web application service node is used to provide a web application service, the web application service node is connected to a web server, and the device includes:
[0038] A receiving unit, configured to use the web application service node to receive a detection request periodically sent by the web server, wherein the detection request includes a detection request in a URL format;
[0039] a returning unit, configured to, when the web application service provided by the web application service node is in an unavailable service state, return a status code and / or a keyword indicating a detection failure to the web server by the web application service node, so that the web server isolates the web application service node; and when the web application service provided by the web application service node is in an available service state, return a status code and / or a keyword indicating a detection success to the web server by the web application service node;
[0040] The isolation unit is used to suspend providing the web application service when the web application service node receives a suspension instruction sent by the administrator, so that the web server fails to detect the web application service node, and then the web server isolates the web application service node.
[0041] Based on the above embodiment of the present invention, a web application service node isolation method and device are provided, wherein the web server periodically sends a detection request to each web application service node; the detection request includes a detection request in URL format; for each web application service node, when the web server receives the status code and / or keyword returned by the web application service node, it is determined whether the status code and / or the keyword indicates a detection failure; if so, the web application service node is isolated; if not, whether the web application service node is abnormal is detected; if the web application service node is not abnormal, it is determined that the web application service node is in a normal service state; if the web application service node is abnormal, the web application service node receives and responds to the suspension instruction sent by the administrator, suspends the provision of the web application service, and causes the web server to fail to detect the web application service node, and then causes the web server to isolate the web application service node. In this solution, the web application service provided by the web application service node is suspended, and the faulty node is quickly isolated, which not only avoids affecting the use of the business, but also avoids the destruction of the operation information caused by shutting down the web application service node, so that the technicians can perform fault analysis based on the operation information, and improve the efficiency of maintenance and repair of the web application service node. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1This is an application scenario diagram of a web service node isolation method disclosed in an embodiment of the present invention;
[0044] Figure 2 A flowchart of a method for isolating a web service node disclosed in an embodiment of the present invention;
[0045] Figure 3 A flowchart of another method for isolating a web service node disclosed in an embodiment of the present invention;
[0046] Figure 4 A structural diagram of an isolation device for a web service node disclosed in an embodiment of the present invention;
[0047] Figure 5 A structural diagram of another isolation device for a web service node disclosed in an embodiment of the present invention;
[0048] Figure 6 This is a structural diagram of another isolation system for web service nodes disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] 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 only 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.
[0050] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0051] As can be seen from the background technology, existing isolation means will destroy the operation information of the web application service node, and the technicians cannot perform fault analysis based on the operation information, making the maintenance and repair of the web application service node difficult.
[0052] Therefore, an embodiment of the present invention discloses a method for isolating a web application service node. In this solution, each web application service node is detected in real time. When it is determined that the web application service provided by the web application service node is in an unavailable state according to the status code and / or keyword returned by the web application service node, the web server isolates the web application service node. When the web application service node has an abnormality but has not failed in detection, the web application service node receives and responds to a pause instruction sent by an administrator, causing the web server to fail in detection, and then the web server isolates the web application service node, thereby avoiding the shutdown of the web application service node causing the operation information to be destroyed, so that the technicians can perform fault analysis based on the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0053] like Figure 1 As shown, it is an application scenario diagram of a method for isolating a web application service node disclosed in an embodiment of the present invention. The application scenario consists of a web service node, a web application service node 1 and a web application service node 2.
[0054] The web server is connected to the web application service node 1 and the web application service node 2 as a web service node, and the web application service node 1 and the web application service node 2 are used to provide web application services.
[0055] The web server periodically sends a detection request to the web application service node 1 and the web application service node 2.
[0056] It should be noted that the detection request includes a detection request in a URL format.
[0057] After receiving the detection request sent by the web server, the web application service node 1 and the web application service node 2 return corresponding status codes and / or keywords to the web server according to the service status of the web application services provided by themselves.
[0058] Among them, when the web application service provided by the web application service node 2 is in an unavailable service state, the web application service node 2 returns a status code and / or keyword indicating a detection failure to the web server; when the web application service provided by the web application service node 2 is in an available service state, the web application service node 2 returns a status code and / or keyword indicating a detection success to the web server.
[0059] Then, the web server determines whether the web application service provided by the web application service node 2 is in an available service state according to the status code and / or keyword returned by the web application service node 2.
[0060] It should be noted that, when the web application service node 2 does not return a status code and / or a keyword, it indicates that the web application service provided by the web application service node 2 is in an unavailable service state.
[0061] If not, the web server isolates the web application service node 2.
[0062] If so, detect whether web application service node 2 has an abnormality. If web application service node 2 has no abnormality, determine that web application service node 2 is in a normal state that can process user requests. If web application service node 2 has an abnormality, web application service node 2 receives a pause instruction input by the administrator.
[0063] It should be noted that if the web server does not receive the status code and / or keyword returned by the web application service node 2 , it is determined that the web server has failed to detect the web application service node 2 , and the web server isolates the web application service node 2 .
[0064] When the web application service node 2 receives the suspension instruction input by the administrator, it suspends providing the web application service, so that the web application service node 2 is isolated from the web server.
[0065] It should be noted that the isolation state means that the web application service node 2 suspends providing web application services and suspends data interaction with the web server. At this time, the web server cannot detect the web application service node 2 through HTTP.
[0066] When the web application service node 2 receives the recovery instruction input by the administrator, it recovers to provide the web application service and releases the isolation state between the web application service node 2 and the web server.
[0067] Based on the application scenario of the web application service node isolation method disclosed in the above embodiment of the present invention, Figure 2 As shown, the present invention also discloses a flowchart of a method for isolating a web application service node, which is applied to a web server and mainly includes the following steps:
[0068] Step S201: the web server periodically sends a detection request to each web application service node in real time.
[0069] In step S201, the detection request includes a detection request in a URL format.
[0070] Step S202: for each web application service node, when the web server receives the status code and / or keyword returned by the web application service node, it determines whether the status code and / or keyword indicates detection failure. If yes, execute step S203, if not, execute step S204.
[0071] In step S202, the status code and / or keyword is generated by the web application service node according to the service status of the web application service provided by it. When the web application service is in an unavailable service state, the web application service node generates a status code and / or keyword indicating a detection failure. When the web application service is in an available service state, the web application service node generates a status code and / or keyword indicating a detection success.
[0072] It should be noted that if the service status of the web application service provided by the web application service node is unavailable, then the web application service node may not return any information. When the web server does not obtain the status code and / or keywords returned by the web application service node, it means that the web server has failed to detect the web application service node and the web application service node is in an unavailable state.
[0073] It should be noted that, since the web server periodically sends a detection request to the web application service node, the web application service node also periodically responds to the detection request and returns a status code and / or a keyword.
[0074] The specific implementation process of step S202 when the web server periodically sends N detection requests to the web application service node is described in detail below.
[0075] In the specific implementation process of step S202, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether the N status codes and / or N keywords all indicate detection failure, if so, executes step S203, if not, it is determined that the web server successfully detects the web application service node. N is a positive integer greater than 1.
[0076] Assume that the web server sends 5 detection requests to the web application service node at a preset interval, and the web server receives 5 status codes 404 Not Found consecutively returned by the web application service node, indicating detection failure, then it is determined that the web server fails to detect the web application service node.
[0077] or,
[0078] When the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether the number of status codes and / or keywords indicating detection failure exceeds a preset number, if so, executes step S203, if not, it determines that the web server successfully detects the web application service node. N is a positive integer greater than 1.
[0079] Assume that the web server sends 5 detection requests to the web application service node at a preset interval. Among the 5 status codes continuously returned by the web application service node, the web server receives 3 status codes of 404 Not Found indicating detection failure, which exceeds the preset number (assuming 2). Then it is determined that the web server fails to detect the web application service node.
[0080] Step S203: The web server isolates the web application service node.
[0081] In the specific process of implementing step S203, the web server adds the web application service node that fails to be detected to a pre-established unavailable list, and stops forwarding user requests to the web application service nodes in the unavailable list.
[0082] It should be noted that since a web application service node that does not return any information after sending a detection request is also regarded as a detection failure, the web server also isolates the web application service node that does not return any information.
[0083] Step S204: Detect whether the web application service node is abnormal. If so, execute step S205, if not, determine that the web application service node is in a normal service state.
[0084] Step S205: The web application service node receives and responds to the pause instruction sent by the administrator, suspends providing the web application service, and causes the web server to isolate the web application service node.
[0085] In step S205, isolation means that the web application service node suspends providing web application services and suspends data interaction with the web server. At this time, the web server cannot detect the web application service node through http.
[0086] In one embodiment, when the web server receives a user request, it forwards the user request to any non-isolated web application service node.
[0087] Based on the above-mentioned method for isolating a web application service node disclosed in the embodiment of the present invention, in this solution, by detecting each web application service node in real time, and determining that the web application service provided by the web application service node is in an unavailable state according to the status code and / or keyword returned by the web application service node, the web server isolates the web application service node; when the web application service node has an abnormality but there is no detection failure, the web application service node receives a pause instruction and suspends the provision of the web application service, so that the web application service node and the web server are in an isolated state, avoiding the destruction of operation information caused by shutting down the web application service node, so that technical personnel can perform fault analysis according to the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0088] Based on the application scenario of the web application service node isolation method disclosed in the above embodiment of the present invention, Figure 3 As shown, the present invention also discloses a flowchart of another method for isolating a web application service node, which is applied to a web application service node, wherein the web application service node can be Figure 1 Any web application service node in the main includes the following steps:
[0089] Step S301: the web application service node receives a detection request periodically sent by a web server.
[0090] In step S301, the detection request includes a detection request in a URL format.
[0091] Step S302: When the web application service provided by the web application service node is in an unavailable service state, the web application service node returns a status code and / or keyword indicating detection failure to the web server, so that the web server isolates the web application service node.
[0092] It should be noted that when the web application service provided by the web application service node is in an unavailable service state, the web application service node may not return any information to the web server.
[0093] Step S303: When the web application service provided by the web application service node is in an available service state, the web application service node returns a status code and / or a keyword indicating successful detection to the web server.
[0094] Step S304: When the web application service node receives the suspension instruction sent by the administrator, it suspends providing web application services, so that the web server isolates the web application service node.
[0095] It should be noted that the specific process of web server isolation is: the web server adds the web application service node that fails to be detected to a pre-established unavailable list, and stops forwarding user requests to the web application service node in the unavailable list.
[0096] Step S305: When the web application service node receives the recovery instruction sent by the administrator, it recovers to provide the web application service and releases the isolation state between the web application service node and the web server.
[0097] Based on the above-mentioned method for isolating a web application service node disclosed in the embodiment of the present invention, in this solution, by detecting each web application service node in real time, and determining that the web application service provided by the web application service node is in an unavailable state according to the status code and / or keyword returned by the web application service node, the web server isolates the web application service node; when the web application service node has an abnormality but there is no detection failure, the web application service node receives a pause instruction and suspends the provision of the web application service, so that the web application service node and the web server are in an isolated state, avoiding the destruction of operation information caused by shutting down the web application service node, so that technical personnel can perform fault analysis according to the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0098] based on Figure 2 A method for isolating a web application service node is shown, such as Figure 4 As shown, the embodiment of the present invention also discloses a web application service node isolation device, which is applicable to a web server and includes:
[0099] The detection unit 401 is used for the web server to periodically send a detection request to each web application service node.
[0100] The detection request includes a detection request in a URL format.
[0101] The judging unit 402 is configured to judge, for each web application service node, whether the status code and / or keyword indicates detection failure when the web server receives the status code and / or keyword returned by the web application service node.
[0102] It should be noted that if the service status of the web application service provided by the web application service node is unavailable, then the web application service node may not return any information. When the web server does not obtain the status code and / or keywords returned by the web application service node, it means that the web server has failed to detect the web application service node and the web application service node is in an unavailable state.
[0103] In one embodiment, the judgment unit 402 is specifically used to judge, for each web application service node, whether all the status codes and / or keywords indicate detection failure when the web server receives N status codes and / or N keywords continuously returned by the web application service node, where N is a positive integer greater than 1.
[0104] In one embodiment, the judgment unit 402 is specifically used to judge, for each web application service node, whether the number of status codes and / or keywords indicating detection failure exceeds a preset number when the web server receives N status codes and / or N keywords continuously returned by the web application service node, where N is a positive integer greater than 1.
[0105] The isolation unit 403 is used to isolate the web application service node when the status code and / or keyword indicate that the detection fails; when the status code and / or keyword indicate that the detection is successful, detect whether the web application service node is abnormal; if the web application service node is normal, determine that the web application service node is in a normal service state; if the web application service node is abnormal, the web application service node receives and responds to the pause instruction sent by the administrator, suspends the provision of web application services, so that the web server fails to detect the web application service node, and then the web server isolates the web application service node.
[0106] In one embodiment, the device further includes a forwarding unit, which is used to forward the user request to any non-isolated web application service node when the web server receives the user request.
[0107] Based on the above-mentioned web application service node isolation device disclosed in the embodiment of the present invention, in this solution, by detecting each web application service node in real time, and determining that the web application service provided by the web application service node is in an unavailable state according to the status code and / or keyword returned by the web application service node, the web server isolates the web application service node; when the web application service node has an abnormality but there is no detection failure, the web application service node receives a pause instruction and suspends the provision of the web application service, so that the web application service node and the web server are in an isolated state, avoiding the destruction of operation information caused by shutting down the web application service node, so that technical personnel can perform fault analysis according to the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0108] based on Figure 2 A method for isolating a web application service node is shown, such as Figure 5 As shown, the embodiment of the present invention also discloses a web application service node isolation device, which is applicable to the web application service node and includes:
[0109] The receiving unit 501 is used to receive the detection request periodically sent by the web server using the web application service node, where the detection request includes the detection request in the URL format;
[0110] The returning unit 502 is used for, when the web application service provided by the web application service node is in an unavailable service state, the web application service node returns a status code and / or a keyword indicating a detection failure to the web server, so that the web server isolates the web application service node; when the web application service provided by the web application service node is in an available service state, the web application service node returns a status code and / or a keyword indicating a detection success to the web server;
[0111] The isolation unit 503 is used to suspend providing web application services when the web application service node receives a suspension instruction sent by the administrator, so that the web server fails to detect the web application service node, and then the web server isolates the web application service node.
[0112] The releasing unit 504 is used to resume providing web application services and release the isolation state between the web application service node and the web server when the web application service node receives the recovery instruction sent by the administrator.
[0113] Based on the above-mentioned embodiment of the present invention, an isolation device for a web application service node is disclosed. In this solution, when a web application service provided by a web application service node fails and is in an unavailable state, the web application service node receives a pause instruction and suspends providing the web application service, so that the web application service node and the web server are in an isolated state, thereby avoiding the shutdown of the web application service node causing the operation information to be destroyed, so that technical personnel can perform fault analysis based on the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0114] Based on the above-mentioned embodiment of the present invention, a method for isolating a web application service node is disclosed, such as Figure 6 As shown, the embodiment of the present invention also discloses a web application service node isolation system, which includes a web server 1, a web application service node 2 and a web application service node 3.
[0115] Specifically, web server 1 as a web service node is connected to web application service node 2 and web application service node 3 respectively.
[0116] The web application service node 2 and the web application service node 3 belong to the same service cluster and are used to provide the same type of web application services.
[0117] In a specific implementation, web server 1 periodically sends detection requests to web application service node 1 and web application service node 2 in real time.
[0118] It should be noted that the detection request includes a detection request in a URL format.
[0119] After receiving the detection request sent by the web server 1, the web application service node 1 and the web application service node 2 return corresponding status codes and / or keywords to the web server 1 according to the service status of the web application services provided by themselves.
[0120] It should be noted that, when the web application service node 1 or the web application service node 2 does not return a status code and / or a keyword, it indicates that the web application service provided by the web application service node 2 is in an unavailable service state.
[0121] Specifically, when the web application service provided by web application service node 2 is in an unavailable service state, web application service node 2 returns a status code and / or keyword indicating a detection failure to web server 1; when the web application service provided by web application service node 2 is in an available service state, web application service node 2 returns a status code and / or keyword indicating a detection success to web server 1.
[0122] Web server 1 determines whether the web application service provided by web application service node 2 is in an available service state based on the status code and / or keywords returned by web application service node 2. If so, it determines that web application service node 2 can process user requests normally. If not, web server 1 isolates web application service node 2.
[0123] For example, web server 1 sends 5 detection requests to web application service node 2 at preset intervals. If web server 1 receives 5 status codes 404 Not Found consecutively returned by web application service node 2 indicating detection failure, then it is determined that web server 1 fails to detect web application service node 2.
[0124] When an exception occurs in web application service node 2, but the web server still successfully detects web application service node 2, web application service node 2 receives a pause instruction input by the administrator and suspends providing web application services, so that web application service node 2 is isolated from web server 1.
[0125] It should be noted that the isolation state means that the web application service node 2 suspends providing web application services and suspends data interaction with the web server 1. At this time, the web server 1 cannot detect the web application service node 2 through HTTP.
[0126] When the web application service node 2 receives the recovery instruction input by the administrator, it recovers to provide the web application service and releases the isolation state between the web application service node 2 and the web server 1 .
[0127] In one embodiment, when receiving a user request, web server 1 forwards the user request to any non-isolated node among web application service node 1 and web application service node 2 .
[0128] Based on the above-mentioned embodiment of the present invention, a web application service node isolation system is disclosed. In this solution, when a web application service provided by a web application service node fails and is in an unavailable state, the web application service node receives a pause instruction and suspends providing the web application service, so that the web application service node and the web server are isolated, thereby avoiding the shutdown of the web application service node causing the operation information to be destroyed, so that technical personnel can perform fault analysis based on the operation information, thereby improving the efficiency of maintenance and repair of the web application service node.
[0129] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0130] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0131] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for isolating a web application service node. It is characterized in that Applied to a web server, the web server is connected to a plurality of web application service nodes, each web application service node is used to provide a web application service, the method comprises: The web server periodically sends a detection request to each web application service node; the detection request includes a detection request in a URL format; For each web application service node, when the web server receives a status code and / or a keyword returned by the web application service node, determining whether the status code and / or the keyword indicates a detection failure; If yes, isolating the web application service node; If not, detecting whether the web application service node is abnormal; If there is no abnormality in the web application service node, determining that the web application service node is in a normal service state; If the web application service node is abnormal, the web application service node receives and responds to the pause instruction sent by the administrator, suspends providing the web application service, causes the web server to fail to detect the web application service node, and then causes the web server to isolate the web application service node.
2. The method according to claim 1, It is characterized in that For each web application service node, when the web server receives the status code and / or keyword returned by the web application service node, determining whether the status code and / or the keyword indicates a detection failure includes: For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether all the status codes and / or the keywords indicate detection failure, where N is a positive integer greater than 1.
3. The method according to claim 1, It is characterized in that For each web application service node, when the web server receives the status code and / or keyword returned by the web application service node, determining whether the status code and / or the keyword indicates a detection failure includes: For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether the number of status codes and / or keywords indicating detection failure exceeds a preset number, where N is a positive integer greater than 1.
4. The method according to any one of claims 1 to 3, It is characterized in that Also includes: When the web server receives a user request, it forwards the user request to any non-isolated web application service node.
5. A method for isolating a web application service node, It is characterized in that Applied to a web application service node, the web application service node is used to provide web application services, the web application service node is connected to a web server, and the method includes: The web application service node receives a detection request periodically sent by the web server, wherein the detection request includes a detection request in a URL format; When the web application service provided by the web application service node is in an unavailable service state, the web application service node returns a status code and / or a keyword indicating a detection failure to the web server, so that the web server isolates the web application service node; When the web application service provided by the web application service node is in an available service state, the web application service node returns a status code and / or a keyword indicating successful detection to the web server; When the web application service node receives a pause instruction sent by the administrator, it pauses providing the web application service, causing the web server to fail in detecting the web application service node, and then causing the web server to isolate the web application service node.
6. The method according to claim 5, It is characterized in that Also includes: When the web application service node receives the recovery instruction sent by the administrator, it recovers to provide the web application service, so that the web server detects the web application service node successfully, thereby releasing the isolation state between the web application service node and the web server.
7. An isolation device for a web application service node, It is characterized in that Applied to a web server, the web server is connected to a plurality of web application service nodes, each web application service node is used to provide a web application service, the device comprises: A detection unit, used for the web server to periodically send a detection request to each web application service node; the detection request includes a detection request in a URL format; a judging unit, configured to judge, for each web application service node, whether the status code and / or the keyword indicates a detection failure when the web server receives the status code and / or the keyword returned by the web application service node; The isolation unit is used to isolate the web application service node when the status code and / or the keyword indicate detection failure; detect whether the web application service node is abnormal when the status code and / or the keyword indicate detection success; if the web application service node is normal, determine that the web application service node is in a normal service state; if the web application service node is abnormal, the web application service node receives and responds to a pause instruction sent by an administrator, suspends providing the web application service, causes the web server to fail to detect the web application service node, and then causes the web server to isolate the web application service node.
8. The device according to claim 7, It is characterized in that The judging unit is specifically used for: For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it is determined whether all of the status codes and / or the keywords indicate detection failure, where N is a positive integer greater than 1; or, For each web application service node, when the web server receives N status codes and / or N keywords continuously returned by the web application service node, it determines whether the number of status codes and / or keywords indicating detection failure exceeds a preset number, where N is a positive integer greater than 1.
9. The device according to claim 7, It is characterized in that Also includes: The forwarding unit is used to forward the user request to any non-isolated web application service node when the web server receives the user request.
10. An isolation device for a web application service node, It is characterized in that Applied to a web application service node, the web application service node is used to provide web application services, the web application service node is connected to a web server, and the device includes: A receiving unit, configured to use the web application service node to receive a detection request periodically sent by the web server, wherein the detection request includes a detection request in a URL format; a returning unit, configured to, when the web application service provided by the web application service node is in an unavailable service state, return a status code and / or a keyword indicating a detection failure to the web server by the web application service node, so that the web server isolates the web application service node; and when the web application service provided by the web application service node is in an available service state, return a status code and / or a keyword indicating a detection success to the web server by the web application service node; The isolation unit is used to suspend providing the web application service when the web application service node receives a suspension instruction sent by the administrator, so that the web server fails to detect the web application service node, and then the web server isolates the web application service node.
Citation Information
Patent Citations
System and method for realizing network element service switching in multimedia messaging service
CN101977396A
A load dispatching method and device
CN109274707A
Service availability detection method and device, computer device and storage medium
CN110618889A
Monitoring web applications including microservices
US20200389517A1
