CN114422428A - Restarting method and apparatus for service node, electronic device and storage medium - Google Patents

Restarting method and apparatus for service node, electronic device and storage medium Download PDF

Info

Publication number
CN114422428A
CN114422428A CN202210035608.2A CN202210035608A CN114422428A CN 114422428 A CN114422428 A CN 114422428A CN 202210035608 A CN202210035608 A CN 202210035608A CN 114422428 A CN114422428 A CN 114422428A
Authority
CN
China
Prior art keywords
service node
target service
alive
long connection
connection keep
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.)
Pending
Application number
CN202210035608.2A
Other languages
Chinese (zh)
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.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou 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 Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202210035608.2A priority Critical patent/CN114422428A/en
Publication of CN114422428A publication Critical patent/CN114422428A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a method and a device for restarting a service node, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a restart trigger instruction aiming at a target service node to be deployed; responding to a restart trigger instruction, and acquiring long connection keep-alive parameters of a transmission control protocol corresponding to a target service node, wherein the long connection keep-alive parameters comprise connection idle time before sending a detection message, time intervals of two times of detection message sending and detection times; and configuring the long connection keep-alive parameters, and executing restart operation on the target service node, wherein the parameter values after the long connection keep-alive parameters are configured are lower than the parameter values before the long connection keep-alive parameters are configured. The technical scheme of the embodiment of the invention realizes the effect that when the service node fails, the service request flow of the corresponding TCP long link can be seamlessly switched.

Description

