CN106559485A - 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
CN106559485A
CN106559485A CN201611027654.9A CN201611027654A CN106559485A CN 106559485 A CN106559485 A CN 106559485A CN 201611027654 A CN201611027654 A CN 201611027654A CN 106559485 A CN106559485 A CN 106559485A
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.)
Granted
Application number
CN201611027654.9A
Other languages
Chinese (zh)
Other versions
CN106559485B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer And Data Communications (AREA)

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 for being passed through reaches predetermined threshold value, may determine that whether the business is also performing, so as to when the service needed is completed with multiple sessions, realize all conversation dispatchings of the business to same server, it is ensured that the business is normally completed.

Description

A kind of method and device of control server shutdown
Technical field
The application is related to network communication technology field, more particularly to a kind of method and device of control server shutdown.
Background technology
In today of Network high speed development, server plays important role in Network acceptance procedure. Such as, in application scenarios as shown in Figure 1, a server may need to accept polytype business.In a server When needing deactivation to safeguard, if making the server directly shut down, some business that may be accepted to the server are impacted.
For this case, prior art generally provides a kind of soft-off mechanism:For a startup of server soft-off After mechanism, still can be by the allocated current sessions flow scheduling to the server to the server, and in current sessions When flow is transmitted, controls the server shutdown and complete.But, when the service needed of a certain client device is by multiple sessions When cooperation is completed, all session traffics of this business cannot be dispatched to same server using soft-off mechanism, finally Cause to impact this business of the client device.
The content 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 is also when the business completed with multiple sessions is performed, it is to avoid the business is made Into impact.
According to the first aspect of the embodiment of the present application, there is provided a kind of method of control server shutdown, methods described application In load-balancing device, methods described includes:
Shutdown command is received, the shutdown command carries the identification information of server to be shut down;
In the session holding table being pre-configured with, it is determined that the session that record has the identification information of the server to be shut down is protected Hold list item;Each list item in the session holding table have recorded the mark and dispatch server of one group of client device respectively The corresponding relation of mark, for describing a business between the client device and the dispatch server, and business behaviour every time Work can trigger the access behavior to list item corresponding with the business;
For determined by session keep list item, the real-time monitoring list item from last time it is interviewed ask, passed through when Whether length reaches predetermined threshold value, and server shutdown to be shut down is controlled if reaching.
According to the second aspect of the embodiment of the present application, there is provided a kind of device of control server shutdown, described device application In load-balancing device, described device includes:
Instruction reception unit, for receiving shutdown command, the shutdown command carries the identification information of server to be shut down;
List item determining unit, in the session holding table being pre-configured with, it is determined that record has the server to be shut down Identification information session keep list item;Each list item in the session holding table have recorded one group of client device respectively Mark and dispatch server mark corresponding relation, for describing one between the client device and the dispatch server Business, and business operation can trigger the access behavior to list item corresponding with the business every time;
Shutdown control unit, keeps list item for session determined by being directed to, and the real-time monitoring list item is from last time quilt Access, whether the duration for being passed through reaches predetermined threshold value, 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 for being passed through reaches predetermined threshold value, it may be determined that go out whether the corresponding operation of the business is also accessing Session keeps list item, so as to judge whether the business is also performing.Compared to prior art only current sessions complete make For completing the criterion shut down, the application can be just controlled after the complete current all business of server process to be shut down Server shuts down, so as to when the service needed is completed with multiple sessions, realize all conversation dispatchings of the business extremely Same server, and finally ensure normally completing for the business.
Description of the drawings
Fig. 1 is the schematic diagram of a scenario of the method for the exemplary control server shutdown of the application one;
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 the session of the identification information that the exemplary record of the application one has server to be shut down keeps list item to illustrate Figure;
Fig. 5 is a kind of a kind of structural representation of the device of control server shutdown of the application;
Fig. 6 is the structural representation of shutdown control unit in a kind of device of control server shutdown of the application.
Specific embodiment
Here in detail exemplary embodiment will be illustrated, its example is illustrated in the accompanying drawings.Explained below is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.Conversely, they be only with as appended by The example of consistent apparatus and method in terms of some described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind ", " described " and " being somebody's turn to do " of singulative used in the application and appended claims is also intended to include majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein is referred to and is wrapped Containing one or more associated any or all possible combinations for listing project.
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 for same type of information is distinguished from each other out.For example, without departing from In the case of the application scope, 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 linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
Fig. 1 is the schematic diagram of a scenario of the method for the exemplary control server shutdown of the application one.In this schematic diagram, might as well Assume:When load-balancing device 12 receives the shutdown command shut down for server to be shut down, clothes to be shut down Business device is carrying out the business 1 of the request of client device 11, and the business 1 must be complete with session 1, session 2 and session 3 Into.It will be appreciated by those skilled in the art that being, some request messages that above-mentioned each session can be sent by client device 11 Composition, if now server to be shut down directly shuts down, the server will can not reprocess what client device 11 sent Any request, the business 1 for ultimately resulting in the request of client device 11 cannot be normally completed.
For this problem, the soft-off mechanism that prior art is provided can have been performed 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, then calculated according to scheduling Method is dispatched to the server of normal work, or directly carries out packet loss process.Specifically, for former processing method, If in the business 1 of the request of client device 11, the target of session 1 be by the authentication information of client device 11 add to Server to be shut down, and the target of session 2 is the authentication based on above-mentioned authentication information by the server, and acquisition should Video data on server, then the soft-off mechanism for being provided according to prior art, load-balancing device can be in clothes to be shut down Business device controls server to be shut down and completes shutdown after having processed session 1, and is dispatched to normally session 2 according to dispatching algorithm The server of work, but, as the server of the normal work does not prestore the authentication of client device 11 Information, so cannot be the video data needed for client device 11 provides which, so as to cause business 1 normally complete.
In view of this, it is to ensure that, when power-off operation is performed to certain server, the server will not processed appoints What business has any impact, this application provides a kind of method of control server shutdown.The method is by for each business Introduce session and keep list item, and the real-time monitoring session keeps whether the aging duration of list item reaches predetermined threshold value, it can be determined that Go out whether the corresponding business of the list item is also performing.Compared to prior art only using current sessions complete as complete shut down For criterion, the application can just control server shutdown after the complete current all business of server process to be shut down, So as to when the service needed is completed with multiple sessions, realize all conversation dispatchings of the business are serviced to same Device, and finally ensure normally completing for the business.It is pointed out that above-mentioned session keeps the aging duration of list item to refer to from this The interviewed duration for asking, being passed through of list item last time.Above-mentioned server to be shut down can also be what is carried on certain server One specific service.
In order that those skilled in the art more fully understand the technical scheme in the embodiment of the present application, and make the application reality Apply the above-mentioned purpose of example, feature and advantage can become apparent from it is understandable, below in conjunction with the accompanying drawings to technical side in the embodiment of the present application Case is described in further detail.
Referring to Fig. 2, Fig. 2 be the application it is a kind of control server shutdown method one embodiment flow chart, the flow process Figure may comprise steps of:
Step 201:Load-balancing device receives shutdown command, and the shutdown command carries the mark letter of server to be shut down Breath.
In the present embodiment, the shutdown command that load-balancing device is received can be given birth to by network management personnel's manual configuration Into, it is also possible to carry in the message that server to be shut down sends.The identification information of server can be interconnection between network Agreement (IP:Internet Protocol Address) address and media access control (MAC:Media Access Control) address etc..
Step 202:Load-balancing device is in the session holding table being pre-configured with, it is determined 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 have recorded the mark of one group of client device respectively and adjust The corresponding relation of degree server identification, for describing a business between the client device and the dispatch server, and often Secondary business operation can trigger the access behavior to list item corresponding with the business.Wherein the mark of client device can be the visitor The IP address of family end equipment.
Step 203:Load-balancing device be directed to determined by session keep list item, the real-time monitoring list item from last time Interviewed to ask, whether the duration for being passed through reaches predetermined threshold value, and server shutdown to be shut down is controlled if reaching.
In the present embodiment, load-balancing device be directed to determined by session keep list item, the list item of institute's real-time monitoring from Interviewed for the last time to ask, the duration for being passed through is the aging duration of the list item, when the aging duration of the list item reach it is default During 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, shown the business Jing is completed.
Used as a preferred embodiment, if load-balancing device judges the list item, corresponding aging duration not yet reaches To predetermined threshold value, then it is assumed that the corresponding business of the list item is still being performed, and now, load-balancing device is receiving client device Send to should business message when, may proceed to the business corresponding dispatching message to server to be shut down, with ensure The client device business is smoothly completed.
Load-balancing device can be seen that by the above flow process list item is kept by the corresponding session of a certain business of real-time monitoring Ask from last time is interviewed, whether the duration for being passed through reaches predetermined threshold value, it may be determined that going out the corresponding operation of the business is It is no also to keep list item in access session, so as to judge whether the business is also performing.Compared to prior art only current meeting That what is talked about completes as the criterion for completing to shut down, and the application can be in the complete current all industry of server process to be shut down Server shutdown is controlled after business, so as to when the service needed is completed with multiple sessions, realize all of the business Conversation dispatching is to same server, and finally ensures normally completing for the business.
Referring to Fig. 3, Fig. 3 is a kind of one embodiment flow chart of the method for control server shutdown of the application.With the above Embodiment of the method unlike, present embodiment assumes that:When load-balancing device receives the shutdown command of server to be shut down When, the server to be shut down is carrying out business 1, and the business 1 is completed with three sessions, and these three sessions are respectively meeting Words 1, session 2 and session 3, below will be described in detail to the present embodiment:
Step 310:Load-balancing device receives shutdown command, and the shutdown command carries the mark letter of server to be shut down Breath.
In the present embodiment, the shutdown command received with regard to load-balancing device and the identification information of server exist Describe in detail in step 201, will not be described here.
Step 320:Load-balancing device is in the session holding table being pre-configured with, it is determined that record has server to be shut down The session of identification information keeps list item.
In the present embodiment, relation that the content that records and session in list item keep list item and business has been kept with regard to session Jing is described in detail in step 202., be will not be described here.
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 IP address 1.1.1.1 of the client device, then The session that record has server identification information to be shut down keeps list item be expressed as form as shown in Figure 4, and the session keeps List item describes a business between client device 1.1.1.1 and server 8.8.8.8 to be shut down, is designated as business 1.
Step 330:Load-balancing device be directed to determined by session keep list item, the aging duration of the real-time monitoring list item Whether predetermined threshold value is reached, server shutdown to be shut down is controlled if reaching.
In the present embodiment, the predetermined threshold value can be 300 seconds, then load-balancing device can be according to practical application setting one Individual cycle monitoring intervalometer simultaneously sets the monitoring cycle of the intervalometer as 15 seconds, i.e., with 15 seconds as a minimum monitoring cycle, real When monitor the aging duration of the list item and whether reach the predetermined threshold value of above-mentioned 300 seconds, service to be shut down is controlled if reaching Device shuts down.It is pointed out that in the implementation procedure of business 1, any one business operation of business 1 can all hit and be determined Session keep list item, now, the aging duration of the list item can be reset to 0 second by load-balancing device, think whole industry Business 1 completes reserved time enough.Wherein, the business operation of business 1 can be specially to load-balanced server and send business 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 when the match is successful the business operation has hit the session and kept list item. Wherein, will be illustrated in the following embodiments with regard to the content of mark matching, will not be described here.Further, it is above-mentioned Conversation establishing message can be transmission control protocol (TCP:Transmission Control Protocol) negotiation packet, use It is connected with setting up TCP with target dispatch server, in this case, the service message that client device sends can typically be super Text transfer protocol (HTTP:Hyper Text Transfer Protocol) message, but due to the concrete behaviour of business execution Make not within the scope of the application, so no longer describing in detail.
Used as a preferred embodiment, if above-mentioned aging duration not yet reaches the predetermined threshold value of the list item, load is equal Weighing apparatus equipment can perform the content as described in step 331 to step 334:
Step 331:Load-balancing device judges whether to receive the message that session determined by hit keeps list item, if It is then to reset the aging duration that the session keeps list item, and execution step 332.
As a preferred embodiment, for ease of description, it is 1.1.1.1 by IP address that here might as well assume that the message is Client device send.Now, load-balancing device will determined by above-mentioned session keep list item reset it is aging Duration, and the aging duration to the list item carries out real-time monitoring.Specifically, load-balancing device can be protected in following access sessions While holding list item, the aging duration of the list item is reset, and the present embodiment is not carried out to the concrete reset time of the aging duration It is strict to limit.
Step 332:Session determined by load-balancing device access keeps list item, and session keeps table determined by judging Whether there is existing session in so that the session identification of the existing session is matched with the message identification of the message, if it is, Then execution step 333, otherwise execution step 334.
In the present embodiment, message identification can be the five-tuple information of the message, then preferred embodiment then above, five Source IP in tuple information is 1.1.1.1, purpose IP is 8.8.8.8, source port can be end for port 1, destination interface Mouth 2, agreement can be Transmission Control Protocol, then understand referring to Fig. 4, the session identification of session 2 in the message identification and business 1 of the message Match.
Step 333:Load-balancing device by the message for receiving according to existing conversation dispatching to server to be shut down, and When above-mentioned aging duration reaches the predetermined threshold value 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 created by the dispatching message for receiving to treating The server of shutdown.
In the present embodiment, load-balancing device can be connected creating one by setting up TCP with server to be shut down New session, and according to this new session by the dispatching message for receiving to server to be shut down.
At the same time, the message identification of the message can be defined as load-balancing device the session identification of created session, And the session identification of created session is recorded to determined by session holding list item, for future use.Specifically, can be found in figure The part that dotted line is chosen in 4, i.e., the session identification of above-mentioned newly-built session can be the five-tuple information of the message for receiving, i.e. source IP is 1.1.1.1, purpose IP is 8.8.8.8, source port is that port 1, agreement is Transmission Control Protocol for port 2, destination interface.
In the present embodiment, the five-tuple information of the message that load-balancing device can be by sending to above-mentioned client device Be analyzed, judge whether to need new session to be created with target dispatch server.Specifically, if arbitrary in five-tuple When element changes, then a new session can be created, to be distinguished with a upper session, and the business be ensured with this Carry out in order.
If it is pointed out that session determined by step 320 keeps list item more than one, showing to be shut down Server is still performing multiple business, one business of each list item correspondence.Such case exists, and load-balancing device can be for institute really Fixed any one session keeps list item, and whether the aging duration of the real-time monitoring list item reaches predetermined threshold value, if reaching The list item is kept deleting in table from session, by that analogy, and session in session holding table is when to keep list item number be 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 for being passed through reaches predetermined threshold value, it may be determined that go out the corresponding operation of the business Whether list item is kept in access session also, so as to judge whether the business is also performing.Compared to prior art only current Session is completed as the criterion for completing to shut down, and the application can be complete current all in server process to be shut down Server shutdown is controlled after business, so as to when the service needed is completed with multiple sessions, realize the institute of the business There is conversation dispatching to same server, and finally ensure normally completing for the business.
It is corresponding with a kind of aforementioned embodiment of the method for 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 reality Apply example to realize by software, it is also possible to realize by way of hardware or software and hardware combining.As a example by implemented in software, make For the device on a logical meaning, being will be right in nonvolatile memory by the processor on its place load-balancing device The computer program instructions answered run what is formed in reading internal memory.
Referring to Fig. 5, Fig. 5 is a kind of a kind of structural representation of the device of control server shutdown of the application, and the device should For load-balancing device, can include:Instruction reception unit 510, list item determining unit 520, shutdown control unit 530.
Wherein, instruction reception unit 510, for receiving shutdown command, the shutdown command carries the mark of server to be shut down Knowledge information;
List item determining unit 520, in the session holding table being pre-configured with, it is determined that record has server to be shut down The session of identification information keeps list item;Each list item in the session holding table have recorded the mark of one group of client device respectively Know and dispatch server mark corresponding relation, for describing an industry between the client device and the dispatch server Business, and business operation can trigger the access behavior to list item corresponding with the business every time;
Shutdown control unit 530, keeps list item for session determined by being directed to, and the real-time monitoring list item is from last time Interviewed to ask, whether the duration for being passed through reaches predetermined threshold value, and server shutdown to be shut down is controlled if reaching.
In a kind of specific embodiment of the application, each item is present between client device and dispatch server Business is made up of at least one session;Above-mentioned session keeps each list item in table, is also recorded for:Constitute the list item correspondence industry The session identification of the existing session of business, the session identification are used for the message identification carry in matching message, and said apparatus also include: List item access unit 540, existing conversation dispatching unit 550, newly-built conversation dispatching unit 560.
Wherein, list item access unit 540, keeps list item for the session determined by be directed to, the real-time monitoring list item from It is interviewed for the last time to ask, during whether the duration for being passed through reaches predetermined threshold value, and receiving client device During the message of transmission, session determined by access keeps list item, and judges that session whether there is in keeping list item determined by The session identification of existing session so that the message identification that the session identification of the existing session is carried with message matches;
Existing conversation dispatching unit 550, for, in the presence of existing session, directly adjusting above-mentioned message according to existing session Spend to server to be shut down;
Newly-built conversation dispatching unit 560, for when existing session is not present, creating session, and according to the meeting for being created Words are by above-mentioned dispatching message to server to be shut down.
In a kind of specific embodiment of the application, above-mentioned newly-built conversation dispatching unit 560 is can be also used for message Message identification be defined as the session identification of created session;The session identification of created session is recorded into determined by session Keep list item.
In a kind of specific embodiment of the application, above-mentioned message identification can be the five-tuple information of the message, wrap Include source IP address, purpose IP address, source port, destination interface and host-host 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 can include:Duration monitoring Unit 531, list item deletes subelement 532, shutdown control subelement 533, concrete as shown in Figure 6.
Wherein, duration monitoring subelement 531, keeps list item, real-time monitoring for any one session determined by being directed to The list item is asked from last time is interviewed, and whether the duration for being passed through reaches predetermined threshold value;
List item deletes subelement 532, for when above-mentioned duration reaches above-mentioned predetermined threshold value, by the list item from above-mentioned session Delete in keeping table;
Shutdown control subelement 533, in session holding table session keep list item number be zero when, control to wait to close The server shutdown of machine.
Load-balancing device be can be seen that from apparatus above embodiment to protect by the corresponding session of a certain business of real-time monitoring Hold list item to ask from last time is interviewed, whether the duration for being passed through reaches predetermined threshold value, it may be determined that go out the business corresponding Whether operation also keeps list item in access session, so as to judge whether the business is also performing.Compared to prior art only Current sessions are completed as the criterion for completing to shut down, and the application can be complete current in server process to be shut down Server shutdown is controlled after all business, so as to when the service needed is completed with multiple sessions, realize the business All conversation dispatchings to same server, and finally ensure normally completing for the business.
In said apparatus, the function of unit and effect realizes that process specifically refers to correspondence step in said method Process is realized, be will not be described here.
For device embodiment, as which corresponds essentially to embodiment of the method, so related part is referring to method reality Apply the part explanation of example.Device embodiment described above is only schematic, wherein described as separating component The unit of explanation can be or may not be physically separate, as the part that unit shows can be or can also It is not physical location, you can local to be located at one, or can also be distributed on multiple NEs.Can be according to reality Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, not to limit the application, all essences in the application Within god and principle, any modification, equivalent substitution and improvements done etc. are should be included within the scope of the application protection.

