CN101340371B - Session keeping method and load balance apparatus - Google Patents
Session keeping method and load balance apparatus Download PDFInfo
- Publication number
- CN101340371B CN101340371B CN2008101182853A CN200810118285A CN101340371B CN 101340371 B CN101340371 B CN 101340371B CN 2008101182853 A CN2008101182853 A CN 2008101182853A CN 200810118285 A CN200810118285 A CN 200810118285A CN 101340371 B CN101340371 B CN 101340371B
- Authority
- CN
- China
- Prior art keywords
- cookie information
- server
- load balancing
- information set
- request 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 235000014510 cooky Nutrition 0.000 claims abstract description 258
- 230000004044 response Effects 0.000 claims abstract description 81
- 238000012545 processing Methods 0.000 claims description 22
- 238000012423 maintenance Methods 0.000 claims description 15
- 230000009467 reduction Effects 0.000 claims description 2
- 230000002688 persistence Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 230000006855 networking Effects 0.000 description 4
- 238000013507 mapping Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method for session persistence. The method comprises: a receiving server of load equalizing equipment sends a response message to a client, cookie information in the response message is replaced by the cookie information set by the load equalizing equipment, the corresponding relations among the cookie information set by the load equalizing equipment, the replaced cookie information and the server are recorded, and the response message after replacement is sent to the client; the load equalizing equipment receives the request message sent by the client later, when the request message carries the cookie information set by the load equalizing equipment, according to the corresponding relation, the cookie information which is set by the server and is corresponding to the cookie information in the request message as well as the corresponding server are searched, the cookie information in the request message is reverted to the searched cookie information, and the reverted request message is sent to the server searched. By using the method of the invention, not only is the setting of the cookie information by the server not relied on, but also the length of the cookie information is not increased.
Description
Technical Field
The present invention relates to a session maintaining technology in communication, and in particular, to a session maintaining method and a load balancing device.
Background
The server load balancing device is a device which is arranged at the front end of a group of servers with the same or similar functions and reasonably distributes traffic reaching the server group, so that load balancing among the servers is realized. Fig. 1 shows a schematic diagram of a networking structure of a typical application of a conventional server load balancing device. The networking architecture includes clients, load balancing devices (server controllers), and a server farm, one server C of which is shown in fig. 1.
Session maintenance is an important function of load balancing devices. By session maintenance, it is ensured that a series of associated sessions are distributed to one server and not to different servers after load balancing.
Referring to fig. 1, currently, a load balancing device generally uses cookie information to implement session maintenance, which is called a cookie session maintenance technique. The process is as follows:
1. after the client and the server are subjected to three times of TCP handshake, the client sends a first HTTP request message to the server, the HTTP request message firstly reaches the load balancing equipment, and the load balancing equipment determines an optimal server C to serve the client according to a preset balancing algorithm.
2. The server C returns an HTTP response message, which first passes through the load balancing device and then reaches the client. The HTTP response message carries cookie information. cookie information is a small piece of information that is sent to a browser along with a web page when a site is visited.
3. After receiving the HTTP response message, the client stores the cookie information in the HTTP response message locally.
4. When the client initiates a subsequent HTTP request with the same uniform resource address (URL) again, local cookie information is inquired, the cookie information contained in the HTTP response message received last time is carried in the subsequent HTTP request message sent to the server, and then the subsequent HTTP request message is sent to the server.
5. The subsequent HTTP request message carrying cookie information sent by the client to the server firstly reaches the load balancing device, and the load balancing device directly determines the optimal server as the server C according to the cookie information of the subsequent HTTP request message without calculation through a load balancing algorithm, so that related requests are distributed to the same server for processing.
Currently, there are two main implementations of cookie session keeping technology: passive mode and active mode.
The passive method is to use cookie information generated on the server side as much as possible. If the cookie information generated by the server identifies the client, the load balancing device directly stores the mapping relationship between the client and the server after receiving the HTTP response message, and the server can be determined by the client information in the cookie information and the mapping relationship stored in the load balancing device. If the server is identified by the cookie information generated by the server side, the load balancing equipment directly determines the server according to the cookie information. Both of these two methods require the load balancing device and the server side to agree in advance on the content of the cookie information. If the load balancing device does not know the meaning of the cookie information set by the server, the load balancing device needs to store the mapping relation between the whole cookie information and the server, and then the server is determined by relying on the complete matching of the cookie information. Therefore, the passive mode is adopted to realize that the conversation is kept depending on the cookie information set by the server side.
The active mode is that the load balancing device actively sets the server information needed by itself in the cookie and determines the server by using the information, independent of the setting condition of the cookie information by the server. Specifically, after receiving an HTTP response message of a server, the load balancing equipment checks whether cookie information exists in the message; if yes, inserting information for identifying the server, which is approved by the load balancing equipment, into the initial part of the existing cookie information; if not, adding a cookie header, setting information for identifying the server authorized by the load balancing equipment in the added cookie header, setting expiration (expiration) time in the cookie, and then sending the HTTP response message after setting processing to the client. When the load balancing equipment receives a subsequent request message carrying cookie information from the client, the server is directly determined according to the information set by the load balancing equipment in the cookie, then the content added by the load balancing equipment in the existing cookie is deleted, and if no cookie is set in the HTTP response returned by the server C at that time, the cookie in the request message is completely deleted by the load balancing equipment; and finally, sending the request message to the determined server.
Therefore, session maintenance is realized in an active mode, although the setting of the server on the cookie is not relied on, the length of the cookie information is increased after the load balancing device inserts the information of the load balancing device into the cookie information set by the server, and if the length of the cookie information exceeds the limit of the browser of the client on the length of the cookie information, the cookie information is invalid, so that the session maintenance fails.
Disclosure of Invention
In view of the above, the present invention provides a method for session maintenance implemented by using cookies and a load balancing device, which do not rely on the setting of cookie information by a server, but ensure that the cookie information received by a client is within an allowable range when session maintenance is implemented.
The scheme is realized as follows:
a method of session maintenance, the method comprising:
the load balancing equipment receives a response message sent to a client by a server, replaces cookie information set by the server in the received response message by cookie information set by the load balancing equipment, records the corresponding relation among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server, and sends the replaced response message to the client;
and the load balancing equipment receives a request message sent by the client side subsequently, when the request message carries cookie information set by the load balancing equipment, cookie information set by a server corresponding to the cookie information in the request message and a corresponding server are searched according to the corresponding relation, the cookie information in the request message is restored to the cookie information set by the searched server, and the restored request message is sent to the searched server.
Preferably, after the load balancing device receives a response message sent by the server to the client, the method further includes: judging whether the received response message comprises cookie information or not, and if so, executing the replacement operation; otherwise, adding cookie information set by the load balancing equipment to the received response message, recording the corresponding relation between the added cookie information and the server, and then sending the added response message to the client;
after the cookie information set by the server corresponding to the cookie information in the request message and the corresponding server are searched, the method further includes: and judging whether cookie information set by the server corresponding to the cookie information in the request message is searched, if so, executing the reduction operation, otherwise, deleting the cookie information in the request message, and sending the deleted request message to the searched server.
The cookie information set by the load balancing equipment comprises index information; the corresponding relation is the corresponding relation between the index information, the cookie information set by the replaced server and the server;
and executing the searching operation by taking index information in the cookie information in the request message as an index.
Preferably, the cookie information set by the load balancing device further includes an identifier of the load balancing device;
after the load balancing device receives a request message sent by the client subsequently, the method further includes: and the load balancing equipment judges whether the received request message carries the self identification or not, and if so, the searching operation is executed.
Preferably, the cookie information set by the load balancing device further includes expiration time.
A load balancing device comprises a response message processing unit, a subsequent request message processing unit and a storage unit;
the response message processing unit is used for receiving a response message sent by a server to a client, replacing cookie information set by the server in the received response message with cookie information set by the load balancing equipment, recording the corresponding relationship among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server in the storage unit, and sending the replaced response message to the client;
the subsequent request message processing unit is configured to receive a request message sent by the client and carrying cookie information set by the load balancing device, search for cookie information set by a server and a corresponding server corresponding to the cookie information in the request message according to a correspondence stored in the storage unit, restore the cookie information in the request message to cookie information set by the searched server, and send the restored request message to the searched server;
the storage unit is used for storing the corresponding relation.
The response message processing unit comprises a first judgment module, a replacement module and an addition module;
the first judging module is used for judging whether the received response message comprises cookie information after receiving the response message sent to the client by the server, and if so, notifying the replacing module; otherwise, notifying the adding module;
the replacing module is used for replacing cookie information set by the server in the response message with cookie information set by the load balancing equipment after receiving the notification, and recording the corresponding relationship among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server sending the response message in the storage unit; sending the replaced response message to the client;
and the adding module is used for adding cookie information set by the load balancing equipment to the received response message after receiving the notification, recording the corresponding relation between the added cookie information and the server sending the response message in the storage unit, and sending the added response message to the client.
The subsequent request message processing unit comprises a second judgment module, a search module, a restoration module and a deletion module;
the second judging module is used for judging whether the received request message carries cookie information set by the load balancing equipment after receiving the request message sent by the client, and if so, informing the searching module;
the searching module is used for searching cookie information set by the server corresponding to the cookie information in the request message and a corresponding server according to the corresponding relation stored in the storage unit after receiving the notification of the second judging module; if the searched information comprises cookie information set by the server, sending the searched information to the restoring module; otherwise, sending the searched information to the deleting module;
the restoring module is used for restoring the cookie information in the request message into the cookie information set by the searched server and sending the restored request message to the searched server;
and the deleting module is used for deleting the cookie information in the request message and sending the deleted request message to the searched server.
The cookie information set by the load balancing equipment comprises an identifier of the load balancing equipment;
the second judging module judges whether the received request message carries cookie information set by the load balancing device according to whether the cookie information of the request message has the identifier of the load balancing device.
The cookie information set by the load balancing equipment comprises index information; the corresponding relation stored by the storage unit is as follows: and the index information, the cookie information set by the replaced server and the corresponding relation between the servers.
According to the technical scheme, the cookie information set by the server is replaced by the cookie information set by the load balancing equipment, so that the cookie information length is prevented from being increased, the cookie information is ensured to be within the allowed length range, and the cookie information invalidation caused by the fact that the cookie information length exceeds the limit is avoided. Moreover, the message exchanged between the load balancing device and the client carries the cookie information set by the load balancing device by replacing the restoration operation, so that the load balancing device can perform server searching operation according to the cookie information set by the load balancing device without depending on the cookie information set by the server. Therefore, regardless of whether the server sets cookie information and regardless of the meaning of the cookie information set by the server, the load balancing apparatus does not have to be concerned about session maintenance.
In addition, when the cookie information set by the load balancing device includes index information for matching, the index information is relatively short, so that the matching efficiency of the load balancing device can be greatly improved.
Drawings
Fig. 1 is a schematic diagram of a networking structure of a typical application of a conventional server load balancing device.
FIG. 2 is an exemplary flow chart for session maintenance using cookies in accordance with the present invention.
FIG. 3 is a flowchart of a method for session maintenance using cookies according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a load balancing device in the embodiment of the present invention.
Detailed Description
The invention is described in detail below by way of example with reference to the accompanying drawings.
Fig. 2 is an exemplary flowchart of a session holding method using cookies according to the present invention, which specifically includes the following steps:
step 201: after the load balancing equipment receives the response message from the server, cookie information set by the server in the response message is replaced by cookie information set by the load balancing equipment, the corresponding relation among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server is recorded, and the replaced response message is sent to the client.
Step 202: after receiving a request message carrying cookie information set by the load balancing equipment and sent by a client, the load balancing equipment searches for the server set cookie information corresponding to the cookie information in the request message and a corresponding server according to the recorded corresponding relationship, restores the cookie information in the request message to the found server set cookie information, and sends the restored request message to the found server.
According to the above process, by using the processing method of fig. 2, cookie information set by the server is replaced with cookie information set by the load balancing device, so that the cookie information length is prevented from increasing, and the cookie information is ensured to be within the allowable length range, thereby preventing cookie information from being invalid due to the cookie information length exceeding the limit.
Moreover, the message exchanged between the load balancing device and the client carries the cookie information set by the load balancing device by replacing the restoration operation, so that the load balancing device can perform server searching operation according to the cookie information set by the load balancing device without depending on the cookie information set by the server. Therefore, regardless of whether the server sets cookie information and regardless of the meaning of the cookie information set by the server, the load balancing apparatus does not have to be concerned about session maintenance.
In addition, the session maintaining operation of the load balancing equipment is completely transparent to the server, and the server does not need to do any cooperation work at all.
FIG. 3 is a flowchart of a session holding method implemented by using cookies according to an embodiment of the present invention. The process is applied to the networking shown in fig. 1, and as shown in fig. 3, the method comprises the following steps:
step 301: after the client and the server are subjected to three times of TCP handshake, a first HTTP request is sent to the server, the HTTP request firstly reaches the load balancing equipment, and the load balancing equipment determines an optimal server C to serve the client according to a preset balancing algorithm.
Step 302: the server C sends an HTTP response message, which first reaches the load balancing device.
Step 303: the load balancing device detects whether cookie information exists in the received HTTP response message, if yes, step 304 is executed; otherwise, step 306 is performed.
Step 304: intercepting cookie information set by a server C in an HTTP response message, and adding a record in a local cookie session holding table, wherein the record content comprises: table entry index information, cookie information set by the replaced server, and server information. This information is used to subsequently determine the server and restore cookie information. The server information is information of a server sending the HTTP response message.
The intercepted cookie information may include specific cookie content, or may be NULL, and the representation of the NULL cookie information is NULL or quoted.
Although the load balancing device in the present invention also needs to store the cookie session holding table, since the cookie information sent by the subsequent client is set by the load balancing device, and the cookie information can be carried conveniently to search for information of a corresponding entry, such as the entry index information in the present embodiment, the entry matching efficiency in the present embodiment is greatly improved compared with the table matching performed by using the cookie information in the text format set by the server in the prior art.
In addition, because the original cookie information of the server is stored in the load balancing device, but not in the client, the client only needs to keep the table entry index information, thereby reducing the storage burden of the client.
Step 305: and replacing cookie information set by the server C in the HTTP response message with cookie information set by the load balancing equipment. Step 308 is then performed.
The length of the cookie information set by the load balancing equipment is smaller than or equal to the cookie information length allowed by the client. The cookie information set by the load balancing device includes: step 304 adds entry index information in the cookie session holding table. Preferably, the cookie information set by the load balancing device may further include a device identifier of the load balancing device, so as to confirm that the cookie information is indeed added by the load balancing device. The cookie information set by the load balancing device may further include an expire time set by the user, and the like.
There is no fixed order of execution between step 304 and step 305 above. Step 305 may also be performed first; or step 304 and step 305 may be performed simultaneously.
Step 306: adding a record in the local cookie session holding table, wherein the record comprises the following contents: table entry index information, cookie information set by the replaced server, and server information. Wherein one item of the server-set cookie information has no content.
Step 307: adding cookie information set by the load balancing equipment in the HTTP response message, wherein the cookie information comprises an equipment identifier of the load balancing equipment, and table entry index information and expire time added to a cookie session holding table in step 306; step 308 is then performed.
Step 308: and sending the modified (including the replaced and added) HTTP response message to the client.
After the step, after receiving the HTTP response message, the client records the cookie information in the message, and when subsequently initiating an HTTP request to the server, the client adds the recorded cookie information to the HTTP request message.
Step 309: the load balancing equipment receives an HTTP request message carrying cookie information sent by a client side subsequently, and obtains the cookie information from the received HTTP request message.
Step 310: judging whether the acquired cookie information includes the device identifier, if so, executing step 311; otherwise, an existing session hold operation is performed to determine the server in step 320.
Step 311: and searching a cookie session holding table according to the table entry index information in the acquired cookie information, and searching the cookie information set by the server corresponding to the table entry index information and the corresponding server information.
Step 312: and restoring the cookie information in the received HTTP request message into the found cookie information set by the corresponding server.
Step 313: and sending the restored HTTP request message to the server indicated by the searched corresponding server information.
This flow ends by this point.
In order to implement the method for implementing session maintenance by using cookies, the embodiment of the invention further provides load balancing equipment. Fig. 4 is a schematic structural diagram of a load balancing device in the embodiment of the present invention. As shown in fig. 4, the apparatus includes a response message processing unit 41, a subsequent request message processing unit 42, and a storage unit 43. Wherein,
the response message processing unit 41 is configured to receive a response message sent by the server to the client, and replace cookie information set by the server in the received response message with cookie information set by the device where the server is located, where the cookie information includes index information, a device identifier of the device where the server is located, and expire time; then, the correspondence between the cookie information set by the device, the replaced cookie information, and the server that sends the response packet is recorded in the storage unit 43, and the replaced response packet is sent to the client.
And a subsequent request message processing unit 42, configured to receive a request message sent by the client and carrying cookie information set by the device in which the request message is located, search for the server-set cookie information and the corresponding server corresponding to the cookie information in the request message according to the correspondence stored in the storage unit 43, restore the cookie information in the request message to the searched cookie information set by the corresponding server, and send the restored request message to the searched corresponding server.
The storage unit 43 is used for storing the corresponding relationship recorded by the response message processing unit 41 and providing the corresponding relationship to the subsequent request message processing unit 42 for use.
The response packet processing unit 41 specifically includes: a first judgment module 411, a replacement module 412, and an addition module 413; wherein,
a first determining module 411, configured to determine, after receiving a response packet sent by the server to the client, whether the received response packet includes cookie information, and if so, notify the replacing module 412; otherwise, notify the add module 413;
a replacing module 412, configured to replace cookie information in the received response message with cookie information set by the device after receiving the notification, and record a correspondence between the cookie information set by the device, the replaced cookie information, and the server that sends the response message in the storage unit 43; sending the replaced response message to the client;
an adding module 413, configured to add cookie information set by the device to the received response packet after receiving the notification, record a correspondence between the added cookie information and the server that sends the response packet in the storage unit 43, and send the added response packet to the client.
The subsequent request packet processing unit 42 in the load balancing device specifically includes a second determining module 421, a searching module 422, a restoring module 423, and a deleting module 424;
the second judging module 421 is configured to, after receiving a request message sent by the client subsequently, judge whether the received request message carries cookie information set by the device where the request message is sent, and if so, notify the searching module; otherwise; an existing session holding operation using cookies is performed. Specifically, the second determining module 421 determines whether the cookie carried in the request message contains the device identifier of the device after receiving a request message sent by the client subsequently, and if yes, determines that the cookie information is set by the device, and at this time, executes the operation of the notification searching module; otherwise, the cookie information is considered to be set by the server, and at this time, the operation of the existing determination server is performed.
A searching module 422, configured to search cookie information set by the server and corresponding server corresponding to the cookie information in the request message according to the correspondence stored in the storage unit 43; the method specifically comprises the following steps: index information in cookie information carried by the request message is used as an index, and cookie information set by a server corresponding to the index information and a corresponding server are searched in a corresponding relation; if cookie information set by the server and corresponding server information corresponding to the index information in the request message are found, sending the found corresponding cookie information and corresponding server information to the restoring module 423; if only the corresponding server information exists, the found corresponding server information is sent to the deleting module 424;
the restoring module 423 is configured to restore the cookie information in the request message to the found cookie information according to the information received from the searching module 422, and send the restored request message to the found server.
The deleting module 424 is configured to delete the cookie information in the request message according to the information received from the searching module 422, and send the deleted request message to the searched server.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A session maintenance method, comprising:
the load balancing equipment receives a response message sent to a client by a server, replaces cookie information set by the server in the received response message by cookie information set by the load balancing equipment, records the corresponding relation among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server, and sends the replaced response message to the client;
and the load balancing equipment receives a request message sent by the client side subsequently, when the request message carries cookie information set by the load balancing equipment, cookie information set by a server corresponding to the cookie information in the request message and a corresponding server are searched according to the corresponding relation, the cookie information in the request message is restored to the cookie information set by the searched server, and the restored request message is sent to the searched server.
2. The method of claim 1, wherein after the load balancing device receives the response message sent by the server to the client, the method further comprises: judging whether the received response message comprises cookie information or not, and if so, executing the replacement operation; otherwise, adding cookie information set by the load balancing equipment to the received response message, recording the corresponding relation between the added cookie information and the server, and then sending the added response message to the client;
after the cookie information set by the server corresponding to the cookie information in the request message and the corresponding server are searched, the method further includes: and judging whether cookie information set by the server corresponding to the cookie information in the request message is searched, if so, executing the reduction operation, otherwise, deleting the cookie information in the request message, and sending the deleted request message to the searched server.
3. The method of claim 1, wherein the cookie information set by the load balancing device includes index information; the corresponding relation is the corresponding relation between the index information, the cookie information set by the replaced server and the server;
and executing the searching operation by taking index information in the cookie information in the request message as an index.
4. The method of claim 3, wherein the cookie information set by the load balancing device further comprises an identification of the load balancing device;
after the load balancing device receives a request message sent by the client subsequently, the method further includes: and the load balancing equipment judges whether the received request message carries the self identification or not, and if so, the searching operation is executed.
5. The method of claim 3, wherein the cookie information set by the load balancing device further comprises an expiration time.
6. A load balancing device is characterized in that the device comprises a response message processing unit, a subsequent request message processing unit and a storage unit;
the response message processing unit is used for receiving a response message sent by a server to a client, replacing cookie information set by the server in the received response message with cookie information set by the load balancing equipment, recording the corresponding relationship among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server in the storage unit, and sending the replaced response message to the client;
the subsequent request message processing unit is configured to receive a request message sent by the client and carrying cookie information set by the load balancing device, search for cookie information set by a server and a corresponding server corresponding to the cookie information in the request message according to a correspondence stored in the storage unit, restore the cookie information in the request message to cookie information set by the searched server, and send the restored request message to the searched server;
the storage unit is used for storing the corresponding relation.
7. The apparatus according to claim 6, wherein the response packet processing unit includes a first determining module, a replacing module, and an adding module;
the first judging module is used for judging whether the received response message comprises cookie information after receiving the response message sent to the client by the server, and if so, notifying the replacing module; otherwise, notifying the adding module;
the replacing module is used for replacing cookie information set by the server in the response message with cookie information set by the load balancing equipment after receiving the notification, and recording the corresponding relationship among the cookie information set by the load balancing equipment, the cookie information set by the replaced server and the server sending the response message in the storage unit; sending the replaced response message to the client;
and the adding module is used for adding cookie information set by the load balancing equipment to the received response message after receiving the notification, recording the corresponding relation between the added cookie information and the server sending the response message in the storage unit, and sending the added response message to the client.
8. The apparatus according to claim 7, wherein the subsequent request packet processing unit includes a second determining module, a searching module, a restoring module, and a deleting module;
the second judging module is used for judging whether the received request message carries cookie information set by the load balancing equipment after receiving the request message sent by the client, and if so, informing the searching module;
the searching module is used for searching cookie information set by the server corresponding to the cookie information in the request message and a corresponding server according to the corresponding relation stored in the storage unit after receiving the notification of the second judging module; if the searched information comprises cookie information set by the server, sending the searched information to the restoring module; otherwise, sending the searched information to the deleting module;
the restoring module is used for restoring the cookie information in the request message into the cookie information set by the searched server and sending the restored request message to the searched server;
and the deleting module is used for deleting the cookie information in the request message and sending the deleted request message to the searched server.
9. The apparatus of claim 8, wherein the cookie information set by the load balancing apparatus comprises an identification of the load balancing apparatus;
the second judging module judges whether the received request message carries cookie information set by the load balancing device according to whether the cookie information of the request message has the identifier set by the load balancing device.
10. The apparatus of claim 6, wherein the cookie information set by the load balancing apparatus includes index information; the corresponding relation stored by the storage unit is as follows: and the index information, the cookie information set by the replaced server and the corresponding relation between the servers.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2008101182853A CN101340371B (en) | 2008-08-12 | 2008-08-12 | Session keeping method and load balance apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2008101182853A CN101340371B (en) | 2008-08-12 | 2008-08-12 | Session keeping method and load balance apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101340371A CN101340371A (en) | 2009-01-07 |
| CN101340371B true CN101340371B (en) | 2011-09-21 |
Family
ID=40214328
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2008101182853A Expired - Fee Related CN101340371B (en) | 2008-08-12 | 2008-08-12 | Session keeping method and load balance apparatus |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101340371B (en) |
Families Citing this family (26)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101783771A (en) * | 2010-03-24 | 2010-07-21 | 杭州华三通信技术有限公司 | Method and equipment for realizing load balance continuity |
| CN102594796B (en) * | 2011-12-27 | 2015-05-20 | 中兴通讯股份有限公司 | Terminal device and user information synchronization method |
| CN104038914B (en) * | 2013-03-08 | 2018-04-24 | 中兴通讯股份有限公司 | A kind of method and device of Cookie error correction |
| CN104144155B (en) * | 2013-05-10 | 2018-01-02 | 百度在线网络技术(北京)有限公司 | Session processing system and conversation processing method for long connection |
| CN103457869A (en) * | 2013-08-28 | 2013-12-18 | 北京星网锐捷网络技术有限公司 | Conversation maintaining method and device |
| CN104780184A (en) * | 2014-01-09 | 2015-07-15 | 华耀(中国)科技有限公司 | A Method of Using Geographical Location Information for Load Balancing |
| CN103957207B (en) * | 2014-04-29 | 2017-11-28 | 北京太一星晨信息技术有限公司 | A kind of session keeping method and device |
| CN105939313B (en) * | 2015-09-01 | 2019-03-15 | 杭州迪普科技股份有限公司 | Status code reorientation method and device |
| CN105306571B (en) * | 2015-10-28 | 2019-04-30 | 南京师范大学 | Method and system for supporting stateful anycast in route-based NDN |
| CN105323317B (en) * | 2015-10-28 | 2019-04-26 | 南京师范大学 | Method and system for stateful anycast support in parser-based NDN |
| CN105847448B (en) * | 2016-06-02 | 2019-04-26 | 南京师范大学 | Anycast method and system based on routing and redirection in NDN |
| CN105897928B (en) * | 2016-06-02 | 2019-04-30 | 南京师范大学 | Anycast method and system based on redirection and rewriting in NDN |
| CN106209875A (en) * | 2016-07-19 | 2016-12-07 | 青岛海信传媒网络技术有限公司 | Method for processing business based on multi-services device and service server |
| CN106790150B (en) * | 2016-12-28 | 2020-07-31 | 北京信安世纪科技股份有限公司 | Session maintaining method and device |
| CN106713499A (en) * | 2017-01-23 | 2017-05-24 | 天地融科技股份有限公司 | Load balancing method, equipment and system |
| CN106686129A (en) * | 2017-01-23 | 2017-05-17 | 天地融科技股份有限公司 | Load balancing method and load balancing system |
| CN107360251A (en) * | 2017-08-16 | 2017-11-17 | 中国工商银行股份有限公司 | Method, system and the load balancing apparatus that session is kept |
| CN107995304A (en) * | 2017-12-13 | 2018-05-04 | 杭州迪普科技股份有限公司 | A kind of session keeping method and device based on cookie |
| CN108076149B (en) * | 2017-12-15 | 2021-07-23 | 杭州迪普科技股份有限公司 | Session maintaining method and device |
| CN108881430A (en) * | 2018-06-14 | 2018-11-23 | 平安科技(深圳)有限公司 | Session keeping method, device, computer equipment and storage medium |
| CN109451068B (en) * | 2018-12-28 | 2021-11-23 | 杭州迪普科技股份有限公司 | Method and device for inserting Set-Cookie value |
| CN110233902B (en) * | 2019-06-28 | 2022-03-01 | 杭州迪普科技股份有限公司 | Session processing method and device, electronic equipment and machine-readable storage medium |
| CN112217843B (en) | 2019-07-09 | 2023-08-22 | 阿里巴巴集团控股有限公司 | Service unit switching method, system and equipment |
| CN110913011B (en) * | 2019-12-05 | 2022-12-20 | 东软集团股份有限公司 | Session holding method, session holding device, readable storage medium and electronic device |
| CN112565441B (en) * | 2020-12-11 | 2023-07-14 | 北京天融信网络安全技术有限公司 | Data communication method and electronic equipment |
| CN112637316B (en) * | 2020-12-17 | 2024-02-27 | 中国农业银行股份有限公司 | Communication method and device |
-
2008
- 2008-08-12 CN CN2008101182853A patent/CN101340371B/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN101340371A (en) | 2009-01-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101340371B (en) | Session keeping method and load balance apparatus | |
| US9888089B2 (en) | Client side cache management | |
| CN102355426B (en) | Method for transmitting off-line file and system | |
| EP2263163B1 (en) | Content management | |
| CN107979592B (en) | A method and device for sending a service request message | |
| JP2004164630A (en) | Client / server communication system | |
| US8364124B2 (en) | Methods, systems, and computer readable media for tokenization of multimedia messages | |
| US10708820B2 (en) | Apparatus and method for data delivery in delay-tolerant network (DTN) | |
| US9992296B2 (en) | Caching objects identified by dynamic resource identifiers | |
| CN105868231A (en) | Cache data updating method and device | |
| US9088603B2 (en) | File transfer method and device | |
| CN111177601B (en) | Page rendering processing method, device, equipment and readable storage medium | |
| CN108055312A (en) | Method for routing and its device and computer installation and its readable storage medium storing program for executing | |
| CA2615709A1 (en) | System and method for communicating state management between a browser user-agent and a server | |
| CN107465666A (en) | A kind of client ip acquisition methods and device | |
| CN105100084A (en) | Method and system for preventing cross-site request forgery attack | |
| CA2911989C (en) | Method, system and apparatus for dectecting instant message spam | |
| CN103414641B (en) | Neighbor table item release, device and the network equipment | |
| WO2015107653A1 (en) | Communication apparatus, communication method, and communication program | |
| US7756996B2 (en) | Embedding management data within HTTP messages | |
| CN113949710B (en) | Data processing method and server cluster | |
| CN112559134B (en) | Distributed WebSocket cluster construction method, device, system and storage medium | |
| CN112637316B (en) | Communication method and device | |
| CN101741889A (en) | Method, system and service for centralized management of network services | |
| KR100528590B1 (en) | Method and apparatus for performing the process such as re-transmittance of the saved spam mail and modification of the spam rule, and computer readable medium on which program for executing the method is recorded |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |
|
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110921 Termination date: 20200812 |