Restarting method and apparatus for service node, electronic device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a method and a device for restarting a service node, electronic equipment and a storage medium.
Background
The flow gateway is applied as a flow control framework and can control and treat north-south flow and east-west flow of any service. In practical applications, the traffic gateway often encounters situations of deployment maintenance or failure. For the situation, the related art adopts a processing mode that the route of the failed traffic gateway node is removed in a network layer by calling the route removing operation of the system, so that the new service request is not transmitted to the failed node through the route any more.
However, this processing method is effective for a service request of a Transmission Control Protocol (TCP) short link, and for a TCP long link request, since a TCP link is always used, a routing of a failed node is suddenly blocked, which may cause a service request failure and a service unavailability, and even a case where a TCP long link is reset, which may cause a request error.
Disclosure of Invention
The embodiment of the invention provides a restarting method and device of a service node, electronic equipment and a storage medium, so as to realize seamless switching of traffic of the service node.
In a first aspect, an embodiment of the present invention provides a method for restarting a service node, where the method includes:
receiving a restart trigger instruction aiming at a target service node to be deployed;
responding to a restart trigger instruction, and acquiring long connection keep-alive parameters of a transmission control protocol corresponding to a target service node, wherein the long connection keep-alive parameters comprise connection idle time before sending a detection message, time intervals of two times of detection message sending and detection times;
and configuring the long connection keep-alive parameters, and executing restart operation on the target service node, wherein the parameter values after the long connection keep-alive parameters are configured are lower than the parameter values before the long connection keep-alive parameters are configured.
In a second aspect, an embodiment of the present invention further provides a device for restarting a service node, where the device includes:
the restarting instruction receiving module is used for receiving a restarting triggering instruction aiming at the target service node;
the keep-alive parameter acquisition module is used for responding to a restart trigger instruction and acquiring long connection keep-alive parameters of a transmission control protocol corresponding to a target service node, wherein the long connection keep-alive parameters comprise connection idle time before sending a detection message, time intervals between two times of detection message sending and detection times;
and the node restarting module is used for configuring the long connection keep-alive parameters and executing restarting operation on the target service node, wherein the parameter values of the long connection keep-alive parameters after configuration are lower than the parameter values before configuration.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for restarting the service node provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for restarting the service node provided in any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, the restart trigger instruction for the target service node to be deployed is received, the restart trigger instruction is further responded, the long connection keep-alive parameter of the transmission control protocol corresponding to the target service node is obtained, further, the long connection keep-alive parameter is configured, and the restart operation is executed on the target service node, so that the problems of service request failure and unavailable service due to the fact that the routing of the failed node is not through in the existing flow gateway fault processing technology are solved, and the technical effect that the service request flow of the TCP long connection corresponding to the failed node can be switched seamlessly when the service node fails is realized by dynamically adjusting the parameter value of the long connection keep-alive parameter.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a flowchart illustrating a method for restarting a service node according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for restarting a service node according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for restarting a service node according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a restart apparatus of a service node according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart illustrating a method for restarting a service node according to an embodiment of the present invention, where the method is applicable to a situation where a traffic gateway needs to restart the service node during deployment maintenance or abnormal failure, and the method may be executed by a restart device of the service node, where the restart device may be implemented by software and/or hardware, and may be configured in a terminal and/or a server to implement the method for restarting the service node according to the embodiment of the present invention.
As shown in fig. 1, the method of the embodiment may specifically include:
and S110, receiving a restart trigger instruction aiming at the target service node to be deployed.
The target service node may be a node for providing corresponding services for different service requests. Correspondingly, the target service node to be deployed may be a service node that needs to be deployed currently. A restart trigger instruction may be understood as a trigger instruction for instructing the target service node to start performing a restart operation. The restart trigger instruction may be generated based on execution logic triggers of pre-written program code that may execute the instruction issuing the restart trigger to the target service node. And when the server-side equipment receives a restart trigger instruction aiming at the target service node to be deployed, the target service node can be operated according to the restart trigger instruction.
It should be noted that, before receiving the restart trigger instruction for the target service node, the method further includes generating the restart trigger instruction, and in this embodiment, the generating the restart trigger instruction may be implemented based on at least two ways. Specific implementations thereof can be found in the following detailed description:
optionally, when the target service node is detected to have a fault, a restart trigger instruction for the target service node is generated.
For example, the failure of the target service node may be that the target service node is currently in an inaccessible state, or that the target service node needs to perform a restart operation due to a system failure, or that the target service node needs to perform a restart operation due to a network connection failure, and the like, which is not limited in this embodiment.
In practical applications, when a failure of a target service node is detected, for example, the failure is sensed through a health detection script of a gateway, a restart trigger instruction for the target service node needs to be generated, so that a restart operation can be performed on the target service node, so that the target service node can normally access the target service node.
Optionally, when a node maintenance request for maintaining the target service node is received, a restart trigger instruction for the target service node is generated.
In practical applications, when the server receives a node maintenance request for maintaining the target service node, for example, the node maintenance request may be a node maintenance request which is pre-written by a user and is used for performing daily maintenance on the target service node, or a node maintenance request which is input by the user based on an input device and is used for maintaining the target service node, a restart trigger instruction for the target service node may be generated, so that the target service node may perform a restart operation.
Optionally, when it is detected that a user triggers a preset target restart control for restarting a target service node to be deployed, a restart trigger instruction for the target service node is generated; or, when a command for performing a restart operation on a target service node to be deployed, which is input by a user based on an input device, is received, a restart trigger instruction for the target service node may be generated; alternatively, other manners for generating a restart trigger instruction for the target service node to be deployed may also be used, such as voice control or gesture control, which is not limited in this embodiment.
And S120, responding to the restart trigger instruction, and acquiring the long connection keep-alive parameters of the transmission control protocol corresponding to the target service node.
Among other things, the Transmission Control Protocol (TCP) may be a connection-oriented, reliable, and byte stream-based transport layer communication Protocol. The transmission control protocol may be used to provide a stable end-to-end byte stream over an unstable internetwork. A long link of a transmission control protocol may be one that remains connected after a connection is successfully established, even if the communicating parties do not have data to transmit, so that it does not disconnect. Accordingly, the long connection keep-alive parameters may be parameters for keeping the connection of the transmission control protocol in a keep-alive state all the time. Illustratively, the long connection keep-alive parameters include connection idle time before sending the probe message, time interval between two probe message sending and the number of probes.
The detection message may be a keep-alive detection message segment sent by the tcp for detecting whether the long connection is in a connected state under the condition that data exchange does not occur between two parties connected by the tcp, and the detection message may be a message segment that needs a response from the other party. The connection idle time (tcp _ keepalive _ time) before sending the probe packet may be a time interval between the last data exchange and the transmission control protocol sending the first probe packet, i.e. an allowed duration of idle time. The time interval (tcp _ keepalive _ intvl) between the two sending of the detection message may be a time interval between the current detection message and the next detection message, or may be an interval time for continuing sending the detection message when the acknowledgement of the other party is not received. The probing times (tcp _ keepalive _ probes) may be the maximum number of times that the probing packet can be retransmitted in one probing process.
In practical application, each long connection keep-alive parameter has its corresponding initial setting value, for example, tcp _ keepalive _ time 7200, that is, the time interval from the end of the last data transmission to the sending of the first detection message is 7200 seconds; the tcp _ keepalive _ intvl is 75, namely, when the confirmation of the other party is not received, the time interval for continuously sending the detection message is 75 seconds; and tcp _ keepalive _ probes:9, namely, when the confirmation of the other party is not received, the default time for continuously sending the detection message is 9 times.
Specifically, after the server device receives a restart trigger instruction for the target service node, the restart trigger instruction is analyzed, and then, each long connection keep-alive parameter of the transmission control protocol corresponding to the target service node is obtained, so that subsequent operations can be performed on the target service node according to each long connection keep-alive parameter.
S130, configuring the long connection keep-alive parameters and executing restart operation on the target service node.
And the parameter value after the configuration of the long connection keep-alive parameter is lower than the parameter value before the configuration.
In practical application, when a target service node is restarted and triggered, various long connection keep-alive parameters corresponding to the target service node need to be acquired first, and the long connection keep-alive parameters are configured, so that the configured parameter values are lower than the parameter values before configuration, for example, the connection idle time before sending a detection message is configured as 'tcp _ keepalive _ time: 3'; configuring the time interval of sending the two detection messages as 'tcp _ keepalive _ intvl: 1'; the detection times are configured as 'TCP _ keepalive _ probes: 1', so that the time interval for sending the detection message and the time interval for sending the detection message twice are both smaller than the time interval before configuration, the system can sense the detection result in advance, and determine that the established TCP long link is in an unavailable state, so that the current TCP long link can be ended, and a normal new TCP long link can be reestablished.
Specifically, after receiving a restart trigger instruction for a target service node, a server device responds to the restart trigger instruction to obtain a long connection keep-alive parameter of a transmission control protocol corresponding to the target service node, and further, reconfigures the long connection keep-alive parameter to make the configured parameter value lower than the parameter value before configuration, so that the advantages of the configuration are as follows: the system can quickly sense that the current long TCP link is in an unavailable state, so that the restarting operation can be performed on the target service node more smoothly.
According to the technical scheme of the embodiment of the invention, the restart trigger instruction for the target service node to be deployed is received, the restart trigger instruction is further responded, the long connection keep-alive parameter of the transmission control protocol corresponding to the target service node is obtained, further, the long connection keep-alive parameter is configured, and the restart operation is executed on the target service node, so that the problems of service request failure and unavailable service due to the fact that the routing of the failed node is not through in the existing flow gateway fault processing technology are solved, and the technical effect that the service request flow of the TCP long connection corresponding to the failed node can be switched seamlessly when the service node fails is realized by dynamically adjusting the parameter value of the long connection keep-alive parameter.
Example two
Fig. 2 is a schematic flow chart of a method for restarting a service node according to a second embodiment of the present invention, where the second embodiment further refines the technical solution based on the above technical solution. On the basis of any optional technical solution in this embodiment of the present invention, optionally, the performing a restart operation on the target service node includes: and when detecting that a first time interval from the configuration moment of the long connection keep-alive parameters reaches a preset first time threshold, executing restart operation on the target service node, wherein the first time interval is greater than a configured parameter value of connection idle time before sending the detection message.
Optionally, after the restart operation is performed on the target service node, in order to restore the normal access state of the target service node, the method further includes: and restoring the long-connection keep-alive parameters to the parameter values before configuration, and executing online operation on the restarted target service node.
The technical terms and the technical features that are the same as or similar to those of the previous embodiments are not repeated herein.
As shown in fig. 2, the method of this embodiment may specifically include:
s210, receiving a restart trigger instruction aiming at a target service node to be deployed.
S220, responding to the restart trigger instruction, and acquiring the long connection keep-alive parameters of the transmission control protocol corresponding to the target service node.
And S230, configuring the long connection keep-alive parameters, and when detecting that a first time interval from the configuration moment of the long connection keep-alive parameters reaches a preset first time threshold, executing restart operation on the target service node.
The first time interval is greater than a configured parameter value of connection idle time before the detection message is sent. The advantages of such an arrangement are: before restarting operation is carried out on the target service node, the system can complete at least one TCP long-chain connection detection according to the configured long-connection keep-alive parameters. The first time threshold may be preset and used to determine a time value of a time interval after the configuration of the long-connection keep-alive parameter until the restart operation is performed on the target service node. The first time threshold may be a fixed waiting time set by the system, or may be a different waiting time preset by the user according to different situations, and the present embodiment is not limited to this.
In practical application, the configured long connection keep-alive parameters need to take effect on all TCP long links corresponding to the target service node. The long connection keep-alive parameters are configured to be valid for the established TCP long link, however, there may be a case: after the long connection keep-alive parameters are configured, the client side can still continuously access the target service node before restarting the target service node, and therefore a new TCP long link is established. In order to enable the configured long connection keep-alive parameter to be effective for the newly established TCP long link, after the configuration of the long connection keep-alive parameter is completed, a period of time needs to be waited before the restart operation is performed on the target service node, so that the configured long connection keep-alive parameter is effective for all the TCPs corresponding to the target service node.
Specifically, after the long connection keep-alive parameter is configured, in order to enable the configured long connection keep-alive parameter to take effect for all TCP long connections corresponding to the target service node, a period of time needs to be waited, and when a first time interval from the configuration time of the long connection keep-alive parameter reaches a preset first time threshold, a restart operation can be executed on the target service node.
S240, restoring the long connection keep-alive parameters to the parameter values before configuration, and executing online operation on the started target service nodes.
In practical applications, in order to enable the restarted target service node to recover a normal access state after being on-line, before performing an on-line operation, it is necessary to recover various parameter values of the long-connection keep-alive parameter to parameter values before configuration, and then perform the on-line operation on the restarted target service node.
In this embodiment, the recovery time for recovering the long connection keep-alive parameter to the parameter value before configuration may be determined based on at least two ways, and the specific determination way may be described in the following descriptions:
one way of determining is: and when the target service node is detected to be initialized completely, restoring the long connection keep-alive parameters to the parameter values before configuration.
Illustratively, the initialization completion of the target service node may be a time interval reaching a preset initialization completion, for example, 10 seconds, or may reach an initialization completion time preset by a user before a restart operation is performed on the target service node, and the like, which is not limited in this embodiment.
Another determination method is as follows: and when detecting that a second time interval from the restart time of the target service node reaches a preset second time threshold, restoring the long connection keep-alive parameter to a parameter value before configuration.
The second time threshold may be preset and is used to determine a time value from the restart time of the target service node to the recovery time of the long connection keep-alive parameter. It should be noted that the second time threshold may be a time threshold preset by the user according to different target service nodes, or may be a fixed time threshold set by the system, and the like, which is not limited in this embodiment.
In specific implementation, when it is detected that the initialization of the target service node is completed, or a second time interval from the restart time of the target service node reaches a preset second time threshold, the long connection keep-alive parameter may be restored to a parameter value before configuration, and then an online operation is performed on the restarted target service node, so that the target service node after online can quickly restore to a normal access state.
The technical proposal of the embodiment of the invention receives the restart triggering instruction aiming at the target service node to be deployed, further responding to the restart trigger instruction, acquiring the long connection keep-alive parameters of the transmission control protocol corresponding to the target service node, and further, configuring the long connection keep-alive parameters, when detecting that a first time interval from the configuration time of the long connection keep-alive parameters reaches a preset first time threshold, the restart operation is carried out on the target service node, thereby solving the problem that the newly established TCP long-chain connection is not effective after the long-connection keep-alive parameter is reconfigured, achieving the aim that in the restart process of the service node, all TCP long links corresponding to the service node can take effect on the configured long link keep-alive parameters, so that the service node can finally complete the restart operation, and further realize the seamless switching of the traffic of the service node.
EXAMPLE III
Fig. 3 is a flowchart illustrating a method for restarting a service node according to a third embodiment of the present invention, where the third embodiment of the present invention is a preferred embodiment of the foregoing embodiments of the present invention, and as shown in fig. 3, the method according to the third embodiment of the present invention may include the following steps:
1. operating BIRD to execute offline operation on a target service node to be deployed;
2. configuring long connection keep-alive parameters to enable the configured parameter values to be lower than the parameter values before configuration, wherein the long connection keep-alive parameters comprise connection idle time before sending the detection messages, time intervals between two times of detection message sending and detection times, for example, the connection idle time before sending the detection messages is configured to be 'tcp _ keepalive _ time: 3'; configuring the time interval of sending the two detection messages as 'tcp _ keepalive _ intvl: 1'; configuring the detection times as 'tcp _ keepalive _ probes: 1';
3. after the long connection keep-alive parameters are configured, waiting for a time interval, wherein the time interval needs to be larger than a parameter value of connection idle time before sending the detection messages after configuration, so that the long connection keep-alive parameters after configuration can take effect on the newly established TCP long link;
4. executing a restart operation on the target service node;
5. suspending waiting for the target service node initialization to complete (i.e., the system initialization in fig. 3 is complete);
6. restoring the long connection keep-alive parameters to the parameter values before configuration;
7. and operating BIRD to execute online operation on the restarted target service node.
According to the technical scheme of the embodiment of the invention, the restart trigger instruction for the target service node to be deployed is received, the restart trigger instruction is further responded, the long connection keep-alive parameter of the transmission control protocol corresponding to the target service node is obtained, further, the long connection keep-alive parameter is configured, and the restart operation is executed on the target service node, so that the problems of service request failure and unavailable service due to the fact that the routing of the failed node is not through in the existing flow gateway fault processing technology are solved, and the technical effect that the service request flow of the TCP long connection corresponding to the failed node can be switched seamlessly when the service node fails is realized by dynamically adjusting the parameter value of the long connection keep-alive parameter.
Example four
Fig. 4 is a schematic structural diagram of a restarting apparatus of a service node according to a fourth embodiment of the present invention, where the restarting apparatus of a service node according to the fourth embodiment of the present invention can be implemented by software and/or hardware, and can be configured in a terminal and/or a server to implement the restarting method of a service node according to the fourth embodiment of the present invention. The device may specifically comprise: a restart instruction receiving module 310, a keep-alive parameter obtaining module 320, and a node restart module 330.
The restart instruction receiving module 310 is configured to receive a restart trigger instruction for a target service node; a keep-alive parameter obtaining module 320, configured to, in response to the restart trigger instruction, obtain a long connection keep-alive parameter of a transmission control protocol corresponding to the target service node, where the long connection keep-alive parameter includes connection idle time before sending the probe packet, a time interval between two times of sending the probe packet, and a number of times of detection; and the node restarting module 330 is configured to configure the long connection keep-alive parameter and perform a restarting operation on the target service node, where a parameter value after the configuration of the long connection keep-alive parameter is lower than a parameter value before the configuration.
According to the technical scheme of the embodiment of the invention, the restart trigger instruction for the target service node to be deployed is received, the restart trigger instruction is further responded, the long connection keep-alive parameter of the transmission control protocol corresponding to the target service node is obtained, further, the long connection keep-alive parameter is configured, and the restart operation is executed on the target service node, so that the problems of service request failure and unavailable service due to the fact that the routing of the failed node is not through in the existing flow gateway fault processing technology are solved, and the technical effect that the service request flow of the TCP long connection corresponding to the failed node can be switched seamlessly when the service node fails is realized by dynamically adjusting the parameter value of the long connection keep-alive parameter.
Optionally, the node restart module 330 is further configured to, when a first time interval detected at a configuration time of the long connection keep-alive parameter reaches a preset first time threshold, execute a restart operation on the target service node, where the first time interval is greater than a configured parameter value of connection idle time before sending the probe packet.
Optionally, after the performing a reboot operation on the target service node, the apparatus further includes: and the node online module comprises a keep-alive parameter recovery unit and a node online unit.
The keep-alive parameter recovery unit is used for recovering the long-connection keep-alive parameters to the parameter values before configuration; and the node online unit is used for executing online operation on the restarted target service node.
Optionally, the keep-alive parameter recovering unit is further configured to recover the long connection keep-alive parameter to a parameter value before configuration when it is detected that the initialization of the target service node is completed.
Optionally, the keep-alive parameter recovering unit is further configured to recover the long connection keep-alive parameter to a parameter value before configuration when a second time interval from the restart time of the target service node is detected to reach a preset second time threshold.
Optionally, before receiving a restart trigger instruction for the target service node, the apparatus further includes: and the fault detection module is used for generating a restart trigger instruction aiming at the target service node when the target service node is detected to have a fault.
Optionally, before receiving a restart trigger instruction for the target service node, the apparatus further includes: and the maintenance request receiving module is used for generating a restart trigger instruction aiming at the target service node when receiving the node maintenance request for maintaining the target service node.
The restarting device of the service node can execute the restarting method of the service node provided by any embodiment of the invention, and has the corresponding functional module and the beneficial effect of executing the restarting method of the service node.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by executing programs stored in the system memory 402, for example, implementing a restart method of a service node provided by an embodiment of the present invention.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for restarting a service node, where the method includes:
receiving a restart trigger instruction aiming at a target service node to be deployed;
responding to a restart trigger instruction, and acquiring long connection keep-alive parameters of a transmission control protocol corresponding to a target service node, wherein the long connection keep-alive parameters comprise connection idle time before sending a detection message, time intervals of two times of detection message sending and detection times;
and configuring the long connection keep-alive parameters, and executing restart operation on the target service node, wherein the parameter values after the long connection keep-alive parameters are configured are lower than the parameter values before the long connection keep-alive parameters are configured.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for restarting a service node, comprising:
receiving a restart trigger instruction aiming at a target service node to be deployed;
responding to the restart trigger instruction, and acquiring long connection keep-alive parameters of a transmission control protocol corresponding to the target service node, wherein the long connection keep-alive parameters comprise connection idle time before sending a detection message, time interval between two times of detection message sending and detection times;
and configuring the long connection keep-alive parameters, and executing restart operation on the target service node, wherein the parameter values of the long connection keep-alive parameters after configuration are lower than the parameter values before configuration.
2. The method of claim 1, wherein performing a reboot operation on the target serving node comprises:
and when detecting that a first time interval from the configuration moment of the long connection keep-alive parameters reaches a preset first time threshold, executing restart operation on the target service node, wherein the first time interval is greater than a parameter value of connection idle time before the configured detection message is sent.
3. The method of claim 2, further comprising, after said performing a reboot operation on the target serving node:
and restoring the long-connection keep-alive parameters to the parameter values before configuration, and executing online operation on the restarted target service node.
4. The method of claim 3, wherein the restoring the long connection keep-alive parameters to pre-configured parameter values comprises:
and when the target service node is detected to be initialized completely, restoring the long connection keep-alive parameters to the parameter values before configuration.
5. The method of claim 3, wherein the restoring the long connection keep-alive parameters to pre-configured parameter values comprises:
and when detecting that a second time interval from the restart time of the target service node reaches a preset second time threshold, restoring the long connection keep-alive parameter to a parameter value before configuration.
6. The method of claim 1, prior to said receiving a restart trigger instruction for a target serving node, further comprising:
and when the target service node is detected to have a fault, generating a restart trigger instruction aiming at the target service node.
7. The method of claim 1, prior to said receiving a restart trigger instruction for a target serving node, further comprising:
when a node maintenance request for maintaining a target service node is received, a restart trigger instruction for the target service node is generated.
8. A device for restarting a service node, comprising:
the restarting instruction receiving module is used for receiving a restarting triggering instruction aiming at the target service node;
a keep-alive parameter obtaining module, configured to obtain, in response to the restart trigger instruction, a long connection keep-alive parameter of a transmission control protocol corresponding to the target service node, where the long connection keep-alive parameter includes connection idle time before sending a probe packet, a time interval between two times of sending the probe packet, and probe times;
and the node restarting module is used for configuring the long connection keep-alive parameters and executing restarting operation on the target service node, wherein the parameter values of the long connection keep-alive parameters after configuration are lower than the parameter values before configuration.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of restarting the service node as recited in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of restarting a service node according to any one of claims 1 to 7.
CN202210035608.2A 2022-01-13 2022-01-13 Restarting method and apparatus for service node, electronic device and storage medium Pending CN114422428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210035608.2A CN114422428A (en) 2022-01-13 2022-01-13 Restarting method and apparatus for service node, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210035608.2A CN114422428A (en) 2022-01-13 2022-01-13 Restarting method and apparatus for service node, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114422428A true CN114422428A (en) 2022-04-29

