CN110381042A - A kind of method, apparatus, medium and the electronic equipment of smooth restarting service - Google Patents

A kind of method, apparatus, medium and the electronic equipment of smooth restarting service Download PDF

Info

Publication number
CN110381042A
CN110381042A CN201910586266.1A CN201910586266A CN110381042A CN 110381042 A CN110381042 A CN 110381042A CN 201910586266 A CN201910586266 A CN 201910586266A CN 110381042 A CN110381042 A CN 110381042A
Authority
CN
China
Prior art keywords
service
mark
progress
work
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910586266.1A
Other languages
Chinese (zh)
Other versions
CN110381042B (en
Inventor
肖逸凯
曹志华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910586266.1A priority Critical patent/CN110381042B/en
Publication of CN110381042A publication Critical patent/CN110381042A/en
Application granted granted Critical
Publication of CN110381042B publication Critical patent/CN110381042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • 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/164Adaptation or special uses of UDP protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

Present disclose provides method, apparatus, medium and the electronic equipments of a kind of smooth restarting service.The described method includes: obtaining first service restarting information;The characteristic variable for discharging first timer according to the first service restarting information, and each UDP socket monitored being arranged saves first set of words mark;Wherein, the first set of words mark is different from the second socket mark;Second socket mark is the information saved in the characteristic variable for create after server resets the UDP socket that second progress of work is monitored;The first timer is used to discharge the UDP socket that the response time monitored is more than default first time.Disclosed method can realize configuration upgrading in the case where not influencing service object, reduce the resource occupation of system, improve response time and the processing capacity of system.

Description

A kind of method, apparatus, medium and the electronic equipment of smooth restarting service
Technical field
This disclosure relates to field of data communication, method, apparatus, medium in particular to a kind of smooth restarting service And electronic equipment.
Background technique
QUIC is that the support multiplexing based on UDP that proposes of Google, 0-1RTT build the Internet transport protocol of connection.Also It is to say, QUIC is an application layer protocol, and reliable data transmission, congestion control, data multiplex are only realized on the basis of UDP TCP, HTTP2 technologies such as multiplexing.QUIC code open source code in Chromium engineering.
Nginx is then the open source high efficiency Web server based on asynchronous event driven.The smooth restarting of Nginx Nginx server is restarted in the support of (Graceful Reload) function in the case where not interrupting existing service.It is held in smooth restarting After row, Nginx host process (i.e. Master process) can generate the new progress of work (i.e. Worker process), load new configuration, Worker process old simultaneously is carrying out if there is request, is not exited but is continued to execute until requesting whole execution thereon It finishes, and guarantee will be in new request scheduling to old Worker process yet simultaneously by Nginx.Smooth restarting can not close clothes The operations such as configuration upgrading are realized in the case where business.
In the realization of the QUIC access Nginx under Linux environment, since the Worker process of Nginx must be monitored in UDP Port corresponds to a UDP socket of bottom.When executing smooth restarting, on the one hand to guarantee not to be dispatched to new connection old Worker process on, on the other hand to guarantee that old thread exits in time after completion processing.In addition, QUIC has connection migration It is uninterrupted to be also able to maintain connection that is, after client handover network IP for the function of (Connection Migration).But This function can change four-tuple (for example changing client ip port), if therefore in smooth restarting to check UDP Bao Wuyuan Group differentiates new QUIC connection, ought will newly connect the connection in migration and be dispatched in new Worker process, so as to cause even Connect migration failure.
Summary of the invention
The Summary is provided so that with brief form introduction design, these designs will be in specific implementation below Mode part is described in detail.The Summary is not intended to identify the key feature of claimed technical solution or must Feature is wanted, is intended to be used to limit the range of the technical solution of required protection.
Method, apparatus, medium and the electronic equipment for being designed to provide a kind of smooth restarting service of the disclosure, can solve At least one technical problem certainly mentioned above.Concrete scheme is as follows:
It is answered according to the specific embodiment of the disclosure in a first aspect, the disclosure provides a kind of method of smooth restarting service First progress of work for being established before server resets, comprising:
Obtain first service restarting information;
First timer is discharged according to the first service restarting information, and the spy for each UDP socket monitored is set Levy variable save first set of words mark;Wherein, the first set of words mark is different from the second socket mark;Described second Socket mark is the information saved in the characteristic variable for create after server resets the UDP socket that second progress of work is monitored; The first timer is used to discharge the UDP socket that the response time monitored is more than default first time.
According to the specific embodiment of the disclosure, second aspect, the disclosure provides a kind of device of smooth restarting service, packet It includes:
First acquisition unit, for obtaining first service restarting information;
For discharging first timer according to the first service restarting information, and monitoring is arranged in first processing units The characteristic variable of each UDP socket saves first set of words mark;Wherein, the first set of words mark is different from second set Connect word mark;Second socket mark is that the feature for the UDP socket that second progress of work is monitored is created after server resets The information saved in variable;The first timer is used to discharge the UDP set that the response time monitored is more than default first time Connect word.
According to the specific embodiment of the disclosure, the third aspect, the disclosure provides a kind of computer readable storage medium, On be stored with computer program, when described program is executed by processor realize the smooth restarting service as described in any one of first aspect Method.
According to the specific embodiment of the disclosure, fourth aspect, the disclosure provides a kind of electronic equipment, comprising: one or Multiple processors;Storage device, for storing one or more programs, when one or more of programs are by one or more When a processor executes, so that one or more of processors realize the smooth restarting service as described in any one of first aspect Method.
According to the specific embodiment of the disclosure, the 5th aspect, the disclosure provides a kind of method of smooth restarting service, answers Host process for being established after server resets, comprising:
Obtain second service restarting information;
Second progress of work is established according to the second service restarting information, and respectively to each of establishing before server resets First progress of work sends first service restarting information.
According to the specific embodiment of the disclosure, the 6th aspect, the disclosure provides a kind of device of smooth restarting service, wraps It includes:
Second acquisition unit, for obtaining second service restarting information;
The second processing unit, for establishing second progress of work according to the second service restarting information, and respectively to clothes First progress of work of each of foundation sends first service restarting information before business is restarted.
According to the specific embodiment of the disclosure, the 7th aspect, the disclosure provides a kind of computer readable storage medium, On be stored with computer program, the smooth restarting service as described in any one in terms of the 5th is realized when described program is executed by processor Method.
According to the specific embodiment of the disclosure, eighth aspect, the disclosure provides a kind of electronic equipment, comprising: one or Multiple processors;Storage device, for storing one or more programs, when one or more of programs are by one or more When a processor executes, so that one or more of processors are realized such as smooth restarting service as described in any one in terms of the 5th Method.
The above scheme of the embodiment of the present disclosure compared with prior art, at least has the advantages that
Present disclose provides method, apparatus, medium and the electronic equipments of a kind of smooth restarting service.The described method includes: Obtain first service restarting information;Each of discharge first timer according to the first service restarting information, and monitoring is set The characteristic variable of UDP socket saves first set of words mark;Wherein, the first set of words mark is different from the second socket Mark;Second socket mark is that the characteristic variable for the UDP socket that second progress of work is monitored is created after server resets The information of middle preservation;The first timer is used to discharge the UDP socket that the response time monitored is more than default first time. Disclosed method can realize configuration upgrading in the case where not influencing service object, reduce the resource occupation of system, improve The response time of system and processing capacity.
Detailed description of the invention
In conjunction with attached drawing and refer to following specific embodiments, the above and other feature, advantage of each embodiment of the disclosure and Aspect will be apparent.In attached drawing, the same or similar appended drawing reference indicates the same or similar element.It should manage Solution attached drawing is schematically that original part and element are not necessarily drawn to scale.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the method for smooth restarting service according to the embodiment of the present disclosure;
Fig. 2 shows the unit block diagrams according to the device of the smooth restarting service of the embodiment of the present disclosure a kind of;
Fig. 3 shows the flow chart of the method for another smooth restarting service according to the embodiment of the present disclosure;
Fig. 4 shows the unit block diagram of the device of another smooth restarting service according to the embodiment of the present disclosure;
Fig. 5 shows electronic equipment attachment structure schematic diagram according to an embodiment of the present disclosure.
Specific embodiment
Embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the certain of the disclosure in attached drawing Embodiment, it should be understood that, the disclosure can be realized by various forms, and should not be construed as being limited to this In the embodiment that illustrates, providing these embodiments on the contrary is in order to more thorough and be fully understood by the disclosure.It should be understood that It is that being given for example only property of the accompanying drawings and embodiments effect of the disclosure is not intended to limit the protection scope of the disclosure.
It should be appreciated that each step recorded in disclosed method embodiment can execute in a different order, And/or parallel execution.In addition, method implementation may include additional step and/or omit the step of execution is shown.This public affairs The range opened is not limited in this respect.
Terms used herein " comprising " and its deformation are that opening includes, i.e., " including but not limited to ".Term "based" It is " being based at least partially on ".Term " one embodiment " expression " at least one embodiment ";Term " another embodiment " indicates " at least one other embodiment ";Term " some embodiments " expression " at least some embodiments ".The correlation of other terms is fixed Justice provides in will be described below.
It is noted that the concepts such as " first " that refers in the disclosure, " second " are only used for different devices, module or list Member distinguishes, and is not intended to limit the sequence or relation of interdependence of function performed by these devices, module or unit.
It is noted that referred in the disclosure "one", the modification of " multiple " be schematically and not restrictive this field It will be appreciated by the skilled person that being otherwise construed as " one or more " unless clearly indicate otherwise in context.
The being merely to illustrate property of title of the message or information that are interacted between multiple devices in disclosure embodiment Purpose, and be not used to limit the range of these message or information.
The alternative embodiment of the disclosure is described in detail with reference to the accompanying drawing.
To the first embodiment that the disclosure provides, i.e., a kind of embodiment of the method for smooth restarting service.The disclosure is implemented Example is applied to first progress of work established before server resets.
For example, Nginx is the high efficiency Web service end program based on asynchronous event driven;QUIC is based on UDP Multiplexing, 0-1RTT is supported to build the Internet transport protocol of connection;That is, QUIC is an application layer protocol, only exist TCP, HTTP2 technology such as reliable data transmission, congestion control, data multiplex are realized on the basis of UDP;Nginx with It is described including host process (i.e. Master process) and the progress of work (i.e. Worker process) in Nginx in the joint framework of QUIC First progress of work i.e. Worker process;Master process is mainly responsible for management Worker process, receives outer signals; Master process and Worker process all respectively have a main event circulation, are exactly an endless loop;The main event of Worker process Circulation then mainly calls ngx_process_events_and_timers (), handles event and timer expiry processing;One It may include one or more QUIC connections in a Worker process, each QUIC connection namely corresponds to a UDP socket.
The embodiment of the present disclosure is described in detail below with reference to Fig. 1, wherein Fig. 1 provides flat for the embodiment of the present disclosure The flow chart of the sliding method for restarting service.
Step S101 obtains first service restarting information.
For example, continuing above-mentioned example, the Master process that Nginx is managed after restarting to it sends smooth restarting order, so Afterwards, the new Worker process of Master process creation, and first service is sent to each Worker process established before restarting Restarting information (such as NGX_SHUTDOWN_SINGAL information).
Step S102 discharges first timer according to the first service restarting information, and each UDP set monitored is arranged The characteristic variable for connecing word saves first set of words mark.
Wherein, the first set of words mark is different from the second socket mark;The second socket mark is service The information saved in the characteristic variable for the UDP socket that second progress of work is monitored is created after restarting;The first timer is used It is more than the UDP socket of default first time in the response time that release is monitored.
Each first progress of work includes one or more UDP sockets, and each first progress of work has one the One timer.
In the case where normal use, when the first timer is used to discharge the response time monitored more than default first Between UDP socket, that is, when the request response time of some UDP socket is more than default first time, then first is fixed When device think the UDP socket communication abnormality, to no longer manage the UDP socket, that is, do not reprocess the UDP socket Communication information.The resource occupation that system can be reduced in this way improves response time and the processing capacity of system.
It, can be in order to improve the management to UDP socket for example, since UDP socket is a connectionless socket A protocol stack is established, the information of each UDP socket is stored in the protocol stack, first timer is by managing the protocol stack UDP socket in management work process, after first timer thinks the UDP socket communication abnormality, by the UDP socket It is cleared up away from the protocol stack.
The embodiment of the present disclosure shows that first progress of work will no longer be built by the first timer of first progress of work of release New UDP socket is found, but still continues the work of existing UDP socket in first progress of work, until all UDP are socketed Until the work of word terminates.
The characteristic variable of each UDP socket by monitoring is set as first set of words mark;Wherein, described first The second socket that socket mark is different from the UDP socket for creating the monitoring of second progress of work after server resets identifies, It is exactly that UDP socket work is being distinguished in the first work by the difference of first set of words mark and the second socket mark In process or second progress of work, to avoid new UDP socket request scheduling into first progress of work.
For example, continue above-mentioned example, in combining in framework for Nginx and QUIC, the characteristic variable of UDP socket is QUIC The SOL_SOCKET descriptor rank of UDP socket in connection;After restarting, first progress of work by all UDP sockets SOL_SOCKET descriptor rank is set as first set of words and identifies (such as SOL_LOCK_SOCKET), and second progress of work The SOL_SOCKET descriptor ranks of all UDP sockets be set as first set of words mark (such as SO_LOCK_ FILTER), then the kernel module of QUIC according to the SOL_SOCKET descriptor of UDP socket identifies whether the socket is first The progress of work, so that avoiding will be in new QUIC request scheduling to first progress of work.
In order to guarantee smooth restarting service, the embodiment of the present disclosure provides the first storage variable and the second storage variable.? After the acquisition first service restarting information, further includes:
Step S101-1, according to first service restarting information setting the first storage variable save server resets mark.
First progress of work identifies the main flow to first progress of work by the server resets of the first storage variable save Transmit the information of server resets.After the main flow of first progress of work obtains the information of server resets, first progress of work The storage variable save non-serving of setting first is restarted into mark, so that first progress of work can restart to receive new first Server resets information.
The method, further includes:
Step S103 obtains the first storage variable.
Step S104, judges whether the preservation information of the first storage variable matches with server resets mark.
Step S105, if so, setting the second storage variable save exits mark.
First progress of work is transmitted by the mark that exits of the second storage variable save to the main flow of first progress of work The operation information exited.
The method, further includes:
Step S106 obtains the second storage variable.
Step S107, judges whether the preservation information of the second storage variable matches with the mark that exits.
Step S108 discharges UDP socket and corresponding second fixed if so, after the communication of each UDP socket When device after, into wait closed state.
After mark is exited in the main flow acquisition of first progress of work, first progress of work continues to first progress of work prison The each UDP socket communication work listened.Each UDP socket has a second timer, which is used for The exception information for handling UDP socket, when the operation of UDP socket exceeds preset time, then second timer is by UDP socket Release, that is, stop the communication of the UDP socket, the resource occupation of system can be reduced in this way, when improving the response of system Between and processing capacity.
After the UDP socket communication in first progress of work, the release release UDP socket of first progress of work Word and corresponding second timer.
When first progress of work detects no longer remaining first timer and second timer in process, then into waiting pass Closed state.
Disclosure application embodiment provides the method for two kinds of first progresses of work of closing.First method, the entrance Wait closed state, comprising:
Step S108-1, setting third store variable save mark to be released.
This method waits host process to obtain third and stores variable save mark to be released, then, is closed and is corresponded to by host process First progress of work.
Second method, described into after waiting closed state, comprising:
Step S108-1, discharges this progress of work.
This method closes own process by first progress of work.
After the second storage of setting variable save exits mark, further includes:
Step S105-1, setting the first storage variable save non-serving restart mark.
So that first progress of work restarts to receive new first service restarting information.
The method of the embodiment of the present disclosure can realize configuration upgrading in the case where not influencing service object, reduce system Resource occupation improves response time and the processing capacity of system.
Corresponding with the first embodiment that the disclosure provides, the disclosure additionally provides second embodiment, i.e., a kind of smooth weight Open the device of service.Since second embodiment is substantially similar to first embodiment, so describe fairly simple, relevant part Refer to the corresponding explanation of first embodiment.Installation practice described below is only schematical.
Fig. 2 shows a kind of embodiments of the device of smooth restarting service of disclosure offer.Fig. 2 is the embodiment of the present disclosure The unit block diagram of the device of the smooth restarting service of offer.
Shown in Figure 2, the disclosure provides a kind of device of smooth restarting service, comprising: first acquisition unit 201, First processing units 202.
First acquisition unit 201, for obtaining first service restarting information;
First processing units 202 for discharging first timer according to the first service restarting information, and are arranged and monitor Each UDP socket characteristic variable save first set of words mark;Wherein, the first set of words mark is different from second Socket mark;Second socket mark is that the spy for the UDP socket that second progress of work is monitored is created after server resets The information saved in sign variable;The first timer is used to discharge the UDP that the response time monitored is more than default first time Socket.
Optionally, in the first acquisition unit 201, further includes:
Server resets are set and identify subelement, for being protected according to first service restarting information setting the first storage variable Deposit server resets mark.
Optionally, in said device, further includes:
The first storage variable cell is obtained, for obtaining the first storage variable;
Judge first storage variable cell, for judge it is described first storage variable preservation information whether with the service Restart mark to match;
Setting the second storage variable cell, if for the output result for judging the first storage variable cell for "Yes", Then the second storage of setting variable save exits mark.
Optionally, in said device, further includes:
The second storage variable cell is obtained, for obtaining the second storage variable;
The second storage variable cell is judged, for judging whether the preservation information of the second storage variable exits with described Mark matches;
Closing unit, if for the output result for judging the second storage variable cell for "Yes", when each UDP covers After connecing word communication end and discharging corresponding second timer, into waiting closed state.
Optionally, in the closing unit, comprising:
Subelement is set, for third storage variable save mark to be released to be arranged.
Optionally, in the closing unit, comprising:
Subelement is discharged, for discharging this progress of work.
Optionally, in the second storage of setting variable cell, further includes:
Setting non-serving restarts mark subelement, restarts mark for the first storage variable save non-serving to be arranged.
The method of the embodiment of the present disclosure can realize configuration upgrading in the case where not influencing service object, reduce system Resource occupation improves response time and the processing capacity of system.
The 3rd embodiment that the disclosure provides, i.e., a kind of embodiment of the method for smooth restarting service are applied to service weight The host process established after opening.Since 3rd embodiment is associated with first embodiment, so describe fairly simple, relevant portion Divide the corresponding explanation for referring to first embodiment.
The embodiment of the present disclosure is described in detail below with reference to Fig. 3, wherein Fig. 3 is shown according to the embodiment of the present disclosure Another smooth restarting service method flow chart.
Step S301 obtains second service restarting information.
The second service restarting information is to send the information for the host process established after server resets to by the service restarted.
Step S302 establishes second progress of work according to the second service restarting information, and respectively to before server resets First progress of work of each of foundation sends first service restarting information.
Second progress of work is the new progress of work established after server resets, is different from and establishes before server resets First progress of work.
It is described to send first service restarting information to each of establishing first progress of work before server resets respectively, that is, First progress of work is notified to execute server resets operation.
Optionally, the method also includes:
Step S303 obtains the third storage variable of each first progress of work respectively.
The information saved in third storage variable is arranged by first progress of work.It is tied when each UDP socket communicates Beam and after discharging corresponding second timer, first progress of work is arranged third and stores variable save mark to be released.
Step S304, judge respectively each third storage variable preservation information whether with mark phase to be released Match.
Step S305, if so, corresponding first progress of work of release.
This method host process obtains the mark to be released of third storage variable save, and then, host process closes corresponding the One progress of work.The method for generalling use positive closing closes first progress of work.
The method of the embodiment of the present disclosure can realize configuration upgrading in the case where not influencing service object, reduce system Resource occupation improves response time and the processing capacity of system.
Corresponding with the 3rd embodiment that the disclosure provides, the disclosure additionally provides fourth embodiment, i.e., a kind of smooth weight Open the device of service.Since fourth embodiment is substantially similar to 3rd embodiment, so describe fairly simple, relevant part Refer to the corresponding explanation of 3rd embodiment.Installation practice described below is only schematical.
Fig. 4 shows a kind of embodiment of the device of smooth restarting service of disclosure offer.Fig. 4 is shown according to this public affairs Open the unit block diagram of the device of another smooth restarting service of embodiment.
Shown in Figure 4, the disclosure provides a kind of device of smooth restarting service, comprising: second acquisition unit 401, The second processing unit 402.
Second acquisition unit 401, for obtaining second service restarting information;
The second processing unit 402, for establishing second progress of work according to the second service restarting information, and respectively to First progress of work each of is established before server resets sends first service restarting information.
Optionally, in said device, further includes:
It obtains third and stores variable subelement, the third for obtaining each first progress of work respectively stores variable;
Judge mark subelement to be released, for judge respectively each third storage variable preservation information whether with Mark to be released matches;
The first progress of work subelement is discharged, if for the output for judging mark subelement to be released for "Yes", Discharge corresponding first progress of work.
The method of the embodiment of the present disclosure can realize configuration upgrading in the case where not influencing service object, reduce system Resource occupation improves response time and the processing capacity of system.
The embodiment of the present disclosure provides the 5th embodiment, i.e. a kind of electronic equipment, and the equipment is for smooth restarting service Method, the electronic equipment, comprising: at least one processor;And the storage being connect at least one described processor communication Device;Wherein,
The memory is stored with the instruction that can be executed by one processor, and described instruction is by described at least one It manages device to execute, so that the method that at least one described processor is able to carry out smooth restarting service as in the first embodiment.
The embodiment of the present disclosure provides sixth embodiment, i.e. a kind of electronic equipment, and the equipment is for smooth restarting service Method, the electronic equipment, comprising: at least one processor;And the storage being connect at least one described processor communication Device;Wherein,
The memory is stored with the instruction that can be executed by one processor, and described instruction is by described at least one It manages device to execute, so that the method that at least one described processor is able to carry out the smooth restarting service as described in 3rd embodiment.
The embodiment of the present disclosure provides the 7th embodiment, i.e., a kind of computer readable storage medium, the computer storage Media storage has computer executable instructions, the computer executable instructions it is executable as described in the first embodiment described in put down The sliding method for restarting service.
The embodiment of the present disclosure provides the 8th embodiment, i.e., a kind of computer readable storage medium, the computer storage Media storage has computer executable instructions, the executable smooth restarting as described in the third embodiment of the computer executable instructions The method of service.
For the fifth embodiment of the present disclosure, sixth embodiment, the 7th embodiment and the 8th embodiment.Below with reference to Fig. 5, Show the structural schematic diagram for being suitable for the electronic equipment for being used to realize the embodiment of the present disclosure.Terminal device in the embodiment of the present disclosure It can include but is not limited to such as mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD The mobile terminal of (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle mounted guidance terminal) etc. with And the fixed terminal of such as number TV, desktop computer etc..Electronic equipment shown in Fig. 5 is only an example, should not be right The function and use scope of the embodiment of the present disclosure bring any restrictions.
As shown in figure 5, electronic equipment may include processing unit (such as central processing unit, graphics processor etc.) 501, Random access storage device can be loaded into according to the program being stored in read-only memory (ROM) 502 or from storage device 508 (RAM) program in 503 and execute various movements appropriate and processing.In RAM 503, it is also stored with electronic device institute The various programs and data needed.Processing unit 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/defeated (I/O) interface 505 is also connected to bus 504 out.
In general, following device can connect to I/O interface 505: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 506 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 507 of dynamic device etc.;Storage device 508 including such as tape, hard disk etc.;And communication device 509.Communication device 509, which can permit electronic equipment, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 5, which is shown, to be had respectively The electronic equipment of kind device, it should be understood that being not required for implementing or having all devices shown.It can be alternatively real Apply or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising being carried on non-transient computer can The computer program on medium is read, which includes the program code for method shown in execution flow chart.At this In the embodiment of sample, which can be downloaded and installed from network by communication device 509, or be filled from storage It sets 508 to be mounted, or is mounted from ROM 502.When the computer program is executed by processing unit 501, the disclosure is executed The above-mentioned function of being limited in the method for embodiment.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
In some embodiments, client, server can use such as HTTP (HyperText Transfer Protocol, hypertext transfer protocol) etc the network protocols of any currently known or following research and development communicated, and can To be interconnected with the digital data communications (for example, communication network) of arbitrary form or medium.The example of communication network includes local area network (" LAN "), wide area network (" WAN "), Internet (for example, internet) and ad-hoc network are (for example, the end-to-end net of ad hoc Network) and any currently known or following research and development network.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity When sub- equipment executes, so that the electronic equipment: obtaining at least two internet protocol addresses;Send to Node evaluation equipment includes institute State the Node evaluation request of at least two internet protocol addresses, wherein the Node evaluation equipment is internet from described at least two In protocol address, chooses internet protocol address and return;Receive the internet protocol address that the Node evaluation equipment returns;Its In, the fringe node in acquired internet protocol address instruction content distributing network.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs When being executed by the electronic equipment, so that the electronic equipment: receiving the Node evaluation including at least two internet protocol addresses and request; From at least two internet protocol address, internet protocol address is chosen;Return to the internet protocol address selected;Wherein, The fringe node in internet protocol address instruction content distributing network received.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include but is not limited to object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Function described herein can be executed at least partly by one or more hardware logic components.Example Such as, without limitation, the hardware logic component for the exemplary type that can be used include: field programmable gate array (FPGA), specially With integrated circuit (ASIC), Application Specific Standard Product (ASSP), system on chip (SOC), complex programmable logic equipment (CPLD) etc. Deng.
In the context of the disclosure, machine readable media can be tangible medium, may include or is stored for The program that instruction execution system, device or equipment are used or is used in combination with instruction execution system, device or equipment.Machine can Reading medium can be machine-readable signal medium or machine-readable storage medium.Machine readable media can include but is not limited to electricity Son, magnetic, optical, electromagnetism, infrared or semiconductor system, device or equipment or above content any conjunction Suitable combination.The more specific example of machine readable storage medium will include the electrical connection of line based on one or more, portable meter Calculation machine disk, hard disk, random access memory (RAM), read-only memory (ROM), Erasable Programmable Read Only Memory EPROM (EPROM Or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage facilities or Any appropriate combination of above content.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.
Although this is not construed as requiring these operations with institute in addition, depicting each operation using certain order The certain order that shows executes in sequential order to execute.Under certain environment, multitask and parallel processing may be advantageous 's.Similarly, although containing several specific implementation details in being discussed above, these are not construed as to this public affairs The limitation for the range opened.Certain features described in the context of individual embodiment can also be realized in combination single real It applies in example.On the contrary, the various features described in the context of single embodiment can also be individually or with any suitable The mode of sub-portfolio is realized in various embodiments.
Although having used specific to this theme of the language description of structure feature and/or method logical action, answer When understanding that theme defined in the appended claims is not necessarily limited to special characteristic described above or movement.On on the contrary, Special characteristic described in face and movement are only to realize the exemplary forms of claims.

Claims (15)

1. a kind of method of smooth restarting service, applied to first progress of work established before server resets, which is characterized in that packet It includes:
Obtain first service restarting information;
First timer is discharged according to the first service restarting information, and the feature that each UDP socket monitored is arranged becomes Amount saves first set of words mark;Wherein, the first set of words mark is different from the second socket mark;Second socket Word mark is the information saved in the characteristic variable for create after server resets the UDP socket that second progress of work is monitored;It is described First timer is used to discharge the UDP socket that the response time monitored is more than default first time.
2. the method according to claim 1, wherein after the acquisition first service restarting information, further includes:
According to first service restarting information setting the first storage variable save server resets mark.
3. according to the method described in claim 2, it is characterized in that, the method, further includes:
Obtain the first storage variable;
Judge whether the preservation information of the first storage variable matches with server resets mark;
If so, setting the second storage variable save exits mark.
4. according to the method described in claim 3, it is characterized in that, the method, further includes:
Obtain the second storage variable;
Judge whether the preservation information of the second storage variable matches with the mark that exits;
If so, after each UDP socket, which communicates, to be terminated and discharge corresponding second timer, into waiting closed state.
5. according to the method described in claim 4, it is characterized in that, described enter waiting closed state, comprising:
Third is set and stores variable save mark to be released.
6. according to the method described in claim 4, it is characterized in that, described into after waiting closed state, comprising:
Discharge this progress of work.
7. according to the method described in claim 3, it is characterized in that, exiting mark in the second storage of setting variable save Afterwards, further includes:
Setting the first storage variable save non-serving restarts mark.
8. a kind of device of smooth restarting service characterized by comprising
First acquisition unit, for obtaining first service restarting information;
First processing units, for discharging first timer, and each of setting monitoring according to the first service restarting information The characteristic variable of UDP socket saves first set of words mark;Wherein, the first set of words mark is different from the second socket Mark;Second socket mark is that the characteristic variable for the UDP socket that second progress of work is monitored is created after server resets The information of middle preservation;The first timer is used to discharge the UDP socket that the response time monitored is more than default first time.
9. a kind of method of smooth restarting service, applied to the host process established after server resets characterized by comprising
Obtain second service restarting information;
Second progress of work is established according to the second service restarting information, and respectively to each of establishing first before server resets The progress of work sends first service restarting information.
10. according to the method described in claim 9, it is characterized in that, the method also includes:
The third storage variable of each first progress of work is obtained respectively;
Judge whether the preservation information of each third storage variable matches with mark to be released respectively;
If so, corresponding first progress of work of release.
11. a kind of device of smooth restarting service characterized by comprising
Second acquisition unit, for obtaining second service restarting information;
The second processing unit, for establishing second progress of work according to the second service restarting information, and respectively to service weight First progress of work of each of foundation sends first service restarting information before opening.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed The method as described in any one of claims 1 to 7 is realized when device executes.
13. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize the method as described in any one of claims 1 to 11.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed The method as described in any one of claim 9 to 10 is realized when device executes.
15. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize the method as described in any one of claim 9 to 10.
CN201910586266.1A 2019-07-01 2019-07-01 Graceful restart service method, device, medium and electronic equipment Active CN110381042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910586266.1A CN110381042B (en) 2019-07-01 2019-07-01 Graceful restart service method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910586266.1A CN110381042B (en) 2019-07-01 2019-07-01 Graceful restart service method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110381042A true CN110381042A (en) 2019-10-25
CN110381042B CN110381042B (en) 2021-11-12

Family

ID=68251513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910586266.1A Active CN110381042B (en) 2019-07-01 2019-07-01 Graceful restart service method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110381042B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756776A (en) * 2020-07-28 2020-10-09 支付宝(杭州)信息技术有限公司 Server, message distribution device, program handover system, and program handover method
CN113132065A (en) * 2019-12-30 2021-07-16 西安诺瓦星云科技股份有限公司 Data communication method, device and system, storage medium and video processing equipment
CN113973130A (en) * 2021-11-19 2022-01-25 杭州安恒信息技术股份有限公司 Smooth service publishing method based on haproxy and related device
CN114827096A (en) * 2022-03-14 2022-07-29 网宿科技股份有限公司 RTMP connection migration method, device, equipment and readable storage medium
WO2022166608A1 (en) * 2021-02-08 2022-08-11 北京金山云网络技术有限公司 Quic-based service upgrade method and apparatus, and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117923A (en) * 2013-01-18 2013-05-22 杭州华三通信技术有限公司 Process management method and process management equipment
CN106209469A (en) * 2016-07-21 2016-12-07 杭州迪普科技有限公司 The method and device that process is restarted
CN106603272A (en) * 2016-11-17 2017-04-26 上海斐讯数据通信技术有限公司 Controller protection method and system based on smooth restart
CN106844137A (en) * 2016-12-08 2017-06-13 腾讯科技(深圳)有限公司 The monitoring method and device of server
CN107147573A (en) * 2016-03-01 2017-09-08 中兴通讯股份有限公司 Smooth restarting processing method and processing device
US20180006943A1 (en) * 2016-06-29 2018-01-04 Nicira, Inc. Installation of Routing Tables for Logical Router in Route Server Mode
CN109918115A (en) * 2019-03-07 2019-06-21 成都品果科技有限公司 A kind of method and system of software function publication

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117923A (en) * 2013-01-18 2013-05-22 杭州华三通信技术有限公司 Process management method and process management equipment
CN107147573A (en) * 2016-03-01 2017-09-08 中兴通讯股份有限公司 Smooth restarting processing method and processing device
US20180006943A1 (en) * 2016-06-29 2018-01-04 Nicira, Inc. Installation of Routing Tables for Logical Router in Route Server Mode
CN106209469A (en) * 2016-07-21 2016-12-07 杭州迪普科技有限公司 The method and device that process is restarted
CN106603272A (en) * 2016-11-17 2017-04-26 上海斐讯数据通信技术有限公司 Controller protection method and system based on smooth restart
CN106844137A (en) * 2016-12-08 2017-06-13 腾讯科技(深圳)有限公司 The monitoring method and device of server
CN109918115A (en) * 2019-03-07 2019-06-21 成都品果科技有限公司 A kind of method and system of software function publication

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113132065A (en) * 2019-12-30 2021-07-16 西安诺瓦星云科技股份有限公司 Data communication method, device and system, storage medium and video processing equipment
CN111756776A (en) * 2020-07-28 2020-10-09 支付宝(杭州)信息技术有限公司 Server, message distribution device, program handover system, and program handover method
CN111756776B (en) * 2020-07-28 2023-03-24 支付宝(杭州)信息技术有限公司 Server, message distribution device, program handover system, and program handover method
WO2022166608A1 (en) * 2021-02-08 2022-08-11 北京金山云网络技术有限公司 Quic-based service upgrade method and apparatus, and electronic device
CN114915669A (en) * 2021-02-08 2022-08-16 北京金山云网络技术有限公司 Service upgrading method and device based on QUIC protocol and electronic equipment
CN113973130A (en) * 2021-11-19 2022-01-25 杭州安恒信息技术股份有限公司 Smooth service publishing method based on haproxy and related device
CN114827096A (en) * 2022-03-14 2022-07-29 网宿科技股份有限公司 RTMP connection migration method, device, equipment and readable storage medium
CN114827096B (en) * 2022-03-14 2023-10-24 网宿科技股份有限公司 RTMP connection migration method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN110381042B (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN110381042A (en) A kind of method, apparatus, medium and the electronic equipment of smooth restarting service
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN111800462B (en) Micro service instance processing method, micro service instance processing device, computer equipment and storage medium
CN106547578A (en) The loading method and device of terminal applies APP
US20240118928A1 (en) Resource allocation method and apparatus, readable medium, and electronic device
CN115185647B (en) virtio equipment direct connection method and related device
CN109783151B (en) Method and device for rule change
CN111580974B (en) GPU instance allocation method, device, electronic equipment and computer readable medium
CN109885612A (en) The synchronization take-effective method and device of block chain intelligence contract
CN113553178A (en) Task processing method and device and electronic equipment
CN112416616B (en) Micro-service calling method and device, electronic equipment and storage medium
CN110275736A (en) Obtain operation data method, apparatus, equipment and the readable medium of application program
CN115237589A (en) SR-IOV-based virtualization method, device and equipment
CN112306685B (en) Task isolation method, device, electronic equipment and computer readable medium
CN112416887B (en) Information interaction method and device and electronic equipment
CN113886105B (en) Cross-process calling method and device, storage medium and electronic equipment
CN110113412A (en) A kind of method of data synchronization and device
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN110502891A (en) A kind of method, apparatus, medium and electronic equipment obtaining proceeding internal memory leakage
CN115686813A (en) Resource scheduling method and device, electronic equipment and storage medium
CN112837156A (en) Transaction method and device with fixed execution sequence
CN110221854A (en) A kind of multi-process data-updating method, device, medium and electronic equipment
CN111182062A (en) Service multi-live calling method and system and electronic equipment
CN111324888B (en) Verification method and device for application program starting, electronic equipment and storage medium
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.