CN1538705A - Process method of transfer working load of seventh layer load equilizer to server terminal - Google Patents

Process method of transfer working load of seventh layer load equilizer to server terminal Download PDF

Info

Publication number
CN1538705A
CN1538705A CNA031231934A CN03123193A CN1538705A CN 1538705 A CN1538705 A CN 1538705A CN A031231934 A CNA031231934 A CN A031231934A CN 03123193 A CN03123193 A CN 03123193A CN 1538705 A CN1538705 A CN 1538705A
Authority
CN
China
Prior art keywords
server
layer
packet filter
load balancer
terminating machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA031231934A
Other languages
Chinese (zh)
Other versions
CN100581157C (en
Inventor
蔡品再
林盈达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Accton Technology Corp
Original Assignee
Accton Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Accton Technology Corp filed Critical Accton Technology Corp
Priority to CN03123193A priority Critical patent/CN100581157C/en
Publication of CN1538705A publication Critical patent/CN1538705A/en
Application granted granted Critical
Publication of CN100581157C publication Critical patent/CN100581157C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

When receiving a synchronization packet from terminal, 7th load equalizer transfers it to server selected in advance in order to build a state in transmission control protocol between the server and the terminal. Thus, returned data from the server will not need switching route of 7th load equalizer. When receiving a reset packet, packet filter holds it for a prespecified time. When receiving a Cookie containing a Session data, the packet filter rewrites name of the Cookie. The invention solves bottleneck of 7th load equalizer to support online function sostenuto.

Description

The live load of layer 7 load balancer is transferred to the method that server is brought in processing
Technical field
The present invention relates to a kind of live load and be transferred to the method that server is brought in processing, relate in particular to a kind of server of choosing in advance and the live load of layer 7 load balancer is transferred to the method that this server is brought in processing to set up a transmission control protocol state with the layer 7 load balancer.
Background technology
Along with number of netizens constantly increases severely, and wideband network is universal, the ultimate challenge that many large-scale ICPs (ICP) are faced is exactly the online requirement (Connection Request) that comes from user's enormous quantity, single server can't satisfy huge like this demand already, so one of them good solution that this problem of answering derives out is server zone technology (Server FarmTechnology), this technology has developed many years, use the 4th layer of load balancer (Layer4 Load Balancer) to carry out choosing in the past for the optimal path of online requirement, yet the 4th layer of load balancer has 10 fens serious defectives, it is its ability that does not have the content that detects the online requirement that comes from the user, promptly the 4th layer of load balancer can't carry out the path exchange according to the content of online requirement, and such characteristic might cause the wrong generation of path exchange in the E-business service in modern times is used.
Therefore for addressing the above problem, there are many layer 7 load balancers (Layer 7Load Balancer) that utilize to carry out the path exchange in the prior art.(a webpage interchanger for example, most important characteristic WebSwitch) are that it possesses content that can detect the online requirement that comes from the user and the function of carrying out the path exchange according to this content are arranged to the layer 7 load balancer.Yet in the employed various layer 7 load balancer technology of prior art, still have many different shortcomings: one is the data processing upper limit of webpage interchanger, because when the terminating machine (Terminal) of a client will be sent online a requirement, it must set up a transmission control protocol state (Transmission Control Protocol State by three-way handshake mode (Three-Way Handshaking) to this terminating machine by this webpage interchanger, TCP State) and this webpage interchanger want a server of access also must set up another transmission control protocol state to this terminating machine, could should online requirement deliver to this server, and this server also must could be back to data this terminating machine by this mode, therefore undertaken when online by a webpage interchanger as many online requirements, this webpage interchanger then must be kept the transmission control protocol state of corresponding quantity to satisfy the demand of all terminating machines, yet the transmission control protocol number of states that the webpage interchanger can be kept has a upper limit, if therefore very a large amount of online requirements is arranged, then the disposal ability of webpage interchanger just is easy to become bottleneck, for addressing this problem, prior art is used the method for transmission control protocol handover (TCP Handoff) usually, transmission control protocol state transitions to back-end server is handled, to alleviate the live load of this webpage interchanger, but because transmission control protocol handover technology must utilize the special communications protocol could be with the transmission control protocol state transitions to back-end server, therefore being bound to need be with operating system kernel (the Operating System Kernel of server, OS Kernel) carries out corresponding modification, this will expend the very large maintenance cost of server system, be not the technology of a practicality therefore.
Another shortcoming of employed various layer 7 load balancer technology is in the prior art, it is difficult for supporting to continue the function of online (Keep-Alive Connection), so-called continue that online i.e. this terminating machine utilizes that identical transmission control protocol state constituted online transmitted three-way handshake is carried out in a plurality of requirements with minimizing to this server live load, yet for a layer 7 load balancer that carries out the path exchange according to the content of online requirement, this is difficult to accomplish very much, because these a plurality of requirements in online might have to be assigned to different servers.For instance, as the above-mentioned webpage interchanger that utilizes transmission control protocol handover technology, sending one when the terminating machine of a client requires to this webpage interchanger, this webpage interchanger is sent to one first server with this requirement, then this first server can possess this online transmission control protocol state is arranged at this moment, but, the content of second requirement that this terminating machine is sent wants access one second server if showing this terminating machine, this webpage interchanger can't directly be sent to this second server to this second requirement this moment, because this second server does not have this online transmission control protocol state.If this webpage interchanger will utilize this transmission control protocol state that this second requirement is sent to this second server, then this webpage interchanger necessarily require this first server with this transmission control protocol state transitions to this second server, this technology promptly is called multiple handover technology (Multiple Handoff), yet multiple handover technology is very difficult to realize in practical operation, so how product does not on the market use lasting online function in the transmission control protocol at present.
At last, also there is another problem in existing employed various layer 7 load balancer technology, that is exactly the function of back-level server end instruction dialogue (Session) machine-processed consistency (Server Side Language ' s SessionPersistence), the description instruction (Script) of server end can be used in many now websites, PHP for example, ASP and JSP etc., set up as dynamic content, the application of database questionnaire or shopping cart etc., these Script provide a Session of application layer to come stored user information and program parameter in this server in can be between a given period, prior art uses the method for additional Cookie to realize this Session mechanism usually, when this server opens beginning one Session, its can be in the data of sending the special Cookie of affix one, referred to herein as Session Cookie, this Session Cookie includes a title and an identifier, wherein each identifier corresponds to a Session unique in this server, for instance, the Session Cookie of one PHP can be " PHPSESSID=IUHBCXDEDSDFHJMLJHGBVCRXNBNJBGGCRDL ", wherein be positioned at this title that is of equal sign front, what be positioned at the equal sign back then is this identifier, and all can this SessionCookie of affix in next by the requirement that this user sent, this server this Session that can utilize this identifier to differentiate to correspond to this user then.Yet carry out in the layer 7 load balancer technology of path exchange a content according to online requirement, this Session needs to use the online data with this website of access of a plurality of different transmission control protocols (promptly a plurality of different servers being carried out access) often, but because different servers is all identical at the Session Cookie that each Session added, this will cause the layer 7 load balancer can't utilize the information among the Session Cookie to carry out the path exchange, perhaps causes the server access errors.Have in the prior art and utilize as pre-defined method (Pre-Definition) or automatic Cookie insertion methods such as (AutomaticCookie Insertion), but these methods but there are the palpus rewriting operation system core or palpus to change the shortcoming of package length.
In summary, the various layer 7 load balancer technology of described prior art on reality is used, obviously exist inconvenience and defective, so be necessary to be improved.
Summary of the invention
At above-mentioned defective, main purpose of the present invention is to provide a kind of server of choosing in advance, live load to set up a transmission control protocol state with the layer 7 load balancer is transferred to the method that this server is brought in processing, use is transferred to the direct route technology of server-side processes with the live load of layer 7 load balancer, becomes the problem of bottleneck with the disposal ability that solves layer 7 load balancer in the above-mentioned prior art.
Another main purpose of the present invention is, the replacement package that utilizes a Packet Filter of server end will come from a layer 7 load balancer keeps one period scheduled time, to solve the problem that above-mentioned existing layer 7 load balancer technology is difficult for supporting to continue online function.
Another main purpose of the present invention is, utilize rewriting method that cookie name claims can't be in the content according to online requirement to solve above-mentioned existing layer 7 load balancer technology, reaches the problem of supporting Session consistency function simultaneously when carrying out the path exchange to a plurality of servers.
To achieve these goals, the invention provides a kind of live load and be transferred to the method that server is brought in processing the layer 7 load balancer, it is applied to a network system, and this network system includes a terminating machine, and it can export a synchronous package before will sending an online requirement; One layer 7 load balancer is electrically connected on this terminating machine, is used for carrying out the path exchange according to the content of this online requirement; And at least one server, be electrically connected on this layer 7 load balancer, this server includes a real server, is used for handling and storage data, and a Packet Filter, be used for handling the online requirement that is sent to this server and handle the data that send out from this server; This method includes following steps: utilize this terminating machine to send one first synchronous package to this layer 7 load balancer; After this layer 7 load balancer receives this first synchronous package, transmit the Packet Filter of this first synchronous package to first server of choosing in advance.
The present invention at a layer 7 load balancer when a terminating machine receives a synchronous package, directly send this synchronous package to a server of choosing in advance, and undertaken online by this server and this terminating machine, live load with this layer 7 load balancer is transferred to this server whereby, and in each server, include a Packet Filter, be used for keeping the replacement package that comes from this layer 7 load balancer, must carry out three-way handshake again to set up the live load of transmission control protocol state with minimizing because of online interruption, this Packet Filter also can be used to rewrite the title of sending out and being sent to the Cookie that is added this data in server from this server, so that can reach the function of supporting the Session consistency simultaneously when carrying out the exchange of the path of a plurality of servers according to the content of online requirement.
To achieve these goals, the invention provides a kind of live load and be transferred to the method that server is brought in processing the layer 7 load balancer, it is applied to a network system, this network system comprises: a terminating machine, one layer 7 load balancer, and at least one server, this server comprises a real server, and a Packet Filter, this method comprises following steps at least:
The real server of one server is carried out three-way handshake by Packet Filter and this terminating machine of this server, sets up the transmission control protocol state between itself and this terminating machine;
This terminating machine is sent an online requirement to this layer 7 load balancer;
This layer 7 load balancer detects the content of this online requirement;
Transmit this online requirement to this server; And
This terminating machine carries out data access by this transmission control protocol state to the real server of this server.
The present invention also provides a kind of live load with the layer 7 load balancer to be transferred to the method that server is brought in processing, it is applied to a network system, this network system comprises: a terminating machine, one layer 7 load balancer, and at least one server, this server comprises a real server, and a Packet Filter, and this method comprises following steps at least:
The real server of one first server is carried out three-way handshake by Packet Filter and this terminating machine of this first server, sets up one first transmission control protocol state between itself and this terminating machine;
This terminating machine is sent one first online requirement to this layer 7 load balancer;
This layer 7 load balancer detects the content of this first online requirement;
This layer 7 load balancer is sent to the Packet Filter of a second server with this first online requirement, transmits the Packet Filter of a replacement package to this first server simultaneously;
The real server of this second server is carried out three-way handshake by Packet Filter and this terminating machine of this second server, sets up one second transmission control protocol state between itself and this terminating machine;
The Packet Filter of this second server is sent to this first online requirement the real server of this second server; And
This terminating machine carries out data access by this second transmission control protocol state to the real server of this second server.
Brief Description Of Drawings
Below in conjunction with accompanying drawing,, will make technical scheme of the present invention and other beneficial effects apparent by detailed description to preferred embodiment of the present invention.
In the accompanying drawing,
Fig. 1 is the systematic schematic diagram of a network system in the method for the present invention;
Fig. 2 is for choosing a server in the method for the present invention in advance to set up the online and preliminary election flow chart when correct;
Fig. 3 is for choosing the flow chart of a server when setting up online but preliminary election mistake in the method for the present invention in advance;
Fig. 4 has set up one online but the flow chart of another server of access is wanted in an online requirement for a server in the method for the present invention;
Fig. 5 wants access for another online requirement among Fig. 4 and had originally set up the flow chart of online this server;
Fig. 6 is for rewriting the schematic diagram that cookie name claims in the method for the present invention;
Fig. 7 is the flow chart that adds Cookie in the method for the present invention in data and requirement;
Fig. 8 has a plurality of Cookie to carry out the flow chart of path exchange for data in the method for the present invention are additional.
Embodiment
Hereinafter, will describe the present invention in detail.
See also Fig. 1, Fig. 1 shows that the live load with the layer 7 load balancer of the present invention is transferred to server and brings in a network system 10 in the method for processing, network system 10 includes a terminating machine 12, one layer 7 load balancer 14, and at least one server 16, server 16 then includes a Packet Filter 18 and a real server 20.Wherein terminating machine 12 is the user interface of a client, the various packages that can send online requirement and correspond to this online requirement according to user's demand, and receive and come from data in server and package; 14 of layer 7 load balancers can detect the content of the online requirement that comes from the user and carry out the path exchange according to this content as previously mentioned; And the Packet Filter 18 of server 16 can be brought into play its function with form (a for example fire compartment wall) existence of the software program in the server 16 usually; all are sent to server 16 and will must be introduced into Packet Filter 18 by the data that real server 20 is handled, and all will also must enter Packet Filter 18 by real server 20 earlier from the data that server 16 sends out.Yet, realize that with the form of software program Packet Filter 18 only is preferred embodiment of the present invention, other can arrive identical purpose and the application of spirit according to the invention also belongs to covering scope of the present invention.Next will describe each step of method of the present invention in detail.
See also Fig. 2, Fig. 2 shows in the method for the present invention when layer 7 load balancer 14 receives the one first synchronous package (SYN Packet) that comes from a terminating machine 12, layer 7 load balancer 14 is chosen a server in advance to set up the online and preliminary election flow chart when correct, the server that this is chosen in advance is made as one first server 16a herein, and this method comprises the following step:
Step 21: after layer 7 load balancer 14 receives this first synchronous package that comes from terminating machine 12, directly this first synchronous package is sent to the Packet Filter 18a of this first server 16a that chooses in advance;
Step 22: Packet Filter 18a can be sent to this first synchronous package the real server 20a of the first server 16a under the situation that does not change sequence number (Sequence Number) (this sequence number is CSEQ as shown in Figure 2);
Step 23: real server 20a is after receiving this first synchronous package, can send one first confirmation of synchronization package (SYN-ACK Packet) to Packet Filter 18a, this moment, Packet Filter 18a can set up sequence number that a data structure is used for storing this first confirmation of synchronization package (as shown in Figure 2, this sequence number is RSEQ), to carry out the sequence number conversion in following step, and this first confirmation of synchronization package after the sequence number conversion (as shown in Figure 2, this moment, this sequence number was WSEQ) directly is sent to terminating machine 12;
Step 24: terminating machine 12 is after receiving this first confirmation of synchronization package, can send one first and confirm package (ACK Packet), and layer 7 load balancer 14 can directly be sent to Packet Filter 18a with this first affirmation package to layer 7 load balancer 14;
Step 25: Packet Filter 18a can utilize this data structure to change the sequence number (as shown in Figure 2) of this first affirmation package, again this first affirmation package is sent to real server 20a, so promptly finished three-way handshake, and real server 20a can set up one first transmission control protocol state between terminating machine 12 and the real server 20a;
Step 26: after this first transmission control protocol state is set up, terminating machine 12 can be sent one first online the requirement to layer 7 load balancer 14, layer 7 load balancer 14 then can detect the content of this first online requirement, if its content shows this first online requirement and wants the access first server 16a that then layer 7 load balancer 14 can be sent to Packet Filter 18a with this first online requirement;
Step 27: Packet Filter 18a can will carry out the sequence number conversion to this first online requirement, and this first online requirement after the sequence number conversion is sent to real server 20a;
Step 28: real server 20a can be sent to Packet Filter 18a with the needed data of terminating machine according to the content of this first online requirement, and Packet Filter 18a then can directly be sent to terminating machine 12 with these data after the sequence number conversion under the situation of crossing (Bypass) layer 7 load balancer 14;
Step 29: terminating machine 12 all can be sent to the first server 16a by layer 7 load balancer 14 at the package of next being sent;
Step 30: Packet Filter 18a can be sent to real server 20a with this package after the sequence number conversion.
See also Fig. 3 now, Fig. 3 shows in the method for the present invention when layer 7 load balancer 14 receives the one first synchronous package that comes from a terminating machine 12, layer 7 load balancer 14 is chosen the flow chart of a server when setting up online but preliminary election mistake in advance, please note, Fig. 3 also includes the action of the step 21 of Fig. 2 to step 25, the part that repeats this no longer the gift presented to a senior at one's first visit as a mark of esteem state, this method also comprises the following step:
Step 31: after this first transmission control protocol state was set up, terminating machine 12 can be sent one first online the requirement to layer 7 load balancer 14, and layer 7 load balancer 14 then can detect the content of this first online requirement;
Step 32: want access one second server 16b if the content of this first online requirement shows this first online requirement, then layer 7 load balancer 14 can transmit the Packet Filter 18a of a replacement package (RST Packet) to this first server 16a;
Step 33: layer 7 load balancer 14 also can be sent to this first online requirement the Packet Filter 18b of second server 16b simultaneously;
Step 34: after Packet Filter 18b receives this first online requirement, can send the real server 20b of one second synchronous package, the sequence number identical (CSEQ) of the sequence number of this second synchronous package and this first synchronous package to second server 16b;
Step 35: real server 20b is after receiving this second synchronous package, can send one second confirmation of synchronization package to Packet Filter 18b, this moment, Packet Filter 18b can set up the sequence number (RSEQ) that a data structure is used for storing this second confirmation of synchronization package, to carry out the sequence number conversion in following step;
Step 36: simultaneously Packet Filter 18b can send one second and confirms package to real server 20b, has so promptly finished three-way handshake and real server 20b can set up one second transmission control protocol state between terminating machine 12 and the real server 20b;
Step 37: after this second transmission control protocol state was set up, Packet Filter 18b can be sent to real server 20b with this first online requirement after the sequence number conversion;
Step 38: real server 20b can be sent to Packet Filter 18b with terminating machine 12 needed data according to the content of this first online requirement, and Packet Filter 18b then can directly be sent to terminating machine 12 with these data after the sequence number conversion under the situation of crossing layer 7 load balancer 14;
Step 39: terminating machine 12 all can be sent to second server 16b by layer 7 load balancer 14 at the package of next being sent;
Step 40: Packet Filter 18b can be sent to real server 20b with this package after the sequence number conversion.
In summary, in the present embodiment after layer 7 load balancer 14 receives this first synchronous package, this first synchronous package directly can be sent to the one first server 16a that chooses in advance, and utilize information in the HTTP header (HTTP Header) of this first synchronous package to set up transmission control protocol state between terminating machine 12 and the real server 20a by the first server 16a, under this principle, originally all being transferred to the first server 16a that chooses in advance now by layer 7 load balancer 14 handled live loads handles, and layer 7 load balancer 14 only is responsible for detecting data content and transmit this data according to its content, and all can not pass through layer 7 load balancer 14 from package and data that the first server 16a is back to terminating machine 12, thereby reduced the live load of layer 7 load balancer 14 widely, make layer 7 load balancer 14 no longer become the bottleneck of data traffic.More than (Migrate) shifted in the path exchange work of layer 7 load balancer 14 handle and technology that the live load of layer 7 load balancer 14 is greatly reduced to the Packet Filter 18 of server 16, be called direct route (DirectRouting).
See also Fig. 4, show among Fig. 4 in the method for the present invention that a server set up one online but the flow chart of another server of access is wanted in an online requirement, this is set up online server herein and be made as above-mentioned second server 16b, should online requirement be made as one second online requirement, and want another server of access to be made as one the 3rd server 16c this second online requirement, then this method includes step 41 as shown in Figure 4 to step 50, since step 41 to the action of step 50 and above-mentioned step 31 to the action of step 40 very similar (as shown in Figures 3 and 4), so repeated description no longer.After this has been set up online server (herein for second server 16b) and has received this replacement package, Packet Filter 18b can will should keep (Stall) scheduled time (this scheduled time is 15 seconds in the present embodiment) by the replacement package earlier, if Packet Filter 18b does not receive any online requirement in this scheduled time, then Packet Filter 18b can will should be sent to real server 20b by the replacement package, and after real server 20b receives this replacement package, i.e. the online interruption that this can have been set up.See also Fig. 5 now, want access when another online requirement in the displayed map 4 among Fig. 5 and originally set up the flow chart of an online second server, step among the Fig. 5 of institute includes the action of the step 41 of Fig. 4 to step 50, the part of repetition this no longer the gift presented to a senior at one's first visit as a mark of esteem state, this method also includes the following step:
Step 51: when layer 7 load balancer 14 receives a three-line machine requirement, and find that after detecting its content this three-line machine requires to want access originally to set up online second server 16b;
Step 52: then layer 7 load balancer 14 can transmit a replacement package to the 3rd server 16c;
Step 53: layer 7 load balancer 14 can require to be sent to second server 16b with this three-line machine simultaneously;
Step 54: when Packet Filter 18b receives this three-line machine requirement, if real server 20b still keeps originally set up online, then Packet Filter 18b can utilize this online this three-line machine after the sequence number conversion to be required to be sent to real server 20b, as shown in Figure 5, otherwise, Packet Filter 18b can to carry out three-way handshake online to rebulid with real server 20b, as described in preceding step;
Step 55: real server 20b can be sent to Packet Filter 18b with the needed data of terminating machine according to the content that this three-line machine requires, and Packet Filter 18b then can directly be sent to terminating machine 12 with these data after the sequence number conversion under the situation of crossing layer 7 load balancer 14;
Step 56: terminating machine 12 all can be sent to second server 16b by layer 7 load balancer 14 at the package of next being sent;
Step 57: Packet Filter 18b can be sent to real server 20b with this package after the sequence number conversion.
The flow chart of complex chart 4 and Fig. 5 is as can be known described, after Packet Filter 18b receives this replacement package, it can should keep a scheduled time by the replacement package, after receiving a replacement package, understands server the online interruption that will set up immediately in the prior art and be different from, owing to can utilizing terminating machine 12 to send once more, user among this scheduled time want the probability of access second server 16b very big, so under this principle, must carry out three-way handshake again because of online interruption and will greatly reduce with the work load of setting up the transmission control protocol state.
See also Fig. 6, the schematic diagram that shows the preferred embodiment that the rewriting cookie name claims in the method for the present invention among Fig. 6, suppose when a server 16 opens beginning one Session, the Session Cookie of its affix in the data of sending is for as previous described " PHPSESSID=IUHBCXDEDSDFHJMLJHGBVCRXNBNJBGGCRDL " (original Cookie as shown in Figure 6), be used to provide this server 16 and differentiate this Session that corresponds to this user, method of the present invention is when using the data of a plurality of different these websites of transmission control protocol on-line access at this Session, can not have identical title because of Session Cookie, and occur in the Session Cookie covering that will before add in the different server 16 and cause layer 7 load balancer 14 to carry out the path exchange according to this Session Cookie, perhaps cause the server access errors, the Packet Filter 18 of this server 16 can be when each additional data that this Session Cookie arranged will send out by Packet Filter 18, the title of this Session Cookie is carried out rewriting Cookie as showing among Fig. 6, the first eight character of the title of 18 couples of these Session Cookie of Packet Filter is rewritten in the present embodiment, wherein two characters in foremost are that to be used for identifying this Cookie be a special Cookie who has the path exchange message to a set of keyword, next three characters then are used for identifying the stored data content kind of this server 16, and it is by 16 affixs of this server that last three characters then are used for identifying this Cookie.Modification that it should be noted that the title of this Session Cookie shown in Fig. 6 only is preferred embodiment of the present invention, and other can reach identical purpose and meet other application of the disclosed spirit of the present invention, also belongs to covering scope of the present invention.Next will describe in detail and rewrite the step that cookie name claims in the method for the present invention.
See also Fig. 7 and Fig. 8, show among Fig. 7 that a server 16 is when opening beginning one Session in the method for the present invention, its Packet Filter 18 adds the flow chart of Session Cookie in the data that send out, and it comprises the following step:
Step 58: when a server 16 opens beginning one Session, real server 20 meeting affix one Session Cookie in the HTTP of the data that send out header (HTTP Header), for example above-mentioned " PHPSESSID=IUHB ... DL ";
Step 59: when Packet Filter 18 receives these data that include this Session Cookie, can detect the HTTP header of these data, and the first eight character in the title of this Session Cookie is rewritten into the fixed character string of a uniqueness that corresponds to server 16, for instance, " DR0189C1 " as shown in Figure 7, and then claim revised these data under the situation of crossing layer 7 load balancer 14, directly to be sent to terminating machine 12 cookie name;
Step 60: next all can affix in the online requirement of being sent by terminating machine 12 through revised this Cookie of title " DR0189C1D=IUHB ... DL ";
Step 61: after layer 7 load balancer 14 receives this online requirement, can detect the content of this online requirement and want the data content of which kind of type of access to learn terminating machine 12, for instance, if it is " 0x018 " that terminating machine 12 is wanted the data content kind of access, then the HTTP header of layer 7 load balancer 14 these online requirements of meeting detection is the Cookie of " DR018 " with the first five character of searching title, if this special Cookie is present in the HTTP header of this online requirement, then layer 7 load balancer 14 can be recognized its pairing server 16 from this title, be about to this online requirement then and be sent to this server 16, if this Cookie is not present in the HTTP header of this online requirement, then layer 7 load balancer 14 can carry out the path exchange according to the content of this online requirement as previously mentioned, as described in preceding step;
Step 62: when Packet Filter 18 receives this online requirement, the HTTP header that can detect this online requirement is to find out the first eight character of title this Cookie for " DR0189C1 ", and these eight characters are reduced into " PHPSESSI ", and then this online requirement after cookie name claimed to reduce is sent to real server 20;
Step 63: after real server 20 receives this online requirement, can differentiate this Session that corresponds to this user according to this identifier.
And as showing after this user utilizes terminating machine 12 to send the online requirement of a plurality of access different pieces of information content type among Fig. 8, next the online requirement sent of terminating machine 12 will have a plurality of by 16 affixs of different servers and rewrite the special Cookie of its title, as shown in Figure 8, then this method includes the following step:
Step 64: terminating machine 12 sends to the online requirement of layer 7 load balancer 14 can add a plurality of titles and all different special Cookie of identifier;
Step 65: after layer 7 load balancer 14 receives this online requirement, can detect the content of this online requirement and want the data content of which kind of type of access to learn terminating machine 12, for instance, if it is " 0x002 " that terminating machine 12 is wanted the data content kind of access, and this kind representative is stored in the PHP file in the catalogue "/news/today ", then the HTTP header of layer 7 load balancer 14 these online requirements of meeting detection is the Cookie of " DR002 " with the first five character of searching title, layer 7 load balancer 14 then can be recognized its pairing server 16 from the title of this Cookie, be about to this online requirement then and be sent to this server 16;
Step 66: when Packet Filter 18 receives this online requirement, the HTTP header that can detect this online requirement is to find out the first eight character of title this Cookie for " DR002C11 ", and these eight characters are reduced into " PHPSESSI ", and then this online requirement after cookie name claimed to reduce is sent to real server 20;
Step 67: after real server 20 receives this online requirement, can differentiate this Session that corresponds to this user according to this identifier.
The flow chart of complex chart 7 and Fig. 8 is as can be known described, after a server 16 opens beginning one Session, real server 20 meeting affix one Session Cookie in the data that send out, Packet Filter 18 then can be rewritten the title of this Cookie, by so design, method of the present invention can utilize this Cookie that realizes this Session mechanism to carry the information of path exchange, and that also can possess that original this Cookie had simultaneously differentiates the function of this Session that corresponds to the user for server 16.
The present invention uses the technology of direct route, the live load of being born by the layer 7 load balancer originally is transferred to server brings in processing, makes the layer 7 load balancer no longer become the flow bottleneck; In addition, the present invention utilizes Packet Filter that the replacement package is kept one period scheduled period, has reduced because of online interruption and must carry out three-way handshake has strengthened network system with the work load of setting up the transmission control protocol state lasting online characteristic again; At last, the present invention utilizes the method that cookie name claims of rewriting again, make this network system can when carrying out carrying out the path exchange according to the content of online requirement, still can keep the consistency of Session mechanism, the efficient that can promote the path exchange by above-mentioned three feature the present invention widely.
Be understandable that; for the person of ordinary skill of the art; can make other various corresponding changes and distortion according to technical scheme of the present invention and technical conceive, and all these changes and distortion all should belong to the protection range of accompanying Claim of the present invention.

Claims (10)

1, a kind of live load with the layer 7 load balancer is transferred to the method that server is brought in processing, it is applied to a network system, it is characterized in that, this network system comprises: a terminating machine, one layer 7 load balancer, and at least one server, this server comprises a real server, and a Packet Filter, this method comprises following steps at least:
The real server of one server is carried out three-way handshake by Packet Filter and this terminating machine of this server, sets up the transmission control protocol state between itself and this terminating machine;
This terminating machine is sent an online requirement to this layer 7 load balancer;
This layer 7 load balancer detects the content of this online requirement;
Transmit this online requirement to this server; And
This terminating machine carries out data access by this transmission control protocol state to the real server of this server.
2, the live load with the layer 7 load balancer according to claim 1 is transferred to the method that server is brought in processing, it is characterized in that, carries out three-way handshake and sets up and comprise following steps in the step of this transmission control protocol state:
This terminating machine is sent a synchronous package to this layer 7 load balancer;
This layer 7 load balancer transmits the Packet Filter of this synchronous package to this server; The Packet Filter of this server directly transmits the real server of this synchronous package to this server;
The Packet Filter of this server receives from one of the real server of this server confirms package synchronously, and this confirmation of synchronization package directly is sent to this terminating machine;
This terminating machine transmits one and confirms that package is to this layer 7 load balancer;
This layer 7 load balancer should confirm that package was sent to this Packet Filter; And
This Packet Filter transmits the real server of this affirmation package to this server.
3, the live load with the layer 7 load balancer according to claim 1 is transferred to the method that server is brought in processing, it is characterized in that, this online requirement is sent to comprise the following step in the step of this server:
The Packet Filter of this server is changed the sequence number of this online requirement;
Transmit the real server of this online requirement to this server.
4, a kind of live load with the layer 7 load balancer is transferred to the method that server is brought in processing, it is applied to a network system, it is characterized in that, this network system comprises: a terminating machine, one layer 7 load balancer, and at least one server, this server comprises a real server, and a Packet Filter, this method comprises following steps at least:
The real server of one first server is carried out three-way handshake by Packet Filter and this terminating machine of this first server, sets up one first transmission control protocol state between itself and this terminating machine;
This terminating machine is sent one first online requirement to this layer 7 load balancer;
This layer 7 load balancer detects the content of this first online requirement;
This layer 7 load balancer is sent to the Packet Filter of a second server with this first online requirement, transmits the Packet Filter of a replacement package to this first server simultaneously;
The real server of this second server is carried out three-way handshake by Packet Filter and this terminating machine of this second server, sets up one second transmission control protocol state between itself and this terminating machine;
The Packet Filter of this second server is sent to this first online requirement the real server of this second server; And
This terminating machine carries out data access by this second transmission control protocol state to the real server of this second server.
5, the live load with the layer 7 load balancer according to claim 4 is transferred to the method that server is brought in processing, it is characterized in that, sets up and comprises following steps in the step of this first transmission control protocol state carrying out three-way handshake:
This terminating machine is sent one first synchronous package to this layer 7 load balancer;
This layer 7 load balancer transmits the Packet Filter of this first synchronous package to first server of choosing in advance;
The Packet Filter of this first server directly transmits the real server of this first synchronous package to this first server;
The Packet Filter of this first server receives one first confirmation of synchronization package from the real server of this first server, and this confirmation of synchronization package directly is sent to this terminating machine;
This terminating machine transmits one and confirms that package is to this layer 7 load balancer;
This layer 7 load balancer should confirm that package was sent to this Packet Filter; And
This Packet Filter transmits the real server of this affirmation package to this server.
6, the live load with the layer 7 load balancer according to claim 4 is transferred to the method that server is brought in processing, it is characterized in that, sets up to comprise following steps in the step of the second transmission control protocol state:
The Packet Filter of this second server transmits the real server of one second synchronous package to this second server;
The real server of this second server transmits the Packet Filter of one second confirmation of synchronization package to this second server; And
The Packet Filter of this second server transmits one and confirms the real server of package to this second server.
7, the live load with the layer 7 load balancer according to claim 4 is transferred to the method that server is handled, and it is characterized in that, when this terminating machine is sent one second online requirement and wanted access 1 the 3rd server, also comprises following steps:
This layer 7 load balancer transmits the Packet Filter of this second online requirement to the 3rd server;
Transmit the Packet Filter of a replacement package to this online second server;
The Packet Filter of the 3rd server is sent the real server of one the 3rd synchronous package to the 3rd server;
The real server of the 3rd server is carried out three-way handshake by Packet Filter and this terminating machine of the 3rd server, sets up one the 3rd transmission control protocol state between itself and this terminating machine;
The Packet Filter of the 3rd server transmits the real server of this second online requirement to the 3rd server; And
This terminating machine carries out data access by the 3rd transmission control protocol state to the real server of the 3rd server.
8, be transferred to the method that server is brought in processing according to claim 4 or 7 described live loads with the layer 7 load balancer, it is characterized in that, after this Packet Filter of having set up online server receives this replacement package, can should keep one period scheduled time by the replacement package earlier, if the Packet Filter of this server do not receive any online requirement in this scheduled time, then should the replacement package be sent to the real server of this server.
9, be transferred to the method that server is brought in processing according to claim 1 or 4 described live loads with the layer 7 load balancer, it is characterized in that, when the real server of a server will transmit the data during to this terminating machine that include Session information, the real server of this server additional one is used for storing the Cookie of this Session information to these data, and revise the title of this Cookie of these data by the Packet Filter of this server, so that this terminating machine can add the Cookie after this title is modified in the online requirement that next sends out.
10, the live load with the layer 7 load balancer according to claim 9 is transferred to the method that server is brought in processing, it is characterized in that, after this layer 7 load balancer receives the additional online requirement that this Cookie that is modified title arranged, can detect content and this Cookie of this online requirement, and transmit this online Packet Filter that requires to correspond to the server of this Cookie.
CN03123193A 2003-04-18 2003-04-18 Process method of transfer working load of seventh layer load equilizer to server terminal Expired - Fee Related CN100581157C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN03123193A CN100581157C (en) 2003-04-18 2003-04-18 Process method of transfer working load of seventh layer load equilizer to server terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN03123193A CN100581157C (en) 2003-04-18 2003-04-18 Process method of transfer working load of seventh layer load equilizer to server terminal

Publications (2)

Publication Number Publication Date
CN1538705A true CN1538705A (en) 2004-10-20
CN100581157C CN100581157C (en) 2010-01-13

Family

ID=34321233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN03123193A Expired - Fee Related CN100581157C (en) 2003-04-18 2003-04-18 Process method of transfer working load of seventh layer load equilizer to server terminal

Country Status (1)

Country Link
CN (1) CN100581157C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110022344A (en) * 2017-11-01 2019-07-16 阿里巴巴集团控股有限公司 Communication means, non-transitory computer-readable storage media, storage access system
CN110166568A (en) * 2013-04-16 2019-08-23 亚马逊科技公司 Distributed load balancer

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166568A (en) * 2013-04-16 2019-08-23 亚马逊科技公司 Distributed load balancer
CN110166568B (en) * 2013-04-16 2022-04-15 亚马逊科技公司 Distributed load balancer
US11843657B2 (en) 2013-04-16 2023-12-12 Amazon Technologies, Inc. Distributed load balancer
CN110022344A (en) * 2017-11-01 2019-07-16 阿里巴巴集团控股有限公司 Communication means, non-transitory computer-readable storage media, storage access system
CN110022344B (en) * 2017-11-01 2022-05-31 阿里巴巴集团控股有限公司 Communication method, non-transitory computer-readable storage medium, storage access system

Also Published As

Publication number Publication date
CN100581157C (en) 2010-01-13

Similar Documents

Publication Publication Date Title
CN1158615C (en) Load balancing method and equipment for convective medium server
CN1240233C (en) Method for receiving data using SMS and wireless internet and system thereof
CN1324856C (en) Data transmission method of network equipment based on multinetwork card and device
CN1658593A (en) Media streaming home network system and method for operating the same
CN1259704A (en) Expandable/compressible type high speed register
CN101047521A (en) Method for playing network media file by customer terminal and customer terminal
CN1976322A (en) Method and system for realizing multimedia immediate communicating and control flow
CN1638376A (en) Apparatus and method for sharing services on a network
CN101039309A (en) Link sharing service apparatus and communication method thereof
CN101047576A (en) Contents control method and system
CN1901546A (en) Information processing device
CN101056275A (en) A setting method for group message receiving mode in the instant communication system
CN1628301A (en) Method of data refreshing of a mark-up language document
CN101039250A (en) Image sharing system and method
CN100352198C (en) Method and system for processing a request for a plurality of web services
US7127503B2 (en) Computer networking system, device, and method for improved speed in web page rendering
CN1767519A (en) Method and apparatus for optimizing Web services binding
CN1798049A (en) Mobile online game system and method
CN1863202A (en) Method for improving load balance apparatus and servicer processing performance
CN1622553A (en) Internet standard file transmission protocol based file breakpoint upload method
CN1836237A (en) Method of caching data assets
CN1538705A (en) Process method of transfer working load of seventh layer load equilizer to server terminal
CN1905476A (en) Managing system and method for terminal products
CN106899456A (en) A kind of link detecting and the implementation method repaired
CN1833207A (en) System and method for web based monitoring and control of several spatially distributed systems

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100113

Termination date: 20190418

CF01 Termination of patent right due to non-payment of annual fee