Family

ID=81272734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210035608.2A Pending CN114422428A (en) 2022-01-13 2022-01-13 Restarting method and apparatus for service node, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114422428A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225690A (en) * 2022-06-22 2022-10-21 中科驭数(北京)科技有限公司 TCP long connection keep-alive method and device based on hardware protocol stack

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104252A1 (en) * 2006-10-31 2008-05-01 Mickey Henniger Resuming a computing session when rebooting a computing device
US20150149814A1 (en) * 2013-11-27 2015-05-28 Futurewei Technologies, Inc. Failure recovery resolution in transplanting high performance data intensive algorithms from cluster to cloud
CN107483260A (en) * 2017-08-28 2017-12-15 北京三快在线科技有限公司 Fault handling method and device, electronic equipment
CN109561164A (en) * 2017-09-27 2019-04-02 华为技术有限公司 Management method, device and the NAT device of NAT table item
CN111586140A (en) * 2020-04-30 2020-08-25 深圳市优必选科技股份有限公司 Data interaction method and server
US20210267004A1 (en) * 2020-02-21 2021-08-26 Arris Enterprises Llc Automatic backoff of a spectrum allocation server heartbeat
CN113452568A (en) * 2020-03-25 2021-09-28 上汽通用汽车有限公司 Vehicle communication method, communication system, vehicle, and storage medium
CN113905005A (en) * 2021-09-30 2022-01-07 完美世界(北京)软件科技发展有限公司 Client state updating method and device for instant messaging

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104252A1 (en) * 2006-10-31 2008-05-01 Mickey Henniger Resuming a computing session when rebooting a computing device
US20150149814A1 (en) * 2013-11-27 2015-05-28 Futurewei Technologies, Inc. Failure recovery resolution in transplanting high performance data intensive algorithms from cluster to cloud
CN107483260A (en) * 2017-08-28 2017-12-15 北京三快在线科技有限公司 Fault handling method and device, electronic equipment
CN109561164A (en) * 2017-09-27 2019-04-02 华为技术有限公司 Management method, device and the NAT device of NAT table item
US20210267004A1 (en) * 2020-02-21 2021-08-26 Arris Enterprises Llc Automatic backoff of a spectrum allocation server heartbeat
CN113452568A (en) * 2020-03-25 2021-09-28 上汽通用汽车有限公司 Vehicle communication method, communication system, vehicle, and storage medium
CN111586140A (en) * 2020-04-30 2020-08-25 深圳市优必选科技股份有限公司 Data interaction method and server
CN113905005A (en) * 2021-09-30 2022-01-07 完美世界(北京)软件科技发展有限公司 Client state updating method and device for instant messaging

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
尼恩: "《Java高并发核心编程 卷1》", 机械工业出版社, pages: 300 - 301 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225690A (en) * 2022-06-22 2022-10-21 中科驭数(北京)科技有限公司 TCP long connection keep-alive method and device based on hardware protocol stack
CN115225690B (en) * 2022-06-22 2024-04-19 中科驭数(北京)科技有限公司 TCP long connection keep-alive method and device based on hardware protocol stack

