CN110166570A - Service conversation management method, device, electronic equipment - Google Patents
Service conversation management method, device, electronic equipment Download PDFInfo
- Publication number
- CN110166570A CN110166570A CN201910483489.5A CN201910483489A CN110166570A CN 110166570 A CN110166570 A CN 110166570A CN 201910483489 A CN201910483489 A CN 201910483489A CN 110166570 A CN110166570 A CN 110166570A
- Authority
- CN
- China
- Prior art keywords
- client
- address
- tcpoptions
- target service
- content
- 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
- 238000007726 management method Methods 0.000 title claims abstract description 8
- 238000012545 processing Methods 0.000 claims abstract description 25
- 230000005540 biological transmission Effects 0.000 claims description 25
- 238000000034 method Methods 0.000 claims description 25
- 238000004891 communication Methods 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 239000000686 essence Substances 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 238000005303 weighing Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000005389 magnetism Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
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/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
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
The application provides a kind of service conversation management method, device, electronic equipment and machine readable storage medium.In this application, the target service message that the client device is initiated is received;To the target service packet parsing, client ip address corresponding with the client device is obtained;Using the client ip address as index is searched, search whether that there are matched service conversations in preset source IP address session holding table;If it exists, then it is based on the matched service conversation, distributes destination service end equipment corresponding with the client ip address;So that the destination service end equipment executes corresponding business processing for the target service message;Allow load-balancing device in the IP address of TCP layer quick obtaining client, to no longer need to obtain the IP address of client in OSI application layer, reduces the pressure of client and server-side, improve SiteServer LBS efficiency.
Description
Technical field
This application involves fields of communication technology more particularly to service conversation management method, device, electronic equipment and machine can
Read storage medium.
Background technique
Load balancing (Load Balance, abbreviation LB) is the Clustering of a kind of server or the network equipment.Load is equal
Specific service request is shared the multiple servers or the network equipment for giving its communication that is connected by weighing apparatus equipment, to improve business
Processing capacity ensure that the high availability of business.
For example, a server set, the server can be made of in a symmetrical manner multiple servers when realizing
Every server in set all has status of equal value, business service individually can be externally provided and without other servers
Auxiliary;It is that the service request that the server set is responsible for is evenly distributed to the server by target by load-balancing technique
On a server in set, to independently respond the request of client by the server for receiving service request.It is based on
Load-balancing technique can mean allocation client request to server array, and provide quick obtaining significant data, solve a large amount of
Concurrently access service problem.
NAT (Network Address Translation, network address translation), is the net of network address translation always
Network technology, essence are that the IP address of internal network of message is converted to public network IP address.Realize when, internal network (for example,
Local area network) internal node in use implicit IP address, and to be carried out with external public network (for example, internet) when internal node
When communication, it is necessary in the NAT gateway of internal network to external public network, the implicit IP address in message are substituted for NAT net
The public network IP address for closing setting allows multiple internal nodes of internal network to share a public network IP address and external public network
It is communicated, to solve the problems, such as that public network IP address is in short supply.
Summary of the invention
The application provides a kind of service conversation management method, and the method is applied to the load balancing in SiteServer LBS
Equipment, the SiteServer LBS further include client device, several server devices, intermediary network device;Wherein, the visitor
Family end equipment is connected communication through the intermediary network device, then through the load-balancing device with several server devices,
The described method includes:
Receive the target service message that the client device is initiated;
To the target service packet parsing, client ip address corresponding with the client device is obtained;
Using the client ip address as index is searched, search whether exist in preset source IP address session holding table
Matched service conversation;If it exists, then it is based on the matched service conversation, distributes mesh corresponding with the client ip address
Mark server device;So that the destination service end equipment executes corresponding business processing for the target service message.
Optionally, the target service message is the TCP message for carrying tcpOptions field, described to the target
Service message parsing, obtains client ip address corresponding with the client device, comprising:
Packet parsing is executed to the target service message based on Transmission Control Protocol, it is corresponding to obtain the target service message
Transmission Control Protocol field and its corresponding content;
From the Transmission Control Protocol field, determine that the target service message carries tcpOptions field;
Obtain the corresponding tcpOptions content of the tcpOptions field;Wherein, the tcpOptions content is extremely
It less include the client ip address.
Optionally, the tcpOptions content further includes kind field;Wherein, the kind field is used to indicate described
TcpOptions content has carried the client ip address, and the acquisition tcpOptions field is corresponding
TcpOptions content, comprising:
Check whether the corresponding content of kind field and preset value are identical in the tcpOptions content;If they are the same, then
Further obtaining includes the client ip address in the tcpOptions content.
Optionally, further includes:
If the source IP address session keep table in there is no with the matched service conversation of the client ip address,
Based on preset dispatching algorithm, new demand servicing end equipment is selected from several server devices;So that the new demand servicing end
Equipment executes corresponding business processing for the target service message;
It keeps in table, increases newly and the client ip address and the new demand servicing end equipment in the source IP address session
Corresponding session entry.
The application also provides a kind of service conversation managing device, and the load that described device is applied in SiteServer LBS is equal
Weigh equipment, and the SiteServer LBS further includes client device, several server devices, intermediary network device;Wherein, described
Client device is connected through the intermediary network device, then through the load-balancing device with several server devices
Letter, described device include:
Receiving module receives the target service message that the client device is initiated;
Parsing module, to the target service packet parsing, with obtaining client ip corresponding with the client device
Location;
Distribution module is looked into using the client ip address as index is searched in preset source IP address session holding table
It looks for the presence or absence of matched service conversation;If it exists, then it is based on the matched service conversation, distribution is with the client ip
The corresponding destination service end equipment in location;So that the destination service end equipment executes corresponding business for the target service message
Processing.
Optionally, the target service message is the TCP message for carrying tcpOptions field, the parsing module into
One step:
Packet parsing is executed to the target service message based on Transmission Control Protocol, it is corresponding to obtain the target service message
Transmission Control Protocol field and its corresponding content;
From the Transmission Control Protocol field, determine that the target service message carries tcpOptions field;
Obtain the corresponding tcpOptions content of the tcpOptions field;Wherein, the tcpOptions content is extremely
It less include the client ip address.
Optionally, the tcpOptions content further includes kind field;Wherein, the kind field is used to indicate described
TcpOptions content has carried the client ip address, the parsing module further,
Check whether the corresponding content of kind field and preset value are identical in the tcpOptions content;If they are the same, then
Further obtaining includes the client ip address in the tcpOptions content.
Optionally, the distribution module further,
If the source IP address session keep table in there is no with the matched service conversation of the client ip address,
Based on preset dispatching algorithm, new demand servicing end equipment is selected from several server devices;So that the new demand servicing end
Equipment executes corresponding business processing for the target service message;
It keeps in table, increases newly and the client ip address and the new demand servicing end equipment in the source IP address session
Corresponding session entry.
Machine readable instructions are stored in the memory, the processor is executed by calling the machine readable instructions
Above-mentioned method.
The application also provides a kind of machine readable storage medium, and the machine readable storage medium is stored with machine readable finger
It enables, the machine readable instructions realize the above method when being called and being executed by processor.
By above embodiments, based on the customized use to TCP message tcpOptions field, so that load balancing is set
It is standby can be in the IP address of TCP layer quick obtaining client;And client-based IP address and source IP address session are protected
Table is held, the server device kept for service conversation corresponding with the client is distributed, so that server device execution pair
Service conversation holding is answered to handle;To no longer need to obtain the IP address of client in OSI application layer, reduce client and
The pressure of server-side improves SiteServer LBS efficiency.
Detailed description of the invention
Fig. 1 is a kind of networking diagram for SiteServer LBS that an exemplary embodiment provides;
Fig. 2 is a kind of flow chart for service conversation management method that an exemplary embodiment provides;
Fig. 3 is a kind of block diagram for service conversation managing device that an exemplary embodiment provides;
Fig. 4 is the hardware structure diagram for a kind of electronic equipment that an exemplary embodiment provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.
It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
In order to make those skilled in the art more fully understand the technical solution in the embodiment of the present application, below first to this Shen
Please the relevant technologies that keep of the service conversation that is related to of embodiment, be briefly described.
Referring to Figure 1, Fig. 1 is a kind of networking diagram for SiteServer LBS that one embodiment of this specification provides.Such as Fig. 1 institute
The SiteServer LBS shown includes: that several server devices (S1, S2, S3), client device (C1, C2, C3), load balancing are set
Standby (SLB), intermediary network device;
Wherein, client device is connected through intermediary network device, then through load-balancing device with several server devices
Letter.
When realizing, client device as shown in Figure 1, to the service message of above-mentioned several server devices, Ke Yiyou
Above-mentioned load-balancing device forwards server device corresponding with above-mentioned service message by load balancing.
Such as: the service message from C1 client device can be transmitted to server device by load balancing by SLB
S1;Service message from C2 client device can be transmitted to server device S2 by load balancing by SLB;SLB can be with
By the service message from C3 client device, server device S3 is transmitted to by load balancing.
On the basis of group-network construction illustrated above, the application is directed to one kind, based on to TCP message
TcpOptions field and based on client ip address carries out business meeting in the IP address of TCP layer quick obtaining client
Talk about the technical solution kept.
When realizing, load-balancing device receives the target service message that client device is initiated;To the target service
Packet parsing obtains client ip address corresponding with the client device;Using the client ip address as lookup rope
Draw, searches whether that there are matched service conversations in preset source IP address session holding table;If it exists, then it is based on the matching
Service conversation, distribute corresponding with client ip address destination service end equipment;So that the destination service end equipment
Corresponding business processing is executed for the target service message.
In above scheme, based on the customized use to TCP message tcpOptions field, so that load-balancing device
It can be in the IP address of TCP layer quick obtaining client;And client-based IP address and source IP address session are kept
Table distributes the server device kept for service conversation corresponding with the client, so that server device executes correspondence
Service conversation holding processing;To no longer need to obtain the IP address of client in OSI application layer, client and clothes are reduced
The pressure at business end, improves SiteServer LBS efficiency.
The application is described below by specific embodiment and in conjunction with specific application scenarios.
Referring to FIG. 2, Fig. 2 is a kind of flow chart for service conversation management method that one embodiment of the application provides, it is described
Method is applied to the load-balancing device in SiteServer LBS, and the SiteServer LBS further includes client device, several
Server device, intermediary network device;Wherein, the client device is equal through the intermediary network device, then through the load
Weighing apparatus equipment is connected communication with several server devices, above method execution following steps:
Step 202 receives the target service message that the client device is initiated.
Step 204, to the target service packet parsing, with obtaining client ip corresponding with the client device
Location.
Step 206 is indexed using the client ip address as lookup, keeps table to search in preset source IP address session
With the presence or absence of matched service conversation;If it exists, then the matched service conversation, distribution and the client ip address are based on
Corresponding destination service end equipment;So that the destination service end equipment executes at corresponding business for the target service message
Reason.
In the present specification, above-mentioned load-balancing device may include that be integrated with load-balancing function any sets
It is standby.For example, in practical applications, above-mentioned load-balancing device can specifically include interchanger with load-balancing function, road
By device, firewall, server and load balancer etc..
In the present specification, above-mentioned client device and above-mentioned server device are a pair in the presence of request and service relation
Equipment.
Such as: above-mentioned client device can be Client in C/S (Client/Server) framework, above-mentioned server-side
Equipment can be the Server in C/S (Client/Server, client/server) framework.
Certain above-mentioned client device and above-mentioned server device be also possible to based on B/S framework (Browser/Server,
Browser/server) a pair of of equipment.
In the present specification, above-mentioned intermediary network device refers to, sets in above-mentioned client device and above-mentioned several server-sides
Standby corresponding one between above-mentioned client device and above-mentioned load-balancing device of network path for carrying out service communication
Or multiple network equipments.
In the present specification, above-mentioned target service message, refers to the TCP message for carrying tcpOptions field;It is above-mentioned
Target service message is from the above-mentioned client device being connected with above-mentioned load-balancing device, through above-mentioned intermediary network device, then
Through above-mentioned load-balancing device after load balancing, the corresponding with service end equipment being forwarded in above-mentioned several server devices, with
Corresponding business processing is executed to above-mentioned target service message by the server device.
Below by way of specific embodiment, and " client ip address acquisition ", " service conversation holding processing " are combined, to this
The technical solution of application being related to is described in detail:
1) client ip address obtains
In the present specification, above-mentioned client device initiates target service message to corresponding above-mentioned server device.
Such as: above-mentioned client device (C1 for example, shown in FIG. 1) (is for example, schemed to corresponding above-mentioned server device
S1 shown in 1) initiate target service message.
It should be noted that above-mentioned client device (C1, C2 for example, shown in FIG. 1) and above-mentioned server device (example
S1, S2, S3 for example shown in FIG. 1) it can be not especially limited in the present note there are many corresponding combination.
In the present specification, further, above-mentioned load-balancing device receives the target industry that above-mentioned client device is initiated
Business message.
Then above example continues to illustrate, and above-mentioned load-balancing device receives setting to server-side for client device C1 initiation
The target service message of standby S1.
In the present specification, after receiving the target service message that above-mentioned client device is initiated, above-mentioned load balancing is set
For to above-mentioned target service packet parsing, client ip address corresponding with above-mentioned client device is obtained.
For example, then above example continues to illustrate, arriving for client device C1 initiation is received in above-mentioned load-balancing device
After the target service message of server device S1, above-mentioned load-balancing device is to the target service packet parsing, acquisition and client
The corresponding client ip address of end equipment C1, such as: the client ip address of client device C1 is 10.30.5.6.
It should be noted that above-mentioned client ip address is the real IP address of above-mentioned client, due to above-mentioned target industry
During business message is forwarded to above-mentioned load-balancing device through above-mentioned intermediary network device, in existing realization, above-mentioned target
Source IP address in service message would generally be changed to the IP address after the NAT rule process in above-mentioned intermediary network device,
The real IP address of above-mentioned client can not be obtained so as to cause above-mentioned load-balancing device.Certainly, above-mentioned load-balancing device
It can be based on X-Forwarded-For technology, by adding the real IP address of above-mentioned client in HTTP request, thus real
Now obtain the real IP address of above-mentioned client.
In a kind of embodiment shown, above-mentioned load-balancing device is based on Transmission Control Protocol to above-mentioned target service message
Packet parsing is executed, the corresponding Transmission Control Protocol field of above-mentioned target service message and its corresponding content are obtained.
For example, above-mentioned load-balancing device is based on Transmission Control Protocol and executes message solution to above-mentioned target service message when realizing
Analysis, obtains the corresponding Transmission Control Protocol field of TCP stem and its corresponding content of above-mentioned target service message.
It should be noted that in Transmission Control Protocol, TCP stem is usually by 20 byte data contents of regular length and most
The variable length data content of more 40 bytes forms;Wherein, 20 byte data contents of regular length are relatively fixed, mainly include
The fields such as TCP source port, TCP destination port, TCP serial number, TCP acknowledgment number, specifically refer to Transmission Control Protocol document, here no longer
It repeats;The data content of above-mentioned variable-length, also the as corresponding tcpOptions content of tcpOptions field, is that user can
With customized.
In the present specification, further, above-mentioned load-balancing device determines above-mentioned mesh from above-mentioned Transmission Control Protocol field
It marks service message and carries tcpOptions field.
For example, above-mentioned load-balancing device is after executing packet parsing to above-mentioned target service message, from solution when realizing
TcpOptions field is found in Transmission Control Protocol field after analysis.
In the present specification, further, after finding the corresponding tcpOptions field of above-mentioned target service message, on
It states load-balancing device and obtains the corresponding tcpOptions content of above-mentioned tcpOptions field;Wherein, above-mentioned tcpOptions
Content includes at least above-mentioned client ip address.
For example, in the target service message of client device C1 to server device S1 as shown in Figure 1
The client ip address that the corresponding tcpOptions content of tcpOptions field is client device C1 is 10.30.5.6, on
It states load-balancing device and obtains the tcpOptions content, to obtain the client ip address of client device C1.
It should be noted that position of the above-mentioned client ip address in above-mentioned tcpOptions content does not limit specifically
It is fixed, such as: above-mentioned client ip address can be on the head or tail portion of above-mentioned tcpOptions content.
In a kind of embodiment shown, above-mentioned tcpOptions content further includes kind field;Wherein, above-mentioned kind
Field is used to indicate above-mentioned tcpOptions content and has carried above-mentioned client ip address.
For example, the corresponding kind content of above-mentioned kind field can be self-defining value when realizing.Above-mentioned tcpOptions
Field constitutes and its content, such as refers to shown in table 1:
Kind field | Client ip address |
28 | 10.30.5.6 |
Table 1
As shown in table 1, above-mentioned tcpOptions field includes kind field, client ip address;Wherein, kind field pair
The kind content answered is 28, and above-mentioned client ip address corresponds to 10.30.5.6.
It should be noted that above-mentioned kind content cannot be it is defined using numerical value in Transmission Control Protocol, for example, above-mentioned kind
Content be in 28, with Transmission Control Protocol it is defined using kind types value (such as: it is 1,2,3...8) different, as a result, by above-mentioned
Kind content is 28, it is possible to distinguish tcpOptions entrained by above-mentioned target service message is comprising above-mentioned client ip address
Above-mentioned tcpOptions or the corresponding tcpOptions of the defined kind types value of Transmission Control Protocol.
Certain above-mentioned tcpOptions content, can also follow TLV (Tag, type;Length, length;Value value) lattice
Formula;On 1 basis of table, can also increase a Length field be used to indicate above-mentioned tcpOptions content data it is long
Degree.It should be noted that it is the data format namely above-mentioned tcpOptions that length can be changed that TLV format, which is a kind of data content,
The length of content is variable.
In a kind of embodiment shown, in the correspondence for getting the kind field in above-mentioned tcpOptions field
Rong Hou, above-mentioned load-balancing device check in above-mentioned tcpOptions content the corresponding content of kind field and preset value whether phase
Together;If they are the same, then further obtaining includes above-mentioned client ip address in above-mentioned tcpOptions content.
For example, above-mentioned load-balancing device checks that the corresponding content of kind field in above-mentioned tcpOptions content is, for example,
The corresponding content 28 of kind field shown in table 1, it is identical as preset value (for example, 28), then it further obtains above-mentioned
The client ip address (for example, 10.30.5.6 shown in table 1) for including in tcpOptions content.
It should be noted that if in the tcpOptions content of target service message kind field corresponding content (such as
Be it is 1) different from preset value (for example, 28), then indicate the target service message carry tcpOptions be Transmission Control Protocol definition
Existing kind type tcpOptions.
2) service conversation holding is handled
In order to facilitate understanding, " source IP address session holding " concept under first introducing.Under normal conditions, load-balancing device exists
When making load balancing, the main foundation of corresponding server can be distributed as it according to the source IP address of access request;And " source IP
Location session is kept " refer to, load-balancing device is loading all access requests of the client from same source IP address
When balanced, all access requests of the client can be assigned to same server.
In the present specification, above-mentioned source IP address session keeps table, refers to above-mentioned load-balancing device for for above-mentioned
Target service message executes the session service table of " source IP address session holding ".
When realizing, above-mentioned source IP address session keeps table to include at least the corresponding source IP address of service message, the business
The server ip address of the corresponding distribution of message.
For example, above-mentioned source IP address session keeps the table structure and contents in table of table, refer to shown in table 3:
Table 3
The above-mentioned source IP address session of each behavior as shown in table 3 keeps the service conversation corresponding table item of table, above-mentioned load
The target service message that equalizing equipment is C1 to the correspondence client device for being 10.30.5.6 from same source IP address is being born
When carrying balanced, all access requests of client device C1 can be assigned to the corresponding with service that IP address is 100.30.5.6
End equipment S1.Similarly, as shown in table 3, C2 and S2, C3 and S3 respectively correspond respective service conversation list item.
It should be noted that a kind of possibility that table 3 is merely illustrative, in actual SiteServer LBS, above-mentioned client
There are a variety of possibility to combine with the corresponding relationship of above-mentioned server device for equipment, is not especially limited in the present specification.
In the present specification, after obtaining client ip address corresponding with above-mentioned client device, above-mentioned load balancing
System, using above-mentioned client ip address as search index, preset source IP address session holding table search whether exist
The service conversation matched;If it exists, then it is based on above-mentioned matched service conversation, distributes target corresponding with above-mentioned client ip address
Server device;So that above-mentioned destination service end equipment executes corresponding business processing for above-mentioned target service message.
For example, above-mentioned client device is C1 as shown in Figure 1, and above-mentioned SiteServer LBS is with the visitor of C1 when realizing
Family end IP address 10.30.5.6 is searched, really as index is searched in above-mentioned source IP address session holding table as shown in table 3
Presence and the matched service conversation list item of 10.30.5.6 (corresponding to first service conversation in table 3) calmly, further according to this
Matched service conversation distributes the target that IP address corresponding with the client ip address 10.30.5.6 of C1 is 100.30.5.6
Server device S1.So that S1 executes corresponding business processing for above-mentioned target service message.
In the present specification, when above-mentioned load-balancing device finds above-mentioned client in above-mentioned source IP address session holding table
After holding corresponding destination service end equipment, above-mentioned target service message is forwarded to above-mentioned destination service by above-mentioned load-balancing device
End equipment, so that above-mentioned destination service end equipment executes corresponding business processing for the target service message.
Then above example continues to illustrate, and the above-mentioned target service message from C1 is forwarded to by above-mentioned load-balancing device
Corresponding destination service end equipment S1, so that S1 executes corresponding business processing for above-mentioned target service message.
In a kind of embodiment shown, if keeping being not present and above-mentioned client in table in above-mentioned source IP address session
The matched service conversation of IP address, then above-mentioned load-balancing device is based on preset dispatching algorithm, sets from above-mentioned several server-sides
New demand servicing end equipment is selected in standby;So that above-mentioned new demand servicing end equipment executes at corresponding business for above-mentioned target service message
Reason.
For example, above-mentioned source IP address session keeps the table structure and contents in table of table when realizing, refer to shown in table 4:
Table 4
Above-mentioned load-balancing device is based on preset dispatching algorithm, from several server devices as shown in Figure 1 (S1, S2,
S3 new demand servicing end equipment is selected in) (such as S1);So that S1 executes corresponding business processing for above-mentioned target service message.
It should be noted that above-mentioned dispatching algorithm is on above-mentioned load-balancing device for from above-mentioned several server devices
The algorithm of corresponding with service end equipment is selected for the corresponding above-mentioned client device of above-mentioned target service message, above-mentioned dispatching algorithm
Type can there are many, for example can be dispatching algorithm or the dispatching algorithm of Weight poll etc. based on poll, above-mentioned scheduling
The type of algorithm is not specifically limited in the present specification.
In the present specification, it is based on above-mentioned dispatching algorithm in above-mentioned load-balancing device, from above-mentioned several server devices
In select above-mentioned new demand servicing end equipment after, further, above-mentioned load-balancing device above-mentioned source IP address session keep table
In, increase session entry corresponding with above-mentioned client ip address and above-mentioned new demand servicing end equipment newly.
For example, above-mentioned client device is C1 as shown in Figure 1 when realizing, above-mentioned load-balancing device is C1 from such as
New demand servicing end equipment S1 is selected in several server devices (S1, S2, S3) shown in FIG. 1, above-mentioned load-balancing device is in example
For example above-mentioned source IP address session shown in table 4 is kept in table, increases a service conversation list item newly, which includes C1 visitor
Family end IP address, and the IP address of S1 corresponding with C1;After increasing the service conversation list item newly, above-mentioned source IP address session is protected
The contents in table of table is held as being updated to shown in for example table 3 as shown in table 4.
It in the present specification, further, is above-mentioned client by above-mentioned dispatching algorithm when above-mentioned load-balancing device
After selecting corresponding above-mentioned new demand servicing end equipment, above-mentioned target service message is forwarded to above-mentioned new by above-mentioned load-balancing device
Server device, so that above-mentioned new demand servicing end equipment executes corresponding business processing for above-mentioned target service message.
For example, the above-mentioned target service message from C1 is forwarded to corresponding new demand servicing end equipment by above-mentioned load-balancing device
S1, so that S1 executes corresponding business processing for above-mentioned target service message.
In above technical scheme, based on the customized use to TCP message tcpOptions field, so that load balancing
Equipment can be in the IP address of TCP layer quick obtaining client;And client-based IP address and source IP address session
Table is kept, the server device kept for service conversation corresponding with the client is distributed, so that server device executes
Corresponding service conversation holding processing;To no longer need to obtain the IP address of client in OSI application layer, client is reduced
And the pressure of server-side, improve SiteServer LBS efficiency.
Fig. 3 is a kind of block diagram for service conversation managing device that one exemplary embodiment of the application provides.With the above method
Embodiment is corresponding, and present invention also provides a kind of embodiments of service conversation managing device, and it is equal that described device is applied to load
Load-balancing device in balance system, the SiteServer LBS further include client device, several server devices, mid-level net
Network equipment;Wherein, the client device is through the intermediary network device, then through the load-balancing device and several clothes
End equipment of being engaged in, which is connected, to be communicated, and please referring to a kind of service conversation managing device 30, described device exemplified by Fig. 3 includes:
Receiving module 301 receives the target service message that the client device is initiated;
Parsing module 302 obtains client ip corresponding with the client device to the target service packet parsing
Address;
Distribution module 303 keeps table in preset source IP address session using the client ip address as index is searched
Search whether that there are matched service conversations;If it exists, then the matched service conversation, distribution and the client ip are based on
The corresponding destination service end equipment in address;So that the destination service end equipment executes corresponding industry for the target service message
Business processing.
In the present embodiment, the target service message is the TCP message for carrying tcpOptions field, the parsing
Module 302 further,
Packet parsing is executed to the target service message based on Transmission Control Protocol, it is corresponding to obtain the target service message
Transmission Control Protocol field and its corresponding content;
From the Transmission Control Protocol field, determine that the target service message carries tcpOptions field;
Obtain the corresponding tcpOptions content of the tcpOptions field;Wherein, the tcpOptions content is extremely
It less include the client ip address.
In the present embodiment, the tcpOptions content further includes kind field;Wherein, the kind field is for referring to
Show that the tcpOptions content has carried the client ip address, the parsing module 302 further,
Check whether the corresponding content of kind field and preset value are identical in the tcpOptions content;If they are the same, then
Further obtaining includes the client ip address in the tcpOptions content.
In the present embodiment, the distribution module 303 further,
If the source IP address session keep table in there is no with the matched service conversation of the client ip address,
Based on preset dispatching algorithm, new demand servicing end equipment is selected from several server devices;So that the new demand servicing end
Equipment executes corresponding business processing for the target service message;
It keeps in table, increases newly and the client ip address and the new demand servicing end equipment in the source IP address session
Corresponding session entry.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with
It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
System, device, module or the module that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
The embodiment of the service conversation managing device of the application can be using on electronic equipment shown in Fig. 4.Device is real
Applying example can also be realized by software realization by way of hardware or software and hardware combining.Taking software implementation as an example, make
For the device on a logical meaning, being will be corresponding in machine readable storage medium by the processor of electronic equipment where it
Computer program instructions run the machine-executable instruction of formation after reading.For hardware view, as shown in figure 4, being this Shen
A kind of hardware structure diagram of electronic equipment where service conversation managing device please, in addition to processor shown in Fig. 4, communication connect
Except mouth, bus and machine readable storage medium, the electronic equipment in embodiment where device is generally according to the electronic equipment
Actual functional capability, can also include other hardware, this is repeated no more.
Accordingly, it the embodiment of the present application also provides the hardware configuration of a kind of electronic equipment of Fig. 3 shown device, refers to
Fig. 4, Fig. 4 are the hardware structural diagram of a kind of electronic equipment provided by the embodiments of the present application.The equipment includes: communication interface
401, processor 402, machine readable storage medium 403 and bus 404;Wherein, communication interface 401, processor 402, machine can
It reads storage medium 403 and mutual communication is completed by bus 404.Wherein, communication interface 401, for carrying out network communication.Place
Reason device 402 can be a central processing unit (CPU), and processor 402 can execute to be stored in machine readable storage medium 403
Machine readable instructions, to realize process as described above.
Machine readable storage medium 403 referred to herein can be any electronics, magnetism, optics or other physical stores
Device may include or store information, such as executable instruction, data, etc..For example, machine readable storage medium may is that easily
Lose memory, nonvolatile memory or similar storage medium.Specifically, machine readable storage medium 403 can be RAM
(Radom Access Memory, random access memory), flash memory, memory driver (such as hard disk drive), solid state hard disk,
Any kind of storage dish (such as CD, DVD) perhaps similar storage medium or their combination.
So far, hardware configuration description shown in Fig. 4 is completed.
In addition, the embodiment of the present application also provides a kind of machine readable storage medium including machine-executable instruction, example
Such as the machine-readable readable storage medium storing program for executing 403 in Fig. 4, the machine-executable instruction can be by data processing equipment
Device 402 is managed to execute to realize data processing method described above.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or
Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following
Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.
Claims (10)
1. a kind of service conversation management method, which is characterized in that the method is applied to the load balancing in SiteServer LBS
Equipment, the SiteServer LBS further include client device, several server devices, intermediary network device;Wherein, the visitor
Family end equipment is connected communication through the intermediary network device, then through the load-balancing device with several server devices,
The described method includes:
Receive the target service message that the client device is initiated;
To the target service packet parsing, client ip address corresponding with the client device is obtained;
Using the client ip address as index is searched, search whether there is matching in preset source IP address session holding table
Service conversation;If it exists, then it is based on the matched service conversation, distributes target clothes corresponding with the client ip address
Business end equipment;So that the destination service end equipment executes corresponding business processing for the target service message.
2. the method according to claim 1, wherein the target service message is to carry tcpOptions word
The TCP message of section, it is described to the target service packet parsing, with obtaining client ip corresponding with the client device
Location, comprising:
Packet parsing is executed to the target service message based on Transmission Control Protocol, obtains the corresponding TCP association of the target service message
Discuss field and its corresponding content;
From the Transmission Control Protocol field, determine that the target service message carries tcpOptions field;
Obtain the corresponding tcpOptions content of the tcpOptions field;Wherein, the tcpOptions content is at least wrapped
Include the client ip address.
3. according to the method described in claim 2, it is characterized in that, the tcpOptions content further includes kind field;Its
In, the kind field is used to indicate the tcpOptions content and has carried the client ip address, described in the acquisition
The corresponding tcpOptions content of tcpOptions field, comprising:
Check whether the corresponding content of kind field and preset value are identical in the tcpOptions content;If they are the same, then into one
It includes the client ip address in the tcpOptions content that step, which obtains,.
4. the method according to claim 1, wherein further include:
If the source IP address session keep table in there is no with the matched service conversation of the client ip address, be based on
Preset dispatching algorithm selects new demand servicing end equipment from several server devices;So that the new demand servicing end equipment
Corresponding business processing is executed for the target service message;
It keeps in table, increases newly corresponding with the client ip address and the new demand servicing end equipment in the source IP address session
Session entry.
5. a kind of service conversation managing device, which is characterized in that described device is applied to the load balancing in SiteServer LBS
Equipment, the SiteServer LBS further include client device, several server devices, intermediary network device;Wherein, the visitor
Family end equipment is connected communication through the intermediary network device, then through the load-balancing device with several server devices,
Described device includes:
Receiving module receives the target service message that the client device is initiated;
Parsing module obtains client ip address corresponding with the client device to the target service packet parsing;
Distribution module, using the client ip address as index is searched, searching in preset source IP address session holding table is
It is no that there are matched service conversations;If it exists, then the matched service conversation, distribution and the client ip address pair are based on
The destination service end equipment answered;So that the destination service end equipment executes at corresponding business for the target service message
Reason.
6. device according to claim 5, which is characterized in that the target service message is to carry tcpOptions word
Section TCP message, the parsing module further,
Packet parsing is executed to the target service message based on Transmission Control Protocol, obtains the corresponding TCP association of the target service message
Discuss field and its corresponding content;
From the Transmission Control Protocol field, determine that the target service message carries tcpOptions field;
Obtain the corresponding tcpOptions content of the tcpOptions field;Wherein, the tcpOptions content is at least wrapped
Include the client ip address.
7. device according to claim 6, which is characterized in that the tcpOptions content further includes kind field;Its
In, the kind field is used to indicate the tcpOptions content and has carried the client ip address, the parsing module
Further,
Check whether the corresponding content of kind field and preset value are identical in the tcpOptions content;If they are the same, then into one
It includes the client ip address in the tcpOptions content that step, which obtains,.
8. device according to claim 5, which is characterized in that the distribution module further,
If the source IP address session keep table in there is no with the matched service conversation of the client ip address, be based on
Preset dispatching algorithm selects new demand servicing end equipment from several server devices;So that the new demand servicing end equipment
Corresponding business processing is executed for the target service message;
It keeps in table, increases newly corresponding with the client ip address and the new demand servicing end equipment in the source IP address session
Session entry.
9. a kind of electronic equipment, which is characterized in that including communication interface, processor, memory and bus, the communication interface,
It is connected with each other between the processor and the memory by bus;
Machine readable instructions are stored in the memory, the processor is executed by calling the machine readable instructions as weighed
Benefit requires 1 to 4 described in any item methods.
10. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with machine readable finger
It enables, the machine readable instructions realize the described in any item methods of Claims 1-4 when being called and being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910483489.5A CN110166570B (en) | 2019-06-04 | 2019-06-04 | Service session management method and device, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910483489.5A CN110166570B (en) | 2019-06-04 | 2019-06-04 | Service session management method and device, and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110166570A true CN110166570A (en) | 2019-08-23 |
CN110166570B CN110166570B (en) | 2022-06-28 |
Family
ID=67627705
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910483489.5A Active CN110166570B (en) | 2019-06-04 | 2019-06-04 | Service session management method and device, and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110166570B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111147598A (en) * | 2019-12-30 | 2020-05-12 | 杭州迪普科技股份有限公司 | HTTP message processing method and device |
CN111800423A (en) * | 2020-07-06 | 2020-10-20 | 中国工商银行股份有限公司 | Method, system, computing device and medium for processing IP address |
CN111953770A (en) * | 2020-08-07 | 2020-11-17 | 平安科技(深圳)有限公司 | Route forwarding method and device, route equipment and readable storage medium |
CN112671698A (en) * | 2020-08-17 | 2021-04-16 | 紫光云技术有限公司 | Method for preventing WAF from being bypassed in public cloud environment |
CN113612851A (en) * | 2021-08-11 | 2021-11-05 | 山石网科通信技术股份有限公司 | Remote connection method and device, storage medium and processor |
CN114024968A (en) * | 2021-08-20 | 2022-02-08 | 绿盟科技集团股份有限公司 | Message sending method and device based on intermediate equipment and electronic equipment |
CN114268615A (en) * | 2021-12-24 | 2022-04-01 | 成都知道创宇信息技术有限公司 | Service processing method and system based on TCP connection |
CN114928661A (en) * | 2022-05-31 | 2022-08-19 | 杭州迪普科技股份有限公司 | Session keeping method and device |
CN115567539A (en) * | 2022-09-28 | 2023-01-03 | 北京天融信网络安全技术有限公司 | Session holding method, device, equipment and storage medium |
CN115865816A (en) * | 2022-11-24 | 2023-03-28 | 北京天融信网络安全技术有限公司 | A network load balancing method and device |
CN116016535A (en) * | 2023-01-04 | 2023-04-25 | 上海弘积信息科技有限公司 | Load balancing system for controlling local application |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101296238A (en) * | 2008-06-17 | 2008-10-29 | 杭州华三通信技术有限公司 | Method and equipment for remaining persistency of security socket layer conversation |
CN102255932A (en) * | 2010-05-20 | 2011-11-23 | 百度在线网络技术(北京)有限公司 | Load balancing method and load equalizer |
CN107070983A (en) * | 2017-01-23 | 2017-08-18 | 天地融科技股份有限公司 | A kind of load-balancing method, equipment and system forwarded based on address |
-
2019
- 2019-06-04 CN CN201910483489.5A patent/CN110166570B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101296238A (en) * | 2008-06-17 | 2008-10-29 | 杭州华三通信技术有限公司 | Method and equipment for remaining persistency of security socket layer conversation |
CN102255932A (en) * | 2010-05-20 | 2011-11-23 | 百度在线网络技术(北京)有限公司 | Load balancing method and load equalizer |
CN107070983A (en) * | 2017-01-23 | 2017-08-18 | 天地融科技股份有限公司 | A kind of load-balancing method, equipment and system forwarded based on address |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111147598B (en) * | 2019-12-30 | 2023-04-25 | 杭州迪普科技股份有限公司 | HTTP message processing method and device |
CN111147598A (en) * | 2019-12-30 | 2020-05-12 | 杭州迪普科技股份有限公司 | HTTP message processing method and device |
CN111800423A (en) * | 2020-07-06 | 2020-10-20 | 中国工商银行股份有限公司 | Method, system, computing device and medium for processing IP address |
CN111953770A (en) * | 2020-08-07 | 2020-11-17 | 平安科技(深圳)有限公司 | Route forwarding method and device, route equipment and readable storage medium |
CN111953770B (en) * | 2020-08-07 | 2022-11-25 | 平安科技(深圳)有限公司 | Route forwarding method and device, route equipment and readable storage medium |
CN112671698A (en) * | 2020-08-17 | 2021-04-16 | 紫光云技术有限公司 | Method for preventing WAF from being bypassed in public cloud environment |
CN113612851A (en) * | 2021-08-11 | 2021-11-05 | 山石网科通信技术股份有限公司 | Remote connection method and device, storage medium and processor |
CN114024968A (en) * | 2021-08-20 | 2022-02-08 | 绿盟科技集团股份有限公司 | Message sending method and device based on intermediate equipment and electronic equipment |
CN114024968B (en) * | 2021-08-20 | 2023-05-26 | 绿盟科技集团股份有限公司 | Message sending method and device based on intermediate equipment and electronic equipment |
CN114268615A (en) * | 2021-12-24 | 2022-04-01 | 成都知道创宇信息技术有限公司 | Service processing method and system based on TCP connection |
CN114268615B (en) * | 2021-12-24 | 2023-08-08 | 成都知道创宇信息技术有限公司 | Service processing method and system based on TCP connection |
CN114928661A (en) * | 2022-05-31 | 2022-08-19 | 杭州迪普科技股份有限公司 | Session keeping method and device |
CN115567539A (en) * | 2022-09-28 | 2023-01-03 | 北京天融信网络安全技术有限公司 | Session holding method, device, equipment and storage medium |
CN115865816A (en) * | 2022-11-24 | 2023-03-28 | 北京天融信网络安全技术有限公司 | A network load balancing method and device |
CN116016535A (en) * | 2023-01-04 | 2023-04-25 | 上海弘积信息科技有限公司 | Load balancing system for controlling local application |
Also Published As
Publication number | Publication date |
---|---|
CN110166570B (en) | 2022-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110166570A (en) | Service conversation management method, device, electronic equipment | |
US7562145B2 (en) | Application instance level workload distribution affinities | |
US9137156B2 (en) | Scalable and efficient flow-aware packet distribution | |
US8913613B2 (en) | Method and system for classification and management of inter-blade network traffic in a blade server | |
US9602428B2 (en) | Method and apparatus for locality sensitive hash-based load balancing | |
US20100036903A1 (en) | Distributed load balancer | |
US11233737B2 (en) | Stateless distributed load-balancing | |
US20020143953A1 (en) | Automatic affinity within networks performing workload balancing | |
WO2012120473A9 (en) | Load balancing sctp associations using vtag mediation | |
US20020143965A1 (en) | Server application initiated affinity within networks performing workload balancing | |
US7944923B2 (en) | Method and system for classifying network traffic | |
US10178033B2 (en) | System and method for efficient traffic shaping and quota enforcement in a cluster environment | |
CN109361749B (en) | Message processing method, related equipment and computer storage medium | |
CN110609746A (en) | Method, apparatus and computer program product for managing network system | |
CN110120897A (en) | Link detection method, apparatus, electronic equipment and machine readable storage medium | |
Buyakar et al. | Prototyping and load balancing the service based architecture of 5G core using NFV | |
CN115396528A (en) | Quic data transmission method and device based on protocol family | |
CA2931906C (en) | Systems and methods for determining a destination location in a network system | |
US11962643B2 (en) | Implementing multiple load balancer drivers for a single load balancer | |
CN110233902A (en) | Conversation processing method, device, electronic equipment and machine readable storage medium | |
US11012364B2 (en) | Aggregated link flow control system | |
JP2013062680A (en) | Node device, system and packet processing method | |
CN110071872A (en) | Service message retransmission method, device, electronic equipment | |
US11811685B1 (en) | Selective packet processing including a run-to-completion packet processing data plane | |
US10791088B1 (en) | Methods for disaggregating subscribers via DHCP address translation and devices thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |