CN106559485B - A kind of method and device of control server shutdown - Google Patents

A kind of method and device of control server shutdown Download PDF

Info

Publication number
CN106559485B
CN106559485B CN201611027654.9A CN201611027654A CN106559485B CN 106559485 B CN106559485 B CN 106559485B CN 201611027654 A CN201611027654 A CN 201611027654A CN 106559485 B CN106559485 B CN 106559485B
Authority
CN
China
Prior art keywords
session
list item
server
business
message
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.)
Active
Application number
CN201611027654.9A
Other languages
Chinese (zh)
Other versions
CN106559485A (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.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201611027654.9A priority Critical patent/CN106559485B/en
Publication of CN106559485A publication Critical patent/CN106559485A/en
Application granted granted Critical
Publication of CN106559485B publication Critical patent/CN106559485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The application provides a kind of method and device of control server shutdown.In the application, load-balancing device keeps list item to ask from last time is interviewed by the corresponding session of a certain business of real-time monitoring, whether the duration passed through reaches preset threshold, it may determine that whether the business is also executing, to when the business needs to complete with multiple sessions, it realizes all conversation dispatchings of the business to same server, guarantees normally completing for the business.

Description

A kind of method and device of control server shutdown
Technical field
This application involves the method and devices that network communication technology field more particularly to a kind of control server are shut down.
Background technique
In today of network service high speed development, server plays important role in network service acceptance procedure. For example, a server may need to accept a plurality of types of business in application scenarios as shown in Figure 1.In a server When needing to deactivate maintenance, if the server is made directly to shut down, the certain business that may be accepted to the server are impacted.
For this case, the prior art generally provides a kind of soft-off mechanism: starting soft-off for a server It, still can be by the allocated current sessions flow scheduling to the server to the server, and in current sessions after mechanism When flow is transmitted, controls server shutdown and complete.But when the business of a certain client device is needed by multiple sessions When cooperation is completed, all session traffics of this business can not be dispatched to same server using soft-off mechanism, finally Cause to impact this business of the client device.
Summary of the invention
In view of this, the application provides a kind of method and device of control server shutdown, to receive for a certain The shutdown command of server, and the server also execute from multiple sessions with completion business when, avoid making the business At influence.
According to the embodiment of the present application in a first aspect, providing a kind of method of control server shutdown, the method application In load-balancing device, which comprises
Shutdown command is received, the shutdown command carries the identification information of server to be shut down;
It is kept in table in preconfigured session, determines that record has the session of the identification information of the server to be shut down to protect Hold list item;Each list item in the session holding table has recorded the mark and dispatch server of one group of client device respectively The corresponding relationship of mark, for describing a business between the client device and the dispatch server, and every time, business is grasped Work can be triggered to the access behavior with the business corresponding table item;
Keep list item for identified session, the real-time monitoring list item is asked from last time is interviewed, passed through when Whether length reaches preset threshold, and server shutdown to be shut down is controlled if reaching.
According to the second aspect of the embodiment of the present application, a kind of device of control server shutdown, described device application are provided In load-balancing device, described device includes:
Instruction receiving unit, for receiving shutdown command, the shutdown command carries the identification information of server to be shut down;
List item determination unit determines that record has the server to be shut down for keeping in table in preconfigured session Identification information session keep list item;Each list item in the session holding table has recorded one group of client device respectively Mark and dispatch server mark corresponding relationship, for describing one between the client device and the dispatch server Business, and business operation can be triggered to the access behavior with the business corresponding table item every time;
It shuts down control unit, for keeping list item for identified session, the real-time monitoring list item is from last time quilt It accesses, whether the duration passed through reaches preset threshold, and server shutdown to be shut down is controlled if reaching.
In the application, load-balancing device keeps list item from last time by the corresponding session of a certain business of real-time monitoring Interviewed to ask, whether the duration passed through reaches preset threshold, can determine whether the corresponding operation of the business is also accessing Session keeps list item, to judge whether the business is also executing.Only the completion of current sessions is made compared with the prior art For judgment criteria to complete shutdown, the application can just control after the complete current all business of server process to be shut down Server shutdown, to be realized all conversation dispatchings of the business extremely when the business needs to complete with multiple sessions Same server, and finally guarantee normally completing for the business.
Detailed description of the invention
Fig. 1 is the schematic diagram of a scenario of the method for the illustrative control server of the application one shutdown;
Fig. 2 is a kind of flow chart of the method for control server shutdown of the application;
Fig. 3 is a kind of one embodiment flow chart of the method for control server shutdown of the application;
Fig. 4 is that illustratively record has the session of the identification information of server to be shut down to keep list item signal to the application one Figure.
Fig. 5 is a kind of a kind of structural schematic diagram of the device of control server shutdown of the application;
Fig. 6 is the structural schematic diagram of shutdown control unit in a kind of device of control server shutdown of the application.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application. It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Fig. 1 is the schematic diagram of a scenario of the method for the illustrative control server of the application one shutdown.In this schematic diagram, it there is no harm in Assuming that: when load-balancing device 12 receives the shutdown command to shut down for server to be shut down, clothes to be shut down Business device is carrying out the business 1 that client device 11 is requested, and the business 1 must be complete with session 1, session 2 and session 3 At.It will be appreciated by those skilled in the art that being several request messages that above-mentioned each session can be sent by client device 11 Composition, if server to be shut down directly shut down at this time, which will cannot reprocess what client device 11 was sent Any request, eventually leading to the business 1 that client device 11 is requested can not normally complete.
For this problem, the soft-off mechanism that the prior art provides can execute currently in above-mentioned server to be shut down After session, then server shutdown to be shut down is controlled, at the same time, for other sessions in the business, is then calculated according to scheduling Method is dispatched to the server of normal work, or directly carries out packet loss processing.Specifically, it is directed to former processing method, If in the business 1 that client device 11 is requested, the target of session 1 is to be added to the authentication information of client device 11 Server to be shut down, and the target of session 2 is to pass through the authentication of the server based on above-mentioned authentication information, and obtaining should Video data on server, then the soft-off mechanism provided according to the prior art, load-balancing device can be in clothes to be shut down Business device controls server completion shutdown to be shut down after having handled session 1, and is dispatched to session 2 normally according to dispatching algorithm The server of work, still, since the authentication of client device 11 is not stored in advance for the server of the normal work Information can not normally complete so the video data needed for it can not be provided for client device 11 so as to cause business 1.
In view of this, what will not be handled the server appoints to guarantee when executing power-off operation to certain server What business has any impact, and this application provides a kind of methods of control server shutdown.This method is by for each business It introduces session and keeps list item, and the real-time monitoring session keeps whether the aging duration of list item reaches preset threshold, it can be determined that Whether the corresponding business of the list item is also executing out.Compared with the prior art only using the completion of current sessions as completion shutdown For judgment criteria, the application ability control server can shut down after the complete current all business of server process to be shut down, To when the business needs to complete with multiple sessions, realize all conversation dispatchings of the business to same service Device, and finally guarantee normally completing for the business.It should be pointed out that above-mentioned session keeps the aging duration of list item to refer to from this List item last time is interviewed to be asked, the duration passed through.Above-mentioned server to be shut down may be to carry on certain server One specific service.
In order to make those skilled in the art more fully understand the technical solution in the embodiment of the present application, and keep the application real The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to technical side in the embodiment of the present application Case is described in further detail.
Referring to fig. 2, Fig. 2 is a kind of one embodiment flow chart of the method for control server shutdown of the application, the process Figure may comprise steps of:
Step 201: load-balancing device receives shutdown command, which carries the mark letter of server to be shut down Breath.
In the present embodiment, the shutdown command that load-balancing device receives can be given birth to by network management personnel's manual configuration At can also carry in the message of server transmission to be shut down.The identification information of server can interconnect between network The agreement address (IP:Internet Protocol Address) and media access control (MAC:Media Access Control) address etc..
Step 202: load-balancing device is kept in table in preconfigured session, determines that record has server to be shut down The session of identification information keeps list item.
In the present embodiment, each list item in session holding table has recorded the mark and tune of one group of client device respectively Spend the corresponding relationship of server identification, for describing a business between the client device and the dispatch server, and every Secondary business operation can be triggered to the access behavior with the business corresponding table item.Wherein the mark of client device can be the visitor The IP address of family end equipment.
Step 203: load-balancing device keeps list item for identified session, and the real-time monitoring list item is from for the last time Interviewed to ask, whether the duration passed through reaches preset threshold, and server shutdown to be shut down is controlled if reaching.
In the present embodiment, load-balancing device keeps list item for identified session, the list item of institute's real-time monitoring from Last time is interviewed to be asked, and the duration passed through is the aging duration of the list item, when the aging duration of the list item reaches default When threshold value, it is believed that the operation of business corresponding to the list item does not access the list item in one section of duration, that is, has shown the business Through completing.
As a preferred embodiment, if load-balancing device judges the list item, corresponding aging duration not yet reaches To preset threshold, then it is assumed that the corresponding business of the list item is still executing, at this point, load-balancing device is receiving client device When the message of the correspondence of the transmission business, it will continue to the corresponding dispatching message of the business to server to be shut down, to guarantee The client device business smoothly completes.
Load-balancing device keeps list item by the corresponding session of a certain business of real-time monitoring it can be seen from the above process It is asked from last time is interviewed, whether the duration passed through reaches preset threshold, can determine that the corresponding operation of the business is It is no also to keep list item in access session, to judge whether the business is also executing.Compared with the prior art only current meeting For the completion of words is as the judgment criteria for completing shutdown, the application can be in the complete current all industry of server process to be shut down Ability control server is shut down after business, to realize when the business needs to complete with multiple sessions by all of the business Conversation dispatching finally guarantees normally completing for the business to same server.
Present invention also provides a kind of another embodiments of the method for control server shutdown.Implement with above method Unlike example, present embodiment assumes that: when load-balancing device receives the shutdown command of server to be shut down, this is to be shut down Server is carrying out business 1, and the business 1 is completed with three sessions, these three sessions be respectively session 1, session 2 with And session 3, the present embodiment will be described in detail below:
Load-balancing device receives shutdown command, which carries the identification information of server to be shut down.
In the present embodiment, the identification information of the shutdown command and server that receive about load-balancing device has existed It is described in detail in step 201, details are not described herein.
Load-balancing device is kept in table in preconfigured session, determines that record has the identification information of server to be shut down Session keep list item.
In the present embodiment, the content recorded in list item and session is kept to keep the relationship of list item and business about session It is described in detail in step 202, details are not described herein.
As a preferred embodiment, it is assumed that the identification information of server to be shut down is the IP address of the server 8.8.8.8, the identification information for sending the client device of service message is the IP address 1.1.1.1 of the client device, then Record has the session of server identification information to be shut down to keep list item that can be expressed as form as shown in Figure 4, which keeps List item describes a business between client device 1.1.1.1 and server 8.8.8.8 to be shut down, is denoted as business 1.
Load-balancing device keeps list item for identified session, and whether the aging duration of the real-time monitoring list item reaches Preset threshold controls server shutdown to be shut down if reaching.
In the present embodiment, which can be 300 seconds, then load-balancing device can set one according to practical application A cycle monitoring timer simultaneously sets the monitoring cycle of the timer as 15 seconds, i.e., was a minimum monitoring cycle with 15 seconds, real When monitor the aging duration of the list item and whether reach above-mentioned 300 seconds preset thresholds, service to be shut down is controlled if reaching Device shutdown.It should be pointed out that any one business operation of business 1, which can all be hit, to be determined in the implementation procedure of business 1 Session keep list item, at this point, the aging duration of the list item can be reset to 0 second by load-balancing device, for entire industry Time enough is reserved in the completion of business 1.Wherein, the business operation of business 1 can be specially to send business to load-balanced server Message or conversation establishing message etc., these messages carry message identification, to keep the client in list item to set with session Standby mark or session identification are matched, and think that the business operation has hit the session and kept list item in successful match. Wherein, it will be illustrated in the following embodiments about the matched content of mark, details are not described herein.Further, above-mentioned Conversation establishing message can be transmission control protocol (TCP:Transmission Control Protocol) negotiation packet, use To establish TCP connection with target dispatch server, in this case, the service message that client device is sent generally can be super Text transfer protocol (HTTP:Hyper Text Transfer Protocol) message, but due to the specific behaviour of business execution Make not within the scope of the application, so being no longer described in detail.
Referring to Fig. 3, as a preferred embodiment, if the default threshold of the list item has not yet been reached in above-mentioned aging duration Value, load-balancing device can execute the content as described in step 331 to step 334:
Step 331: load-balancing device, which judges whether to receive, hits the message that identified session keeps list item, if It is then to reset the session to keep the aging duration of list item, and execute step 332.
As a preferred embodiment, for ease of description, might as well assume herein the message be by IP address be 1.1.1.1 Client device send.At this point, load-balancing device will keep list item to reset aging for above-mentioned identified session Duration, and real-time monitoring is carried out to the aging duration of the list item.Specifically, load-balancing device can be protected in following access sessions While holding list item, the aging duration of the list item is reset, the present embodiment does not carry out the specific reset time of the aging duration Stringent limitation.
Step 332: load-balancing device accesses identified session and keeps list item, and judges that identified session keeps table It whether there is existing session in, so that the session identification of the existing session and the message identification of the message match, if so, Then follow the steps 333, it is no to then follow the steps 334.
In the present embodiment, message identification can be the message five-tuple information, then then above preferred embodiment, five It can be end that source IP in tuple information, which is 1.1.1.1, destination IP 8.8.8.8, source port can be port 1, destination port Mouth 2, agreement can be Transmission Control Protocol, then referring to fig. 4 it is found that the session identification of the message identification of the message and session 2 in business 1 Match.
Step 333: load-balancing device by the message received according to existing conversation dispatching to server to be shut down, and When above-mentioned aging duration reaches the preset threshold of determined list item, server shutdown to be shut down is controlled.
Step 334: load-balancing device creates session, and according to the session that is created by the dispatching message received to The server of shutdown.
In the present embodiment, load-balancing device can create one by establishing TCP connection with server to be shut down New session, and the session new according to this is by the dispatching message received to server to be shut down.
At the same time, the message identification of the message can be determined as the session identification of created session by load-balancing device, And the session identification of created session is recorded to identified session and is kept in list item, for future use.Specifically, reference can be made to figure The session identification of the part that dotted line is chosen in 4, i.e., above-mentioned newly-built session can be the five-tuple information of the message received, i.e. source IP is 1.1.1.1, destination IP 8.8.8.8, source port are port 2, destination port is port 1, agreement is Transmission Control Protocol.
In the present embodiment, load-balancing device can pass through the five-tuple information of the message sent to above-mentioned client device It is analyzed, to determine whether needing to create new session with target dispatch server.Specifically, if any in five-tuple When element changes, then a new session can be created, to be distinguished with a upper session, and the business be guaranteed with this Orderly progress.
It is kept in table in load-balancing device in preconfigured session if being pointed out that, determines that record needs to be closed The session of the identification information of machine server keeps identified session in list item to keep list item more than one, then shows to be shut down Server is still executing multiple business, the corresponding business of each list item.Such case exists, and load-balancing device can be for institute really Any one fixed session keeps list item, and whether the aging duration of the real-time monitoring list item reaches preset threshold, if reaching The list item is deleted from session holding table, and so on, and session in session holding table keeps list item number when being zero, Control server shutdown to be shut down.
As can be seen from the above embodiments, load-balancing device keeps table by the corresponding session of a certain business of real-time monitoring Item is asked from last time is interviewed, and whether the duration passed through reaches preset threshold, can determine the corresponding operation of the business Whether list item also is kept in access session, to judge whether the business is also executing.Compared with the prior art only current For the completion of session is as the judgment criteria for completing shutdown, the application can own server process to be shut down is complete current Ability control server is shut down after business, to realize when the business needs to complete with multiple sessions by the institute of the business There is conversation dispatching to same server, and finally guarantees normally completing for the business.
Corresponding with a kind of aforementioned embodiment of method of control server shutdown, present invention also provides a kind of control clothes The embodiment of the device of business device shutdown.
A kind of embodiment of the device of control server shutdown of the application can be applied on load-balancing device.Device is real Applying example can also be realized by software realization by way of hardware or software and hardware combining.Taking software implementation as an example, make For the device on a logical meaning, being will be right in nonvolatile memory by the processor on load-balancing device where it The computer program instructions answered are read into memory what operation was formed.
It is a kind of a kind of structural schematic diagram of the device of control server shutdown of the application referring to Fig. 5, Fig. 5, which answers It may include: instruction receiving unit 510, list item determination unit 520, shutdown control unit 530 for load-balancing device.
Wherein, instruction receiving unit 510, for receiving shutdown command, which carries the mark of server to be shut down Know information;
List item determination unit 520 determines that record has server to be shut down for keeping in table in preconfigured session The session of identification information keeps list item;Each list item in the session holding table has recorded the mark of one group of client device respectively Know and dispatch server mark corresponding relationship, for describing the Xiang Ye between the client device and the dispatch server Business, and business operation can be triggered to the access behavior with the business corresponding table item every time;
Shutdown control unit 530, for keeping list item for identified session, the real-time monitoring list item is from for the last time Interviewed to ask, whether the duration passed through reaches preset threshold, and server shutdown to be shut down is controlled if reaching.
In a kind of specific embodiment of the application, each single item is present between client device and dispatch server Business is made of at least one session;Above-mentioned session keeps each list item in table, is also recorded: forming the list item and correspond to industry The session identification of the existing session of business, message identification of the session identification for being carried in matching message, above-mentioned apparatus further include: List item access unit, existing conversation dispatching unit, newly-built conversation dispatching unit.
Wherein, list item access unit, for keeping list item for identified session, the real-time monitoring list item is from last Primary be interviewed asks, and during whether the duration passed through reaches preset threshold, and sends receiving client device Message when, access determined by session keep list item, and judge identified session keep list item in whether there is it is existing The session identification of session, so that the message identification that the session identification of the existing session is carried with message matches;
Existing conversation dispatching unit is used in the presence of existing session, directly by above-mentioned message according to existing conversation dispatching To server to be shut down;
Newly-built conversation dispatching unit, in the absence of existing session, creating session, and will according to the session created Above-mentioned dispatching message is to server to be shut down.
In a kind of specific embodiment of the application, above-mentioned newly-built conversation dispatching unit be can be also used for message Message identification is determined as the session identification of created session;The session identification of created session is recorded to identified session and is protected Hold list item.
In a kind of specific embodiment of the application, above-mentioned message identification can be the five-tuple information of the message, packet Include source IP address, purpose IP address, source port, destination port and transport protocol;
The mark of above-mentioned client device can be the IP address of the client device.
In a kind of specific embodiment of the application, above-mentioned shutdown control unit 530 may include: duration monitoring Unit 531, list item delete subelement 532, shutdown control subelement 533, specific as shown in Figure 6.
Wherein, duration monitors subelement 531, for keeping list item, real-time monitoring for identified any one session The list item is asked from last time is interviewed, and whether the duration passed through reaches preset threshold;
List item deletes subelement 532, for when above-mentioned duration reaches above-mentioned preset threshold, by the list item from above-mentioned session It is deleted in holding table;
Shutdown control subelement 533, in session holding table session keep list item number be zero when, control wait close The server of machine shuts down.
It can be seen that load-balancing device from apparatus above embodiment to protect by the corresponding session of a certain business of real-time monitoring It holds list item to ask from last time is interviewed, whether the duration passed through reaches preset threshold, can determine that the business is corresponding Whether operation also keeps list item in access session, to judge whether the business is also executing.Compared with the prior art only For the completion of current sessions is as the judgment criteria for completing shutdown, the application can be complete currently in server process to be shut down Ability control server is shut down after all business, to realize when the business needs to complete with multiple sessions by the business All conversation dispatchings to same server, and finally guarantee normally completing for the business.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.

Claims (10)

1. a kind of method of control server shutdown, the method are applied to load-balancing device, which is characterized in that the method Include:
Shutdown command is received, the shutdown command carries the identification information of server to be shut down;
It is kept in table in preconfigured session, determines that record has the session holding table of identification information of the server to be shut down ?;Each list item in the session holding table has recorded the mark of one group of client device respectively and dispatch server identifies Corresponding relationship, for describing a business between the client device and the dispatch server, and every time, business operation is equal It can trigger to the access behavior with the business corresponding table item;
List item is kept for identified session, the real-time monitoring list item is asked from last time is interviewed, and the duration passed through is It is no to reach preset threshold, server shutdown to be shut down is controlled if reaching.
2. the method according to claim 1, wherein each single item be present in client device and dispatch server it Between business be made of at least one session;
The session keeps each list item in table, is also recorded: forming the session that the list item corresponds to the existing session of business Mark, message identification of the session identification for being carried in matching message;
The method also includes: list item is being kept for identified session, the real-time monitoring list item is accessed from last time It rises, during whether the duration passed through reaches preset threshold,
If receiving the message of client device transmission, accesses identified session and keep list item, and judge determining Session keep the session identification that whether there is existing session in list item so that the session identification of the existing session and message carry Message identification match;
In the presence of existing session, directly by the message according to the existing conversation dispatching to server to be shut down;
In the absence of existing session, session is created, and according to the session that is created by the dispatching message to clothes to be shut down Business device.
3. method according to claim 2, which is characterized in that the creation session, and will be described according to the session created After dispatching message to server to be shut down, further includes:
The message identification of the message is determined as to the session identification of created session;
The session identification of created session is recorded to identified session and keeps list item.
4. according to the method described in claim 2, it is characterized in that, the message identification is the five-tuple information of the message, packet Include source IP address, purpose IP address, source port, destination port and transport protocol;
The IP address for being identified as the client device of the client device.
5. the method according to claim 1, wherein being kept in table in preconfigured session, identified note The number that record has the session of the identification information of the server to be shut down to keep list item is greater than one;
Described to keep list item for identified session, the real-time monitoring list item is asked from last time is interviewed, passed through when Whether length reaches preset threshold, and server shutdown to be shut down is controlled if reaching, comprising:
List item is kept for identified any one session, the real-time monitoring list item asks from last time is interviewed, passed through Duration whether reach preset threshold;
When the duration reaches the preset threshold, which is deleted from the session holding table, and is kept in session When session holding list item number in table is zero, server shutdown to be shut down is controlled.
6. a kind of device of control server shutdown, described device are applied to load-balancing device, which is characterized in that described device Include:
Instruction receiving unit, for receiving shutdown command, the shutdown command carries the identification information of server to be shut down;
List item determination unit determines that record has the mark of the server to be shut down for keeping in table in preconfigured session The session for knowing information keeps list item;Each list item in the session holding table has recorded the mark of one group of client device respectively Know and dispatch server mark corresponding relationship, for describing the Xiang Ye between the client device and the dispatch server Business, and business operation can be triggered to the access behavior with the business corresponding table item every time;
Shutdown control unit, for keeping list item for identified session, the real-time monitoring list item is accessed from last time It rises, whether the duration passed through reaches preset threshold, and server shutdown to be shut down is controlled if reaching.
7. device according to claim 6, which is characterized in that each single item be present in client device and dispatch server it Between business be made of at least one session;
The session keeps each list item in table, is also recorded: forming the session that the list item corresponds to the existing session of business Mark, message identification of the session identification for being carried in matching message;
Described device further include:
List item access unit, for keeping list item for identified session, the real-time monitoring list item is interviewed from last time It asks, during whether the duration passed through reaches preset threshold, and when receiving the message of client device transmission, Session determined by accessing keeps list item, and judges to keep the session that whether there is existing session in list item in identified session Mark, so that the message identification that the session identification of the existing session is carried with message matches;
Existing conversation dispatching unit is used in the presence of existing session, directly by the message according to the existing conversation dispatching To server to be shut down;
Newly-built conversation dispatching unit, in the absence of existing session, creating session, and will be described according to the session created Dispatching message is to server to be shut down.
8. device according to claim 7, which is characterized in that the newly-built conversation dispatching unit is also used to the report The message identification of text is determined as the session identification of created session;The session identification of created session is recorded to identified meeting Words keep list item.
9. device according to claim 7, which is characterized in that the message identification is the five-tuple information of the message, packet Include source IP address, purpose IP address, source port, destination port and transport protocol;
The IP address for being identified as the client device of the client device.
10. device according to claim 6, which is characterized in that kept in table in preconfigured session, identified note The number that record has the session of the identification information of the server to be shut down to keep list item is greater than one;
The shutdown control unit, comprising:
Duration monitors subelement, and for keeping list item for identified any one session, the real-time monitoring list item is from last Primary be interviewed asks, and whether the duration passed through reaches preset threshold;
List item deletes subelement, for when the duration reaches the preset threshold, which to be kept table from the session Middle deletion;
Shutdown control subelement, in session holding table session keep list item number be zero when, control clothes to be shut down Business device shutdown.
CN201611027654.9A 2016-11-15 2016-11-15 A kind of method and device of control server shutdown Active CN106559485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611027654.9A CN106559485B (en) 2016-11-15 2016-11-15 A kind of method and device of control server shutdown

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611027654.9A CN106559485B (en) 2016-11-15 2016-11-15 A kind of method and device of control server shutdown

Publications (2)

Publication Number Publication Date
CN106559485A CN106559485A (en) 2017-04-05
CN106559485B true CN106559485B (en) 2019-08-06

Family

ID=58444332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611027654.9A Active CN106559485B (en) 2016-11-15 2016-11-15 A kind of method and device of control server shutdown

Country Status (1)

Country Link
CN (1) CN106559485B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413118B (en) * 2017-08-15 2022-05-10 东软集团股份有限公司 Method, device, storage medium and program product for realizing session synchronization
CN108614719A (en) * 2018-05-14 2018-10-02 沈文策 A kind of server management method, device and electronic equipment
CN110086886B (en) * 2019-05-14 2021-12-31 北京天融信网络安全技术有限公司 Dynamic session holding method and device
CN110134460B (en) * 2019-05-17 2022-04-22 联想(北京)有限公司 System control method, controller, processor and computer readable medium
CN112615784B (en) * 2020-12-17 2023-03-07 北京天融信网络安全技术有限公司 Method, device, storage medium and electronic equipment for forwarding message

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1836214A (en) * 2003-08-14 2006-09-20 甲骨文国际公司 On demand node and server instance allocation and de-allocation
CN101605108A (en) * 2009-07-15 2009-12-16 阿里巴巴集团控股有限公司 A kind of method, system and device of instant messaging
CN102214117A (en) * 2010-04-07 2011-10-12 中兴通讯股份有限公司 Virtual machine management method, system and server
CN102724070A (en) * 2012-06-15 2012-10-10 青岛百灵信息科技有限公司 HSS (home subscriber server) data disaster tolerant algorithm based on artificial intelligence and neural network
CN103685461A (en) * 2013-10-24 2014-03-26 从兴技术有限公司 Cluster management device, system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7716725B2 (en) * 2002-09-20 2010-05-11 Fortinet, Inc. Firewall interface configuration and processes to enable bi-directional VoIP traversal communications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1836214A (en) * 2003-08-14 2006-09-20 甲骨文国际公司 On demand node and server instance allocation and de-allocation
CN101605108A (en) * 2009-07-15 2009-12-16 阿里巴巴集团控股有限公司 A kind of method, system and device of instant messaging
CN102214117A (en) * 2010-04-07 2011-10-12 中兴通讯股份有限公司 Virtual machine management method, system and server
CN102724070A (en) * 2012-06-15 2012-10-10 青岛百灵信息科技有限公司 HSS (home subscriber server) data disaster tolerant algorithm based on artificial intelligence and neural network
CN103685461A (en) * 2013-10-24 2014-03-26 从兴技术有限公司 Cluster management device, system and method

Also Published As

Publication number Publication date
CN106559485A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN106559485B (en) A kind of method and device of control server shutdown
CA2993282C (en) Verifying source addresses associated with a terminal
CN106790758B (en) Method and device for accessing network object in NAT network
CN109104395B (en) Method and device for scanning, discovering and identifying service of Internet assets
CN106844137A (en) The monitoring method and device of server
CN108259425A (en) The determining method, apparatus and server of query-attack
WO2016082371A1 (en) Ssh protocol-based session parsing method and system
CN104767655B (en) A kind of analog result detection method and device
CN101227343B (en) Method and device for testing TCPv6 and UDPv6
CN114244560B (en) Flow processing method and device, electronic equipment and storage medium
CN105516086B (en) Method for processing business and device
CN1946061B (en) Method and device for fast processing message
KR20190029486A (en) Elastic honeynet system and method for managing the same
CN108259632A (en) A kind of CGN implementation methods and device
CN109218370A (en) Message method and device, electronic equipment
US20220014457A1 (en) Methods, systems and computer readable media for stateless service traffic generation
CN105991442B (en) Message forwarding method and device
US9686175B2 (en) Methods, systems, and computer readable media for testing network devices using simulated application traffic
CN106161249B (en) The processing method and processing device of PPPoE message
CN106209561B (en) The sending method and device of loop detection message
CN105554134B (en) Information synchronization method and device
KR20160113671A (en) Data packet processing method and device based on parallel protocol stack instances
US11108797B2 (en) Timely detection of network traffic to registered DGA generated domains
JP5993835B2 (en) Smart terminal fuzzing apparatus and method using multi-node
CN106506522B (en) The management method and device of TCP connection

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210616

Address after: 310051 05, room A, 11 floor, Chung Cai mansion, 68 Tong Xing Road, Binjiang District, Hangzhou, Zhejiang.

Patentee after: Hangzhou Dip Information Technology Co.,Ltd.

Address before: 310051, 6 floor, Chung Cai mansion, 68 Tong he road, Binjiang District, Hangzhou, Zhejiang.

Patentee before: Hangzhou DPtech Technologies Co.,Ltd.