Similar Documents

Publication Publication Date Title
US8402305B1 (en) Method and system for providing high availability to computer applications
JP5872731B2 (en) Computer implemented method, non-transitory computer readable medium and computer system for communicating detection of link failure to each of a plurality of nodes of a cluster
US6314512B1 (en) Automatic notification of connection or system failure in asynchronous multi-tiered system by monitoring connection status using connection objects
US6687817B1 (en) Configuration of a network device via the network
CN101345663B (en) Heartbeat detection method and heartbeat detection apparatus
JP2001514773A (en) Reliable event delivery system
JPH1069449A (en) Device and method for recovering session between server and client
JP5039915B2 (en) Telnet session, telnet agency, and method of maintaining a computer network system
EP3605954B1 (en) State detection of netconf session
JP2007157148A6 (en) Telnet session, telnet agency, and method of maintaining a computer network system
CN114422428A (en) Restarting method and apparatus for service node, electronic device and storage medium
CN115801642B (en) RDMA communication management module, method, equipment and medium based on state control
US5894547A (en) Virtual route synchronization
CN112217718A (en) Service processing method, device, equipment and storage medium
CN110890989A (en) Channel connection method and device
JP2002026932A (en) Monitor control system
CN116346256A (en) Control method, device, equipment and medium for transferring and separating BFD information transmission
JPH1027159A (en) Communication line recovering system and its method
CN113568719A (en) Service fault processing method and device, electronic equipment and storage medium
CN116133058A (en) Session establishment method, system, device, equipment and storage medium
CN114205404A (en) Media stream holding method, device, electronic equipment and storage medium
CN117201575A (en) Data transmission method, device, equipment and medium
US20040054765A1 (en) Method and apparatus for accessing multiple system controllers within a computer system
JP2003050753A (en) OPERATION SYSTEM FOR AUTOMATIC RECOVERY Web SERVER
JPH06217001A (en) Restart recognizing system for switching node

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