Claims (10)

1. a kind of method that control server shuts down, methods described are applied to load-balancing device, it is characterised in that methods described Including:
Shutdown command is received, the shutdown command carries the identification information of server to be shut down;
In the session holding table being pre-configured with, it is determined that record has the session holding table of the identification information of the server to be shut down ;Each list item in the session holding table have recorded the mark of one group of client device respectively and dispatch server is identified Corresponding relation, for describing a business between the client device and the dispatch server, and business operation is equal every time The access behavior to list item corresponding with the business can be triggered;
The session for determined by keeps list item, the real-time monitoring list item to ask from last time is interviewed, and the duration for being passed through is It is no to reach predetermined threshold value, server shutdown to be shut down is controlled if reaching.
2. method according to claim 1, it is characterised in that each item be present in client device and dispatch server it Between business be made up of at least one session;
The session keeps each list item in table, is also recorded for:Constitute the session of the existing session of the list item correspondence business Mark, the session identification are used for the message identification carry in matching message;
Methods described also includes:The session determined by be directed to keeps list item, and the real-time monitoring list item is accessed from last time Rise, during whether the duration for being passed through reaches predetermined threshold value,
If receiving the message of client device transmission, session determined by access keeps list item, and judges determined Session keep the session identification in list item with the presence or absence of existing session so that the session identification of the existing session is carried with message 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;
When existing session is not present, create session, and according to the session that created by the dispatching message to clothes to be shut down Business device.
3. method according to claim 2, it is characterised in that the establishment session, and will be described according to the session for being created Dispatching message also includes to server to be shut down:
The message identification of the message is defined as into the session identification of created session;
The session identification of created session is recorded into determined by session and keeps list item.
4. method according to claim 2, it is characterised in that the message identification is the five-tuple information of the message, bag Include source IP address, purpose IP address, source port, destination interface and host-host protocol;
The IP address for being designated the client device of the client device.
5. method according to claim 1, it is characterised in that in the session holding table being pre-configured with, determined by remember The session that record has the identification information of the server to be shut down keeps the number of list item to be more than one;
It is described be directed to determined by session keep list item, the real-time monitoring list item from last time it is interviewed ask, passed through when Whether length reaches predetermined threshold value, and server shutdown to be shut down is controlled if reaching, including:
Any one session for determined by keeps list item, the real-time monitoring list item to ask from last time is interviewed, passed through Duration whether reach predetermined threshold value;
When the duration reaches the predetermined threshold value, the list item is kept deleting in table from the session, and is kept in session When session holding list item number in table is zero, server shutdown to be shut down is controlled.
6. the device that a kind of control server shuts down, described device are applied to load-balancing device, it is characterised in that described device Including:
Instruction reception unit, for receiving shutdown command, the shutdown command carries the identification information of server to be shut down;
List item determining unit, in the session holding table being pre-configured with, it is determined that record has the mark of the server to be shut down The session of knowledge information keeps list item;Each list item in the session holding table have recorded the mark of one group of client device respectively Know and dispatch server mark corresponding relation, for describing an industry between the client device and the dispatch server Business, and business operation can trigger the access behavior to list item corresponding with the business every time;
Shutdown control unit, keeps list item for session determined by being directed to, and the real-time monitoring list item is accessed from last time Rise, whether the duration for being passed through reaches predetermined threshold value, server shutdown to be shut down is controlled if reaching.
7. device according to claim 6, it is characterised in that each item be present in client device and dispatch server it Between business be made up of at least one session;
The session keeps each list item in table, is also recorded for:Constitute the session of the existing session of the list item correspondence business Mark, the session identification are used for the message identification carry in matching message;
Described device also includes:
List item access unit, keeps list item for the session determined by be directed to, and the real-time monitoring list item is interviewed from last time Ask, during whether the duration for being passed through reaches predetermined threshold value, and when the message of client device transmission is received, Session determined by access keeps list item, and judges that the session determined by whether there is the session of existing session in keeping list item Mark so that the message identification that the session identification of the existing session is carried with message matches;
Existing conversation dispatching unit, 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, for when existing session is not present, creating session, and will be described according to the session for being created Dispatching message is to server to be shut down.
8. device according to claim 7, it is characterised in that the newly-built conversation dispatching unit, is additionally operable to the report The message identification of text is defined as the session identification of created session;The session identification of created session is recorded into determined by meeting Words keep list item.
9. device according to claim 7, it is characterised in that the message identification is the five-tuple information of the message, bag Include source IP address, purpose IP address, source port, destination interface and host-host protocol;
The IP address for being designated the client device of the client device.
10. device according to claim 6, it is characterised in that in the session holding table being pre-configured with, determined by remember The session that record has the identification information of the server to be shut down keeps the number of list item to be more than one;
The shutdown control unit, including:
Duration monitors subelement, keeps list item for any one session determined by being directed to, and the real-time monitoring list item is from last Once interviewed to ask, whether the duration for being passed through reaches predetermined threshold value;
List item deletes subelement, for when the duration reaches the predetermined threshold value, the list item being kept table from the session Middle deletion;
Shutdown control subelement, when to keep list item number be zero for the session in session holding table, controls 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 true CN106559485A (en) 2017-04-05
CN106559485B 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)

