CN104811488A - Load balancing equipment-based session keeping method and system and load balancing equipment - Google Patents
Load balancing equipment-based session keeping method and system and load balancing equipment Download PDFInfo
- Publication number
- CN104811488A CN104811488A CN201510173425.7A CN201510173425A CN104811488A CN 104811488 A CN104811488 A CN 104811488A CN 201510173425 A CN201510173425 A CN 201510173425A CN 104811488 A CN104811488 A CN 104811488A
- Authority
- CN
- China
- Prior art keywords
- session identification
- session
- server
- http
- embedded
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/142—Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1014—Server selection for load balancing based on the content of a request
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a load balancing equipment-based session keeping method and system and load balancing equipment. The method comprises the following steps of receiving an HTTP (hyper text transport protocol) request from a client; determining whether the URL (uniform resource locator) and/or the head of the HTTP request are embedded with a session identity for identifying a session; if so, extracting the session identity through a keyword matching method or a regular expression method; determining whether a server corresponding to the session identity exists; if so, sending the HTTP request to the server corresponding to the session identity; if no session identity is embedded and no server corresponding to the session identity exists, sending the HTTP request to the server according to a load balancing scheduling algorithm; receiving an HTTP response fed back by the server and forwarding the HTTP response to the client. The load balancing equipment-based session keeping method can effectively improve the processing performance of the load balancing equipment, and without requiring the client to adopt a cookie-supported browser, can achieve session keeping.
Description
Technical field
The present invention relates to computer realm, particularly relate to a kind of session keeping method based on load-balancing device and system and load-balancing device.
Background technology
Load balancing (Loadbalace) is a kind of server cluster technology, be by a large amount of requests of client according to certain strategy distribution to multiple servers process, the disposal ability of whole system is reached or close to the technology of Servers-all disposal ability sum.Session keeps (Session Persistence) to refer in the process of load balancing, by some technical method, client-requested is identified, make the request originally belonged to a session, distribute (or scheduling) as much as possible all the time to same station server technology.
When to multiple servers load balancing, conversation establishing all only occurs on a current station server each time, and other servers do not have.Load-balancing device must identify the session in client-requested, and by request scheduling on the server of this session of initial creation, if dispatch on other servers, then session can be caused to continue, final session request failure.
As shown in Figure 1, load-balancing device is dispatched A, B two-server.Client have submitted a log on request, is dispatched to A server by load-balancing device, and on A server, verify password success, then create session; And then client have submitted again the request of " inquiry order ", now load-balancing device must by this request scheduling to A server, because only have session status A server existing this client and logged in, if scheduling is to B server, this server does not also know the Entered state of client, and request then can be failed.
The session of current existence keeps technology to comprise following several:
(1) IP session in source keeps (Source Address Persistence): the session based on source IP keeps technology, by distinguishing the method for source IP, by Requests routing identical for source IP to same station server.In this mode implementation procedure, client is often in Intranet environment, and the IP address of use is private net address, have passed through source address conversion, there is the situation that a large amount of client uses same IP when accessing public network.Keep being to realize based on the source address of packet due to source IP session, the client of a large amount of identical IP can be caused to be dispatched to same server, thus dispatch unbalanced.In addition for cell-phone customer terminal, its source IP address is alternatively, is not suitable for source IP session and keeps.
(2) Cookie inserts session maintenance (Cookie Insert Persistence): when client is accessed first, by inserting cookie, client is marked (server of the content correspondence scheduling of mark), mark with cookie in the request making client follow-up, what marked by cookie identifies scheduled server, finally reaches the effect of all Requests routing of same client to same server.Mode based on cookie because it realizes principle, so require that the browser of client must support Cookie.
(3) Cookie rewrites session maintenance (Cookie Rewrite Persistence): insert session with cookie and keep similar, by the client-requested identified that makes marks in Cookie equally, do not insert new cookie unlike load equalizer, but realized by the cookie rewriting server.This mode not only requires that client browser supports Cookie, and requires that server employs Cookie.
(4) the passive session of Cookie keeps (Cookie Passive Persistence): in the database of equipment, record server to the session id that client is distributed in cookie, and the corresponding relation of session id and server.When client is accessed again, first get the session id value in client cookie, by searching database, finding the server of last scheduling, finally realizing the object that session keeps.This scheme requires that client supports cookie equally, and server uses cookie to record Session Id.
(5) the passive session of URL keeps: by obtaining the session id in URL, record the server corresponding to each session.This mode can only record the session id in URL, at the session id of client-requested not in URL, but inapplicable time in the list submitted to.Even if session id is in URL, because the form of expression of different server is all different, makes it identify and have difficulties.
Summary of the invention
The technical problem to be solved in the present invention is, for the defect of prior art, provides a kind of session keeping method based on load-balancing device and system and load-balancing device.
The technical solution adopted for the present invention to solve the technical problems is: a kind of session keeping method based on load-balancing device, comprises the following steps:
Receive the HTTP request from client;
Judge the session identification whether be embedded with in the URL of described HTTP request and/or HTTP request head for identifying session;
If be embedded with session identification, then key quality control point or regular expressions method is adopted to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
If be not embedded with session identification or not corresponding with described session identification server, then according to load balance scheduling algorithm, described HTTP request is sent to server;
The HTTP receiving described server feedback replys and transfers to described client.
Preferably, also comprise judge described HTTP request be POST request or GET request;
If POST asks, then judge the session identification whether be embedded with in the list that described POST asks for identifying session; If be embedded with session identification, then key quality control point or regular expressions method is adopted to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
If the list of GET request, POST request is not embedded with session identification or not corresponding with described session identification server, then described HTTP request is sent to the server determined according to load balance scheduling algorithm.
Preferably, the HTTP of the described server feedback of described reception replys and transfers to described client and comprises the steps:
Receive described HTTP to reply;
Judge whether described HTTP reply header or HTTP response content are embedded with the session identification for identifying session;
If be embedded with session identification, then adopt key quality control point or regular expressions method to extract described session identification, the corresponding relation of described session identification and server is stored in a database, and described HTTP response is transmitted to client;
If be not embedded with session identification, then described HTTP response is transmitted to client.
Preferably, described employing key quality control point or regular expressions method extraction session identification comprise the steps:
Preset the keyword of session identification, side-play amount and default session identification form;
Adopt key quality control point to extract session identification according to described keyword and side-play amount, and judge whether successfully to extract described session identification;
If extract unsuccessfully, then regular expressions method is adopted to extract described session identification according to described default session identification form, otherwise the extraction of end session mark.
The present invention also provides a kind of load-balancing device, comprising:
Information transmit-receive unit, for receiving the HTTP request from client, and transfers to described client by the HTTP of the server feedback received response;
Judging unit, for judging the session identification whether be embedded with in the URL of described HTTP request and/or HTTP request head for identifying session;
First processing unit, for when being embedded with session identification, then adopts key quality control point or regular expressions method to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
Second processing unit, during for not being embedded with session identification or not corresponding with described session identification server in described HTTP request, is then sent to server according to load balance scheduling algorithm by described HTTP request.
Preferably, described judging unit, also for judging that described HTTP request is POST request or GET request, and when described HTTP request is POST request, judges the session identification whether be embedded with in the list that described POST asks for identifying session;
Described first processing unit, is also embedded with session identification in the list of asking at POST, then adopt key quality control point or regular expressions method to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
Described second processing unit, also in described HTTP request be GET request, POST request list be not embedded with session identification or not corresponding with described session identification server time, then described HTTP request is sent to the server determined according to load balance scheduling algorithm.
Preferably, described judging unit is also for judging whether the HTTP reply header that described HTTP replys or HTTP response content are embedded with the session identification for identifying session;
Described first processing unit is also for when HTTP reply header or HTTP response content are embedded with session identification, key quality control point or regular expressions method is adopted to extract described session identification, the corresponding relation of described session identification and server is stored in a database, and described HTTP response is transmitted to client;
Described HTTP response, also for when HTTP reply header or HTTP response content are not embedded with session identification, is transmitted to client by described second processing unit.
Preferably, described first processing unit is also for performing following steps:
Preset the keyword of session identification, side-play amount and default session identification form;
Adopt key quality control point to extract session identification according to described keyword and side-play amount, and judge whether successfully to extract described session identification;
If extract unsuccessfully, then regular expressions method is adopted to extract described session identification according to described default session identification form, otherwise the extraction of end session mark.
The present invention also provides a kind of session keeping system based on load-balancing device, comprises aforesaid load-balancing device, communicate with described load-balancing device the client and server be connected.
The present invention compared with prior art tool has the following advantages: implement the present invention, employing key quality control point or regular expressions method extract the session identification in the URL and/or HTTP request head being embedded in HTTP request, to improve the handling property of load-balancing device, adopt without the need to requiring client and support that the browser of cookie can realize session and keep.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the topological diagram of load-balancing device in prior art;
Fig. 2 is the flow chart based on the session keeping method of load-balancing device in one embodiment of the invention;
Fig. 3 is the flow chart that in one embodiment of the invention, session identification extracts;
Fig. 4 receives HTTP to reply and the flow chart transferring to client in one embodiment of the invention;
Fig. 5 is another flow chart based on the session keeping method of load-balancing device in one embodiment of the invention;
Fig. 6 is the theory diagram of the load-balancing device in one embodiment of the invention.
In figure: 10, information transmit-receive unit; 20, judging unit; 30, the first processing unit; 40, the second processing unit.
Embodiment
In order to there be understanding clearly to technical characteristic of the present invention, object and effect, now contrast accompanying drawing and describe the specific embodiment of the present invention in detail.
Embodiment 1
Fig. 2 illustrates the session keeping method based on load-balancing device in the present embodiment, and this session keeping method comprises the following steps:
S11: receive the HTTP request from client.
S12: judge the session identification whether be embedded with in the URL of HTTP request and/or HTTP request head for identifying session.Understandably, session identification can be embedded in the URL of HTTP request or HTTP request head, also can embed session identification in the URL and HTTP request head of HTTP request simultaneously.Understandably, by judging whether URL and/or HTTP request head embed session identification, whether carry session identification in the most of HTTP request of identifiable design, to realize the object that this programme session keeps.
S13: if be embedded with session identification in the URL of HTTP request and/or HTTP request head, then adopt key quality control point or regular expressions method to extract session identification, understandably, prestore the corresponding relation of session identification and server in a database.After extraction session identification, judge currently whether there is the server corresponding with session identification according to the session identification extracted; If there is the server corresponding with session identification, then HTTP request is sent to the server corresponding with session identification, its HTTP request in a conversation procedure, can be dispatched in the server of accessing in first HTTP request by client, keep object to realize session.
As shown in Figure 3, adopt key quality control point or regular expressions method to extract session identification to comprise the steps:
S131: preset the keyword of session identification, side-play amount and default session identification form.
S132: adopt key quality control point to extract session identification according to keyword and side-play amount, and judge whether successfully to extract session identification.Understandably, if when session identification adopts a certain keyword and has fixing side-play amount, calculate side-play amount, can check and accept the position of session identification fast, and extract this session identification by search key, the efficiency that key quality control point extracts session identification is higher.
S133: if session identification extracts unsuccessfully, then adopt regular expressions method to extract session identification according to default session identification form, otherwise the extraction of end session mark, the URL and/or the HTTP request head that are considered as HTTP request are not embedded with session identification.Understandably, as long as session identification adopts preset session identification form shfft now, adopt regular expressions method all can extract this session identification, it extracts more comprehensively.
Understandably, extracted by key quality control point and regular expressions method and combine to extract session identification, session identification is extracted according to key quality control point, then without the need to adopting regular expressions method to conversate marker extraction again, effectively can improve the extraction efficiency of session identification and ensureing to extract more comprehensively.
S14: if be not embedded with session identification or not corresponding with session identification server in the URL of HTTP request and/or HTTP request head, then according to load balance scheduling algorithm, HTTP request is sent to server.Understandably, if client first time access services device, namely when first time sends HTTP request, URL and the HTTP request head of its HTTP request all do not embed session identification, correspondingly, there is not the server corresponding with session identification, therefore adopt load balance scheduling algorithm that HTTP request is sent to server.
S15: the HTTP of reception server feedback replys and transfers to client.Understandably, when client first time sends HTTP request by load-balancing device, HTTP request is sent to server according to load balance scheduling algorithm by load-balancing device, server creates session, and HTTP response is sent to client, because client does not support cookie, session identification is embedded in all hyperlink of client, INPUT control or other HTML code by server.
As shown in Figure 4, step S15 comprises the steps:
S151: the HTTP response that reception server sends.
S152: judge whether the HTTP reply header that HTTP replys or HTTP response content are embedded with the session identification for identifying session.Understandably, (first time of namely receiving that client sends is after HTTP request after a new session start for server, a session identification is distributed by for current session, this session identification meets default keyword and the requirement of side-play amount, and/or meet default session identification form, so that inquire about.Because browser does not support cookie, this session identification cannot be saved in cookie, therefore session identification to be embedded in HTTP reply header or HTTP response content and to return to client by server, make all to be embedded with this session identification in all hyperlink of client or hiding INPUT control, the URL of the HTTP request that client is sent thereafter and/or HTTP request head are all embedded with this session identification.
S153: if be embedded with session identification in HTTP reply header or HTTP response content, key quality control point or regular expressions method is then adopted to extract the session identification be embedded in HTTP reply header or HTTP response content, the corresponding relation of session identification and server is stored in a database, and HTTP response is transmitted to client, so that again receive when being embedded with the HTTP request of session identification from same client, HTTP request can be sent in the server corresponding with session identification, keep to realize session.
S154: if be not embedded with session identification in HTTP reply header or HTTP response content, be then transmitted to client by HTTP response.Understandably, if be not embedded with session identification in HTTP reply header or HTTP response content, directly HTTP response is transmitted to client, when again receiving the HTTP request of this client transmission, directly HTTP request cannot be sent to corresponding server, session can not be realized and keep.
Understandably, server processes the HTTP request received, and to the response of load-balancing device feedback HTTP request, this HTTP can be embedded with session identification in replying, and also can not be embedded with session identification.If the HTTP request of feedback embeds session identification, load-balancing device extracts this session identification, and the corresponding relation of session identification and server is stored in a database, so that when again receiving the HTTP request of this server transmission, this session identification of direct basis sends it to corresponding server, to improve the handling property of load-balancing device.
In the present embodiment, judge the session identification whether embedded in the URL of HTTP request and/or HTTP request head for identifying session, and HTTP request please send to corresponding server according to judged result, effectively can improve the handling property of load-balancing device, without the need to requiring that client adopts the browser supporting cookie.
As shown in Figure 5, also should comprise the steps: based on the session keeping method of load-balancing device
S16: judge that HTTP request is POST request or GET request;
S17: if POST request, then judge the session identification whether be embedded with in the list that POST asks for identifying session.If be embedded with session identification, then key quality control point or regular expressions method is adopted to extract session identification; And judge currently whether there is the server corresponding with session identification; If there is the server corresponding with session identification, then HTTP request is sent to the server corresponding with session identification.
If the list of GET request, POST request is not embedded with session identification or not corresponding with session identification server, then performs step S14, S15, then HTTP request is sent to the server determined according to load balance scheduling algorithm.Understandably, if GET request, then only judge whether the URL of its HTTP request and/or HTTP request head are embedded with session identification, if be not embedded with session identification, then according to load balance scheduling algorithm determination server.Understandably, if automatically trigger access request in the javascript of client, server also can embed session identification in javascript.
In the present embodiment, judge the session identification whether embedded in the URL of HTTP request and/or the list of HTTP request head or POST request for identifying session, and HTTP request please send to corresponding server according to judged result, effectively can improving the handling property of load-balancing device, supporting that without the need to requiring client the browser of cookie can realize session and keep.
Embodiment 2
Fig. 6 illustrates the load-balancing device in the present embodiment.This load-balancing device comprises:
Information transmit-receive unit 10, replys the HTTP of the server feedback received and transfers to client for the HTTP request that receives from client.
Judging unit 20, for judging the session identification whether be embedded with in the URL of HTTP request and/or HTTP request head for identifying session; And judge that HTTP request is POST request or GET request, when HTTP request is POST request, judge the session identification whether be embedded with in the list that POST asks for identifying session.Even HTTP request is POST request, then judge the session identification whether be embedded with in the list that the URL of HTTP request, HTTP request head and/or POST ask for identifying session; If HTTP request is GET request, then only judge whether the URL of HTTP request and/or HTTP request head are embedded with the session identification for identifying session.Understandably, by judging URL and/or HTTP request head, whether the list of POST request embed session identification, whether carries session identification, to realize the object that this programme session keeps in the most of HTTP request of identifiable design.
First processing unit 30, during for being embedded with session identification in the list of the URL of HTTP request, HTTP request head and/or POST request, then key quality control point or regular expressions method is adopted to extract session identification in the list of the URL of HTTP request, HTTP request head and/or POST request.Understandably, the corresponding relation of session identification and server is prestored in a database.After extraction session identification, judge currently whether there is the server corresponding with session identification according to the session identification extracted; If there is the server corresponding with session identification, then HTTP request is sent to the server corresponding with session identification, its HTTP request in a conversation procedure, can be dispatched in the server of accessing in first HTTP request by client, keep object to realize session.
Particularly, the first processing unit 30 also for performing following steps, to extract session identification:
Preset the keyword of session identification, side-play amount and default session identification form.
First adopt key quality control point to extract session identification according to keyword and side-play amount, and judge whether successfully to extract session identification.Understandably, if when session identification adopts a certain keyword and has fixing side-play amount, calculate side-play amount, can check and accept the position of session identification fast, and extract this session identification by search key, the efficiency that key quality control point extracts session identification is higher.
If extract unsuccessfully, then regular expressions method is adopted to extract session identification according to default session identification form, otherwise the extraction of end session mark, be considered as not being embedded with session identification in the list of the URL of HTTP request, HTTP request head and/or POST request.Understandably, as long as session identification adopts preset session identification form shfft now, adopt regular expressions method all can extract this session identification, it extracts more comprehensively.
Understandably, extracted by key quality control point and regular expressions method and combine to extract session identification, session identification is extracted according to key quality control point, then without the need to adopting regular expressions method to conversate marker extraction again, effectively can improve the extraction efficiency of session identification and ensureing to extract more comprehensively.
Second processing unit 40, during for not all being embedded with session identification or not corresponding with session identification server in the list of the URL of HTTP request, HTTP request head and/or POST request, according to load balance scheduling algorithm, HTTP request is sent to server.Understandably, this HTTP request comprises POST request and/or GET request.
Particularly, judging unit 20 is also for judging whether HTTP reply header or HTTP response content are embedded with the session identification for identifying session.
First processing unit 30 is also for when HTTP reply header or HTTP response content are embedded with session identification, key quality control point or regular expressions method is adopted to extract session identification, the corresponding relation of session identification and server is stored in a database, and HTTP response is transmitted to client.Understandably, the HTTP response of load-balancing device resolution server feedback, extract from the html codes such as HTTP reply header or HTTP response content and embed session identification and the corresponding relation of session identification and server is stored in a database, when making load-balancing device again receive the HTTP request of client transmission, extract the session identification in the list of the URL of HTTP request, HTTP request head or POST request, HTTP request is sent in the server corresponding with session identification, keep and cookie without the need to depending on browser to realize session.
HTTP response, also for when HTTP reply header or HTTP response content are not embedded with session identification, is transmitted to client by the second processing unit 40.Understandably, if be not embedded with session identification in HTTP reply header or HTTP response content, directly HTTP response is transmitted to client, when again receiving the HTTP request of this client transmission, directly HTTP request cannot be sent to corresponding server, session can not be realized and keep.
Load-balancing device employing key quality control point provided by the present invention or regular expressions method extract the session identification in the URL and/or HTTP request head being embedded in HTTP request, to improve the handling property of load-balancing device, adopt without the need to requiring client and support that the browser of cookie can realize session and keep.
The present invention also provides a kind of session keeping system based on load-balancing device, comprises aforesaid load-balancing device, communicate with described load-balancing device the client and server be connected.
The present invention is described by several specific embodiment, it will be appreciated by those skilled in the art that, without departing from the present invention, can also carry out various conversion and be equal to substituting to the present invention.In addition, for particular condition or concrete condition, various amendment can be made to the present invention, and not depart from the scope of the present invention.Therefore, the present invention is not limited to disclosed specific embodiment, and should comprise the whole execution modes fallen within the scope of the claims in the present invention.
Claims (9)
1. based on a session keeping method for load-balancing device, it is characterized in that, comprise the following steps:
Receive the HTTP request from client;
Judge the session identification whether be embedded with in the URL of described HTTP request and/or HTTP request head for identifying session;
If be embedded with session identification, then key quality control point or regular expressions method is adopted to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
If be not embedded with session identification or not corresponding with described session identification server, then according to load balance scheduling algorithm, described HTTP request is sent to server;
The HTTP receiving described server feedback replys and transfers to described client.
2. the session keeping method based on load-balancing device according to claim 1, is characterized in that, also comprises and judges that described HTTP request is POST request or GET request;
If POST asks, then judge the session identification whether be embedded with in the list that described POST asks for identifying session; If be embedded with session identification, then key quality control point or regular expressions method is adopted to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
If the list of GET request, POST request is not embedded with session identification or not corresponding with described session identification server, then described HTTP request is sent to the server determined according to load balance scheduling algorithm.
3. the session keeping method based on load-balancing device according to claim 1, is characterized in that, the HTTP of the described server feedback of described reception replys and transfers to described client and comprises the steps:
Receive described HTTP to reply;
Judge whether described HTTP reply header or HTTP response content are embedded with the session identification for identifying session;
If be embedded with session identification, then adopt key quality control point or regular expressions method to extract described session identification, the corresponding relation of described session identification and server is stored in a database, and described HTTP response is transmitted to client;
If be not embedded with session identification, then described HTTP response is transmitted to client.
4. the session keeping method based on load-balancing device according to any one of claim 1-3, is characterized in that, described employing key quality control point or regular expressions method are extracted session identification and comprised the steps:
Preset the keyword of session identification, side-play amount and default session identification form;
Adopt key quality control point to extract session identification according to described keyword and side-play amount, and judge whether successfully to extract described session identification;
If extract unsuccessfully, then regular expressions method is adopted to extract described session identification according to described default session identification form, otherwise the extraction of end session mark.
5. a load-balancing device, is characterized in that, comprising:
Information transmit-receive unit (10), for receiving the HTTP request from client, and transfers to described client by the HTTP of the server feedback received response;
Judging unit (20), for judging the session identification whether be embedded with in the URL of described HTTP request and/or HTTP request head for identifying session;
First processing unit (30), for when being embedded with session identification, then adopts key quality control point or regular expressions method to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
Second processing unit (40), during for not being embedded with session identification or not corresponding with described session identification server in described HTTP request, is then sent to server according to load balance scheduling algorithm by described HTTP request.
6. load-balancing device according to claim 5, is characterized in that,
Described judging unit (20), also for judging that described HTTP request is POST request or GET request, and when described HTTP request is POST request, judges the session identification whether be embedded with in the list that described POST asks for identifying session;
Described first processing unit (30), is also embedded with session identification in the list of asking at POST, then adopt key quality control point or regular expressions method to extract described session identification; And judge currently whether there is the server corresponding with described session identification; If there is the server corresponding with described session identification, then described HTTP request is sent to the server corresponding with described session identification;
Described second processing unit (40), also in described HTTP request be GET request, POST request list be not embedded with session identification or not corresponding with described session identification server time, then described HTTP request is sent to the server determined according to load balance scheduling algorithm.
7. load-balancing device according to claim 6, is characterized in that,
Described judging unit (20) is also for judging whether the HTTP reply header that described HTTP replys or HTTP response content are embedded with the session identification for identifying session;
Described first processing unit (30) is also for when HTTP reply header or HTTP response content are embedded with session identification, key quality control point or regular expressions method is adopted to extract described session identification, the corresponding relation of described session identification and server is stored in a database, and described HTTP response is transmitted to client;
Described HTTP response, also for when HTTP reply header or HTTP response content are not embedded with session identification, is transmitted to client by described second processing unit (40).
8. according to any one of claim 5-7 based on load-balancing device, it is characterized in that, described first processing unit (30) is also for performing following steps:
Preset the keyword of session identification, side-play amount and default session identification form;
Adopt key quality control point to extract session identification according to described keyword and side-play amount, and judge whether successfully to extract described session identification;
If extract unsuccessfully, then regular expressions method is adopted to extract described session identification according to described default session identification form, otherwise the extraction of end session mark.
9. based on a session keeping system for load-balancing device, it is characterized in that: comprise the load-balancing device described in any one of claim 5-8, communicate with described load-balancing device the client and server be connected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510173425.7A CN104811488B (en) | 2015-04-13 | 2015-04-13 | Session keeping method and system based on load-balancing device and load-balancing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510173425.7A CN104811488B (en) | 2015-04-13 | 2015-04-13 | Session keeping method and system based on load-balancing device and load-balancing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104811488A true CN104811488A (en) | 2015-07-29 |
CN104811488B CN104811488B (en) | 2018-09-25 |
Family
ID=53695976
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510173425.7A Active CN104811488B (en) | 2015-04-13 | 2015-04-13 | Session keeping method and system based on load-balancing device and load-balancing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104811488B (en) |
Cited By (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105338063A (en) * | 2015-09-30 | 2016-02-17 | 北京奇虎科技有限公司 | Multi-server user session sharing method and device |
CN105553870A (en) * | 2015-12-11 | 2016-05-04 | 小米科技有限责任公司 | Method and device for allocating service request |
CN106101290A (en) * | 2016-08-25 | 2016-11-09 | Tcl集团股份有限公司 | A kind of method and system of server cluster management |
CN106686129A (en) * | 2017-01-23 | 2017-05-17 | 天地融科技股份有限公司 | Load balancing method and load balancing system |
CN106713499A (en) * | 2017-01-23 | 2017-05-24 | 天地融科技股份有限公司 | Load balancing method, equipment and system |
CN108055312A (en) * | 2017-12-07 | 2018-05-18 | 畅捷通信息技术股份有限公司 | Method for routing and its device and computer installation and its readable storage medium storing program for executing |
CN108076149A (en) * | 2017-12-15 | 2018-05-25 | 杭州迪普科技股份有限公司 | Session keeping method and device |
CN108153761A (en) * | 2016-12-05 | 2018-06-12 | 阿里巴巴集团控股有限公司 | Access the method, apparatus of network picture and response to network picture access |
CN108696554A (en) * | 2017-04-10 | 2018-10-23 | 北京京东尚科信息技术有限公司 | Load-balancing method and device |
CN109155749A (en) * | 2016-06-21 | 2019-01-04 | 甲骨文国际公司 | The natural language interaction formula message transfer service session device of internet cloud trustship |
CN109246222A (en) * | 2018-09-21 | 2019-01-18 | 郑州云海信息技术有限公司 | service request processing method, device, system and computer readable storage medium |
CN109474705A (en) * | 2018-12-28 | 2019-03-15 | 杭州迪普科技股份有限公司 | A kind of session keeping method and device |
CN109688229A (en) * | 2019-01-24 | 2019-04-26 | 江苏中云科技有限公司 | Session keeps system under a kind of load balancing cluster |
CN110233902A (en) * | 2019-06-28 | 2019-09-13 | 杭州迪普科技股份有限公司 | Conversation processing method, device, electronic equipment and machine readable storage medium |
CN110417876A (en) * | 2019-07-17 | 2019-11-05 | 中移(杭州)信息技术有限公司 | Node server and main control device in session method, distributed system |
WO2019237594A1 (en) * | 2018-06-14 | 2019-12-19 | 平安科技(深圳)有限公司 | Session persistence method and apparatus, and computer device and storage medium |
CN111045823A (en) * | 2019-12-11 | 2020-04-21 | 上海智臻智能网络科技股份有限公司 | Context data load distribution method, device, equipment and storage medium |
CN111917767A (en) * | 2020-07-29 | 2020-11-10 | 苏州浪潮智能科技有限公司 | Client request authentication method, device, equipment and storage medium |
CN112202836A (en) * | 2020-09-04 | 2021-01-08 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for maintaining client session information |
CN112241418A (en) * | 2019-07-17 | 2021-01-19 | 中兴通讯股份有限公司 | Distributed database preprocessing method, agent layer, system and storage medium |
CN113259429A (en) * | 2021-05-11 | 2021-08-13 | 鸬鹚科技(深圳)有限公司 | Session keeping control method, device, computer equipment and medium |
US11240179B2 (en) | 2016-09-16 | 2022-02-01 | Oracle International Corporation | Internet cloud-hosted natural language interactive messaging system with virtual database |
CN114051049A (en) * | 2021-02-10 | 2022-02-15 | 中国信息通信研究院 | Proxy forwarding method of identifier, server and computer readable storage medium |
CN114338689A (en) * | 2021-12-30 | 2022-04-12 | 中国工商银行股份有限公司 | Session holding method, apparatus, device, medium, and program product |
CN114827239A (en) * | 2022-05-31 | 2022-07-29 | 杭州迪普科技股份有限公司 | Bidirectional session holding method and device based on 8583 protocol |
CN114866442A (en) * | 2022-05-31 | 2022-08-05 | 杭州迪普科技股份有限公司 | 8583 protocol-based cross-virtual service session holding test method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101783771A (en) * | 2010-03-24 | 2010-07-21 | 杭州华三通信技术有限公司 | Method and equipment for realizing load balance continuity |
US20120233248A1 (en) * | 2009-11-24 | 2012-09-13 | Huawei Technologies Co., Ltd. | Method and system for processing request message, and load balancer device |
CN102780619A (en) * | 2012-07-23 | 2012-11-14 | 北京星网锐捷网络技术有限公司 | Method and device for processing message |
CN102819710A (en) * | 2012-08-22 | 2012-12-12 | 西北工业大学 | Cross-site script vulnerability detection method based on percolation test |
CN103457869A (en) * | 2013-08-28 | 2013-12-18 | 北京星网锐捷网络技术有限公司 | Conversation maintaining method and device |
CN103685329A (en) * | 2012-08-30 | 2014-03-26 | 华耀(中国)科技有限公司 | System and method for advanced access control based on load balance |
CN103957207A (en) * | 2014-04-29 | 2014-07-30 | 北京太一星晨信息技术有限公司 | Conversation keeping method and device |
-
2015
- 2015-04-13 CN CN201510173425.7A patent/CN104811488B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120233248A1 (en) * | 2009-11-24 | 2012-09-13 | Huawei Technologies Co., Ltd. | Method and system for processing request message, and load balancer device |
CN101783771A (en) * | 2010-03-24 | 2010-07-21 | 杭州华三通信技术有限公司 | Method and equipment for realizing load balance continuity |
CN102780619A (en) * | 2012-07-23 | 2012-11-14 | 北京星网锐捷网络技术有限公司 | Method and device for processing message |
CN102819710A (en) * | 2012-08-22 | 2012-12-12 | 西北工业大学 | Cross-site script vulnerability detection method based on percolation test |
CN103685329A (en) * | 2012-08-30 | 2014-03-26 | 华耀(中国)科技有限公司 | System and method for advanced access control based on load balance |
CN103457869A (en) * | 2013-08-28 | 2013-12-18 | 北京星网锐捷网络技术有限公司 | Conversation maintaining method and device |
CN103957207A (en) * | 2014-04-29 | 2014-07-30 | 北京太一星晨信息技术有限公司 | Conversation keeping method and device |
Cited By (38)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105338063A (en) * | 2015-09-30 | 2016-02-17 | 北京奇虎科技有限公司 | Multi-server user session sharing method and device |
CN105553870B (en) * | 2015-12-11 | 2020-03-17 | 小米科技有限责任公司 | Service request distribution method and device |
CN105553870A (en) * | 2015-12-11 | 2016-05-04 | 小米科技有限责任公司 | Method and device for allocating service request |
CN109155749B (en) * | 2016-06-21 | 2021-11-19 | 甲骨文国际公司 | Method and system for associating messages with a conversation |
CN109155749A (en) * | 2016-06-21 | 2019-01-04 | 甲骨文国际公司 | The natural language interaction formula message transfer service session device of internet cloud trustship |
CN106101290B (en) * | 2016-08-25 | 2020-12-11 | Tcl科技集团股份有限公司 | Server cluster management method and system |
CN106101290A (en) * | 2016-08-25 | 2016-11-09 | Tcl集团股份有限公司 | A kind of method and system of server cluster management |
US11240179B2 (en) | 2016-09-16 | 2022-02-01 | Oracle International Corporation | Internet cloud-hosted natural language interactive messaging system with virtual database |
CN108153761A (en) * | 2016-12-05 | 2018-06-12 | 阿里巴巴集团控股有限公司 | Access the method, apparatus of network picture and response to network picture access |
CN106686129A (en) * | 2017-01-23 | 2017-05-17 | 天地融科技股份有限公司 | Load balancing method and load balancing system |
CN106713499A (en) * | 2017-01-23 | 2017-05-24 | 天地融科技股份有限公司 | Load balancing method, equipment and system |
CN108696554A (en) * | 2017-04-10 | 2018-10-23 | 北京京东尚科信息技术有限公司 | Load-balancing method and device |
CN108055312A (en) * | 2017-12-07 | 2018-05-18 | 畅捷通信息技术股份有限公司 | Method for routing and its device and computer installation and its readable storage medium storing program for executing |
CN108055312B (en) * | 2017-12-07 | 2021-07-09 | 畅捷通信息技术股份有限公司 | Routing method and device thereof, computer device and readable storage medium thereof |
CN108076149A (en) * | 2017-12-15 | 2018-05-25 | 杭州迪普科技股份有限公司 | Session keeping method and device |
WO2019237594A1 (en) * | 2018-06-14 | 2019-12-19 | 平安科技(深圳)有限公司 | Session persistence method and apparatus, and computer device and storage medium |
CN109246222A (en) * | 2018-09-21 | 2019-01-18 | 郑州云海信息技术有限公司 | service request processing method, device, system and computer readable storage medium |
CN109474705A (en) * | 2018-12-28 | 2019-03-15 | 杭州迪普科技股份有限公司 | A kind of session keeping method and device |
CN109474705B (en) * | 2018-12-28 | 2021-04-27 | 杭州迪普科技股份有限公司 | Session maintaining method and device |
CN109688229A (en) * | 2019-01-24 | 2019-04-26 | 江苏中云科技有限公司 | Session keeps system under a kind of load balancing cluster |
CN110233902B (en) * | 2019-06-28 | 2022-03-01 | 杭州迪普科技股份有限公司 | Session processing method and device, electronic equipment and machine-readable storage medium |
CN110233902A (en) * | 2019-06-28 | 2019-09-13 | 杭州迪普科技股份有限公司 | Conversation processing method, device, electronic equipment and machine readable storage medium |
WO2021008475A1 (en) * | 2019-07-17 | 2021-01-21 | 中兴通讯股份有限公司 | Distributed database preprocessing method, agent layer, system and storage medium |
US11847116B2 (en) | 2019-07-17 | 2023-12-19 | Xi'an Zhongxing New Software Co., Ltd. | Distributed database preprocessing method, agent layer, system and storage medium |
CN110417876B (en) * | 2019-07-17 | 2021-10-29 | 中移(杭州)信息技术有限公司 | Session method, node server in distributed system and master control equipment |
CN112241418A (en) * | 2019-07-17 | 2021-01-19 | 中兴通讯股份有限公司 | Distributed database preprocessing method, agent layer, system and storage medium |
CN110417876A (en) * | 2019-07-17 | 2019-11-05 | 中移(杭州)信息技术有限公司 | Node server and main control device in session method, distributed system |
CN111045823A (en) * | 2019-12-11 | 2020-04-21 | 上海智臻智能网络科技股份有限公司 | Context data load distribution method, device, equipment and storage medium |
CN111917767B (en) * | 2020-07-29 | 2022-06-07 | 苏州浪潮智能科技有限公司 | Client request authentication method, device, equipment and storage medium |
CN111917767A (en) * | 2020-07-29 | 2020-11-10 | 苏州浪潮智能科技有限公司 | Client request authentication method, device, equipment and storage medium |
CN112202836A (en) * | 2020-09-04 | 2021-01-08 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for maintaining client session information |
CN114051049A (en) * | 2021-02-10 | 2022-02-15 | 中国信息通信研究院 | Proxy forwarding method of identifier, server and computer readable storage medium |
CN113259429A (en) * | 2021-05-11 | 2021-08-13 | 鸬鹚科技(深圳)有限公司 | Session keeping control method, device, computer equipment and medium |
CN113259429B (en) * | 2021-05-11 | 2023-12-05 | 鸬鹚科技(深圳)有限公司 | Session maintenance management and control method, device, computer equipment and medium |
CN114338689A (en) * | 2021-12-30 | 2022-04-12 | 中国工商银行股份有限公司 | Session holding method, apparatus, device, medium, and program product |
CN114827239A (en) * | 2022-05-31 | 2022-07-29 | 杭州迪普科技股份有限公司 | Bidirectional session holding method and device based on 8583 protocol |
CN114866442A (en) * | 2022-05-31 | 2022-08-05 | 杭州迪普科技股份有限公司 | 8583 protocol-based cross-virtual service session holding test method and device |
CN114866442B (en) * | 2022-05-31 | 2023-05-26 | 杭州迪普科技股份有限公司 | 8583 protocol-based cross-virtual service session maintenance test method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104811488B (en) | 2018-09-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104811488A (en) | Load balancing equipment-based session keeping method and system and load balancing equipment | |
US10778554B2 (en) | Latency measurement in resource requests | |
US11108729B2 (en) | Managing request routing information utilizing client identifiers | |
US9912740B2 (en) | Latency measurement in resource requests | |
US9185012B2 (en) | Latency measurement in resource requests | |
US9253065B2 (en) | Latency measurement in resource requests | |
US9888089B2 (en) | Client side cache management | |
US9172674B1 (en) | Managing request routing information utilizing performance information | |
US9106701B2 (en) | Request routing management based on network components | |
CN104079543B (en) | The acquisition methods of intelligent domestic system supervision authority, device and system | |
US8301748B2 (en) | Managing CDN registration by a storage provider | |
CN1170236C (en) | Method for controlling communication between customer computer and server group and network server apparatus | |
US10958501B1 (en) | Request routing information based on client IP groupings | |
US7975047B2 (en) | Reliable processing of HTTP requests | |
CN103347092A (en) | Method and device for recognizing cacheable file | |
CN104618449A (en) | Web singe-point login implementing method and device | |
US9729652B2 (en) | Dynamically affinitizing users to a version of a website | |
CN103237089A (en) | Method and device for repairing domain name system (DNS) polling mode-based webpages and server | |
EP3217630A1 (en) | Method and associated server for providing user-friendly operation | |
EP2890086B1 (en) | Method and farm load balancing device for establishing a bi-directional server to server communication and computer program thereof | |
US10530765B2 (en) | Securing connections to unsecure internet resources | |
US7406496B2 (en) | System and method for processing callback requests, which include a client port and address, included in web-based procedure calls | |
US20020129149A1 (en) | Method and system for automatically directing a web user to a selected web server | |
CN106059989B (en) | Server and method for switching execution identity | |
US20030163586A1 (en) | Server persistence using a URL identifier |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20200612 Address after: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park building A1 layer Patentee after: SANGFOR TECHNOLOGIES Inc. Address before: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A1 building five floor Patentee before: Shenxin network technology (Shenzhen) Co.,Ltd. |