Cited By (5)

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

Citations (6)

* 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
US20100269172A1 (en) * 2002-09-20 2010-10-21 Fortinet, Inc. Firewall interface configuration to enable bi-directional voip traversal communications
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100269172A1 (en) * 2002-09-20 2010-10-21 Fortinet, Inc. Firewall interface configuration to enable bi-directional voip traversal communications
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

Cited By (6)

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

Also Published As

Publication number Publication date
CN106559485B (en) 2019-08-06

Similar Documents

Publication Publication Date Title
CN106559485A (en) A kind of method and device of control server shutdown
US9729655B2 (en) Managing transfer of data in a data network
JP5797060B2 (en) Access management method and access management apparatus
CN106844137A (en) The monitoring method and device of server
CN109104395B (en) Method and device for scanning, discovering and identifying service of Internet assets
CN104639650B (en) A kind of fine granularity distributed interface access control method and device
CN107124402A (en) A kind of method and apparatus of packet filtering
US20070061482A1 (en) Information processing apparatus, communication control method, and communication control program
CN105516086B (en) Method for processing business and device
CN109067937A (en) Terminal admittance control method, device, equipment, system and storage medium
JP2001517899A (en) Method and system for identifying and suppressing executable objects
JP2010250664A (en) Access control device
EP1909436A1 (en) System and method of integrating a node into a virtual ring
CN107294910B (en) Login method and server
CN108737407A (en) A kind of method and device for kidnapping network flow
CN106412079B (en) Request processing method and system
US11108797B2 (en) Timely detection of network traffic to registered DGA generated domains
CN109905352B (en) Method, device and storage medium for auditing data based on encryption protocol
CN110309645A (en) A kind of couple of API carries out the method, apparatus and system of security protection
US11438448B2 (en) Network application program product and method for processing application layer protocol
CN109040112A (en) network control method and device
US7363383B2 (en) Running a communication protocol state machine through a packet classifier
CN115190167B (en) Proxy system and method based on shared memory communication
CN106506522B (en) The management method and device of TCP connection
US11818173B2 (en) Reducing memory footprint after TLS connection establishment

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

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.

TR01 Transfer of patent right