Content of the invention
The main purpose of the application is to provide a kind of data access method and portal server, existing at least to solve
The forwarding port of TCP agent server be pre-fixed, can only be by using person's manual modification, it is impossible to dynamic modification
Problem.
According to the one side of the application, there is provided a kind of data access method, which includes:Portal server receives to be passed
Defeated accessing request information, wherein, accessing request information is used for accessing the data on destination server;Portal server obtain into
Link information between mouth server and destination server, wherein, link information is by the system that configures according to including portal server
Itself the prolonging to other webservers in webserver set reported in the interior webserver with destination server
When information and packet loss information be calculated;Accessing request information is sent to purpose service according to link information by portal server
Device.
Alternatively, before portal server receives accessing request information waiting for transmission, data access side
Method also includes:Including each webserver in the webserver set including portal server and destination server every
Predetermined period obtains itself to the time delay of other webservers in webserver set under conditions of satisfaction is predetermined
Information and packet loss information;Delayed data and packet loss information are sent to configuration system by the webserver;Portal server connects
Receive the link information between the portal server and destination server of configuration system return;Portal server obtains portal server
Link information between destination server includes:Portal server is obtained between portal server and destination server from local
Link information.
Alternatively, predetermined condition includes:The webserver receives the link letter of configuration system transmission
Breath obtains request.
Alternatively, portal server obtains the link information bag between portal server and destination server
Include:Configuration system receives the first request message for obtaining link information that portal server sends;Configuration system in response to
Each network service in webserver set of first request message into including portal server and destination server
Device is sent for obtaining the second request message of link information;Configuration system receives itself of webserver transmission and takes to network
The delayed data of other webservers in business device set and packet loss information;Configuration system is according to delayed data and packet loss
Information calculates the link information between portal server and destination server;Configuration system is by portal server and destination server
Between link information be sent to portal server.
Alternatively, accessing request information is sent to destination server according to link information by portal server
Including:Accessing request information is sent to and purpose service by multiple intermediate servers that portal server is indicated by link information
The output port server of device connection;Accessing request information is sent to destination server by output port server;Wherein, in multiple middle clothes
Accessing request information is transmitted between business device to comprise the steps:The first intermediate server in multiple intermediate servers is believed from link
The socket of the second intermediate server as the first intermediate server next-hop is obtained in breath;First intermediate server is according to
The socket of two intermediate servers is set up with the second intermediate server and is connected;If the first intermediate server and the second intermediate server
Successful connection is set up, then the first intermediate server deletes the socket of the first intermediate server from link information, and will update
Link information and accessing request information afterwards is sent to the second intermediate server;Wherein, socket be IP address and port numbers or
For IP address.
Alternatively, between multiple intermediate servers, transmission accessing request information includes:If in the middle of first
Server and the second intermediate server set up connection failure, then the first intermediate server is obtained as in second from link information
Between server next-hop the 3rd intermediate server socket;Socket of first intermediate server according to the 3rd intermediate server
Word is set up with the 3rd intermediate server and is connected;If the first intermediate server and the 3rd intermediate server set up successful connection, the
One intermediate server deletes the socket of the first intermediate server and the second intermediate server from link information, and after updating
Link information and accessing request information be sent to the 3rd intermediate server.
According to the another aspect of the application, there is provided a kind of portal server, which includes:First transmission unit, for connecing
Accessing request information waiting for transmission is received, wherein, accessing request information is used for accessing the data on destination server;Acquiring unit,
For obtaining the link information between portal server and destination server, wherein, link information by the system that configures according to including
Portal server and destination server report in the interior webserver itself to other networks in webserver set
The delayed data of server and packet loss information are calculated;Second transmission unit, for according to link information by access request
Information is sent to destination server.
Alternatively, the portal server includes:3rd transmission unit, for receiving access waiting for transmission
Before solicited message, every predetermined period or meet predetermined under conditions of obtain portal server into webserver set
Other webservers delayed data and packet loss information, wherein, webserver set includes portal server and mesh
Server;Delayed data and packet loss information are sent to configuration system;4th transmission unit, returns for receiving configuration system
Link information between the portal server for returning and destination server;Wherein acquiring unit is used for obtaining portal server from local
Link information between destination server.
Alternatively, predetermined condition includes:The webserver receives the link letter of configuration system transmission
Breath obtains request.
Alternatively, acquiring unit includes:First transport module, sends for obtaining chain for configuring system
First request message of road information;Second transport module, for receiving the use that configuration system sends in response to the first request message
In the second request message for obtaining link information;3rd transport module, for sending out to configuration system in response to the second request message
The delayed data of other webservers in the portal server for sending to webserver set and packet loss information, wherein,
Webserver set includes portal server and destination server;4th transport module, for receiving the transmission of configuration system
According to the link information between delayed data and the calculated portal server of packet loss information and destination server.
By the technical scheme of the application, following beneficial effect can be reached:
1)From the global information for perceiving whole piece link, and according to getting the link information meter that each webserver is perceived
Link is calculated, such that it is able to more rationally using link circuit resource, accomplishing that the bandwidth usage of the whole network is maximized, increasing link utilization;
2)It is to parse to obtain from the link information of dynamically distributes for setting up the socket of connection, without carrying out
It is pre-configured with, so as to reduce the complexity of configuration, accelerates the transmission speed of data;
3)Destination server can be brought by the IP of portal server so that destination server can get netizen IP.
Certainly, the arbitrary product for implementing the application is it is not absolutely required to while reaching all the above advantage.
Embodiment 1
As shown in figure 1, including in the transmission network shown in the present embodiment:Portal server 102-1 and 102-2, centre
Server 106-1 to 106-3 and destination server 104.Portal server 102-1 and 102-2 can pass through intermediate server
Data access request is sent to corresponding destination server 104 by one or more in 106-1 to 106-3.Need explanation
It is that the transmission network shown in Fig. 1 is only a kind of example, the net between portal server, intermediate server and destination server
Network topological structure can also be other connected modes, and the present embodiment do not limited to the quantity of intermediate server, used as one
Optional implementation is planted, portal server directly can also be connected with destination server.
Based on the transmission network shown in Fig. 1, the present embodiment additionally provides a kind of optional data access method, below entering
Described as a example by mouth server 102-1, as shown in Fig. 2 the data access method includes but is not limited to following steps:
S202, portal server 102-1 receive accessing request information waiting for transmission, and wherein, above-mentioned accessing request information is used
Data on access destination server 104;
Optionally, above-mentioned accessing request information can include the web page address being input in terminal from user, for example,
www.baidu.com.Furthermore, it is possible to be the different portal server of different areal settings, for example, when the user in Guangzhou is at end
Web page address is input on end, then the accessing request information for carrying the web page address can be routed to and be arranged on entering for Guangzhou
On mouth server 102-1.
S204, portal server 102-1 obtain the link information between portal server 102-1 and destination server 104,
Wherein, link information by the system that configures according to report including the webserver including portal server and destination server from
The delayed data of other webservers in body to webserver set and packet loss information are calculated;
Used as a kind of optional mode, the link information between portal server 102-1 and destination server 104 is included most
Excellent link information, optionally, above-mentioned optimum link information can be the minimum link of jumping figure.
Used as a kind of optional mode, link information is obtained and be may include steps of:Get portal server 102-
1st, the link information of intermediate server 106-1 to 106-3 and destination server 104, and according to these link informations calculate into
Link information between mouth server 102-1 and destination server 104.Here, portal server 102-1, intermediate server
The link information of 106-1 to 106-3 and destination server 104 can be included but is not limited to:Each server is to other networks
Delayed data and packet loss information between server.
Optionally, it is assumed that the link between portal server 102-1 and destination server 104 is:Portal server 102-
1 intermediate server 106-1 intermediate server 106-2 destination servers 104.For above-mentioned link, above-mentioned link information
Can include but is not limited to:The socket of intermediate server 106-1, intermediate server 106-2 and intermediate server 106-2, this
In, socket includes:IP address and port numbers or IP address.
Above-mentioned accessing request information is sent to above-mentioned purpose according to above-mentioned link information by S206, portal server 102-1
Server 104.
Optionally, portal server 102-1 can be transferred to mesh through intermediate server 106-1, intermediate server 106-2
Server 104, or, be transferred to destination server 104 through intermediate server 106-1, intermediate server 106-3.Need
Illustrate, above-mentioned transmission path is only a kind of example, for different network topology structures, portal server 102-1 is to mesh
Server 104 between there may be different transmission paths.
As a kind of optional mode, after above-mentioned access request is completed, purpose is set up to by portal server 102-1 and is taken
Link connection between business device 104 will also be removed.
Used as another kind of optional mode, portal server 102-1 is obtaining portal server 102-1 and destination server
After link information between 104, portal server 102-1 can pre-build multiple full link connections, and be put into connection pool
Among, when access request is accessed, portal server 102-1 can take a connection having built up from connection pool, carry out
The transmission of data, as such, it is possible to reduce the time for setting up connection, plays the effect for accelerating transmission;When completing above-mentioned access request
Afterwards, set up by portal server 102-1 and will be also removed to the link connection destination server 104.And in connection pool with
Have a new connection to add among connection pool, use for follow-up access request.Additionally, when connection has time-out
Between, the time-out time is determined by destination server 104, connection time-out time within connection be all available, and when connection
Time-out, the connection will be removed from connection pool by active, be always ensured that connection is available in connection pool.
By above-described embodiment, from the global information for perceiving whole piece link, and according to getting each webserver sense
The link information that knows calculates link, such that it is able to more rationally using link circuit resource, accomplishing that the bandwidth usage of the whole network is maximized, increasing
Link utilization;Additionally, be to parse to obtain from the link information of dynamically distributes for setting up the socket of connection, without
It is pre-configured with, so as to reduce the complexity of configuration, is accelerated the transmission speed of data;Further, it is possible to by entrance
The IP of server brings destination server so that destination server can get netizen IP.
In order to obtain the link information of dynamically distributes, following several implementations are present embodiments provided:
1)As a kind of optional implementation, as shown in Figure 3 and Figure 4, in above-mentioned portal server 102-1 and 102-2
Before receiving accessing request information waiting for transmission, the data access method also includes:
S402, portal server 102-1 and 102-2 every predetermined period obtain itself into webserver set other
The delayed data of the webserver and packet loss information, and delayed data and packet loss information are sent to configuration system 302.Can
Choosing, webserver set can be included but is not limited to:Portal server 102-1 and 102-2, intermediate server 106-1 are extremely
106-3 and destination server 104.
For example, portal server 102-1 obtains following information every predetermined period:
A) delayed data of portal server 102-1 to intermediate server 106-1 and packet loss information;
B) delayed data of portal server 102-1 to intermediate server 106-2 and packet loss information;
C) delayed data of portal server 102-1 to intermediate server 106-3 and packet loss information;
D) delayed data of portal server 102-1 to destination server 104 and packet loss information.
S404, intermediate server 106-1 to 106-3 and destination server 104 obtain itself to network every predetermined period
The delayed data of other webservers and packet loss information in server set, and delayed data and packet loss information are sent
Give configuration system 302.
S406, configuration system 302 is according to receiving delayed data and packet loss information is calculated portal server 102-1
Believe to the link information between destination server 104 and portal server 102-2 to the link between destination server 104
Breath;
S408, portal server 102-1 receive portal server 102-1 and the destination server that configuration system 302 is returned
Link information between 104, portal server 102-2 receive portal server 102-2 and the purpose clothes that configuration system 302 is returned
Link information between business device 104.
Optionally, above-mentioned S402 and S404 can be executed simultaneously, or, execute in order.
In the present embodiment, above-mentioned portal server 102-1 and 102-2 is receiving entering for the above-mentioned return of configuration system 302
Link information and portal server 102-2 and destination server 104 between mouthful server 102-1 and destination server 104 it
Between link information after, during can preserve the link information to local memorizer, in order to receive data access
During request, the link information and entrance between portal server 102-1 and destination server 104 is obtained from local memorizer
Link information between server 102-2 and destination server 104.By above-described embodiment, believed according to the link of dynamically distributes
Breath, can faster obtain link information, improve access speed, more reasonably using link circuit resource.
2)As another kind of optional mode, as shown in figure 5, portal server 102-1 and 102-2 can also make a reservation for meeting
Under conditions of obtain itself to delayed data and the packet loss information of other webservers, including:
S502, portal server 102-1 and 102-2 receive the link information of the transmission of configuration system 302 and obtain request, use
Delayed data and packet loss information in acquisition itself to other webservers in webserver set.Optionally, network
Server set can be included but is not limited to:Portal server 102-1 and 102-2, intermediate server 106-1 to 106-3 and
Destination server 104.
Optionally, above-mentioned predetermined condition includes:Each webserver in webserver set receives above-mentioned
The link information that configuration system 302 sends obtains request, but the present embodiment is not limited only to a kind of this mode, can also include other
Predetermined condition.
For example, include receiving the chain that above-mentioned configuration system 302 sends under conditions of portal server 102-1 satisfactions are predetermined
Road information acquisition request:Obtain following information:
A) delayed data of portal server 102-1 to intermediate server 106-1 and packet loss information;
B) delayed data of portal server 102-1 to intermediate server 106-2 and packet loss information;
C) delayed data of portal server 102-1 to intermediate server 106-3 and packet loss information;
D) delayed data of portal server 102-1 to destination server 104 and packet loss information.
S504, intermediate server 106-1 to 106-3 and destination server 104 receive what the configuration system 302 sent
Link information obtains request, for obtaining itself to the delayed data and packet loss of other webservers in webserver set
Rate information.
For example, include receiving the chain that above-mentioned configuration system 302 sends under conditions of intermediate server 106-1 satisfactions are predetermined
Road information acquisition request:Obtain following information:
A) delayed data of intermediate server 106-1 to portal server 102-1 and packet loss information;
B) delayed data of intermediate server 106-1 to intermediate server 106-2 and packet loss information;
C) delayed data of intermediate server 106-1 to intermediate server 106-3 and packet loss information;
D) delayed data of intermediate server 106-1 to destination server 104 and packet loss information.
In the present embodiment, configuration system is received including the webserver including portal server 102-1 and 102-2
After 302 links for sending obtain request, itself is obtained to the delayed data of other webservers in webserver set
With packet loss information.
By above-described embodiment, configuration system obtains its own to webserver set from each webserver in time
In other webservers delayed data and packet loss information, link information at that time is calculated by above link data,
Achieve from the global information for perceiving whole piece link, conveniently realize real-time data access according to demand.
3)Used as another optional mode, in conjunction with shown in Fig. 6, portal server 102-1 and 102-2 obtain portal server
Link information between 102-1 and destination server 104 and the link between portal server 102-2 and destination server 104
Information includes:
S602, portal server 102-1 and 102-2 transmit the first request message to configuration system 302;Optionally, entrance
Server 102-1 and 102-2 the first request message of real-time Transmission, above-mentioned first request message are used for obtaining link information.
S604, after configuration system 302 receives the first transmission request, asks to portal server 102-1 in response to first
The second request message is transmitted with 102-2.Optionally, the second request message is used for obtaining portal server 102-1 and 102-2 to net
The delayed data of other webservers and packet loss information in network server set.
S606, after configuration system 302 receives the first transmission request, asks to intermediate server 106-1 in response to first
The second request message is transmitted to 106-3 and destination server 104.Optionally, the second request message is used for obtaining intermediate server
106-1 to 106-3 and the delayed data and packet loss of destination server 104 to other webservers in webserver set
Information.
As a kind of optional mode, after above-mentioned access request is completed, set up by portal server 102-1 and 102-2
To also be removed to the link connection between destination server 104.
Used as another kind of optional mode, portal server 102-1 is obtaining portal server 102-1 and destination server
Link information and portal server 102-2 between 104 is being obtained between portal server 102-2 and destination server 104
After link information, portal server 102-1 and 102-2 can pre-build multiple full link connections, and be put into each corresponding
Connection pool among, when access request is accessed, portal server 102-1 and 102-2 can take one from connection pool and build
The connection that has stood, carries out the transmission of data, as such, it is possible to reduce the time for setting up connection, plays the effect for accelerating transmission;When complete
Into after above-mentioned access request, set up to the link connection destination server 104 by portal server 102-1 and 102-2
To be removed.And have a new connection in connection pool immediately and add among connection pool, use for follow-up access request.
Additionally, connection has time-out time, the time-out time is determined by destination server 104, the connection within connection time-out time
All it is available, and when connection time-out, the connection will be removed from connection pool by active, being always ensured that in connection pool that connection is can
?.By above-described embodiment, portal server can be asked in real time when the data access request for carrying out self terminal is received
Obtain link information so that the link information of gained can be complete such that it is able to more rationally using link circuit resource, accomplish with real-time update
The bandwidth usage of net is maximized, and increases link utilization.
Below in conjunction with Fig. 7-Fig. 8, by taking portal server 102-1 as an example, portal server 102-1 is described according to above-mentioned chain
Above-mentioned accessing request information is sent to road information the scheme of the destination server 104.
Assume that link information indicates that portal server 102-1 to the link of destination server 104 is:Portal server 102-
1st, intermediate server 106-1, intermediate server 106-2, output port server 702, destination server 104.Based on the biography shown in Fig. 7
Defeated network understands that above-mentioned accessing request information is sent to the purpose clothes according to above-mentioned link information by portal server 102-1
Business device 104 comprises the steps:
S1:The intermediate server 106-1 and 106-2 that portal server 102-1 is indicated by link information is by above-mentioned access
Solicited message is sent to the output port server 702 being connected with destination server 104;In the present embodiment, output port server 702 can
To be considered as an intermediate server.
S2:Above-mentioned accessing request information is sent to destination server 104 by output port server 702.
Used as a kind of optional implementation of step S1, portal server 102-1 obtains intermediary service from link information
The socket of device 106-1, and the socket according to intermediate server 106-1 and intermediate server 106-1 set up and be connected.Work as connection
After being successfully established, link information and accessing request information are sent to intermediate server 106-1 by portal server 102-1.Then,
Intermediate server 106-1 obtains the intermediate server 106-2 as intermediate server 106-1 next-hops from above-mentioned link information
Socket;Intermediate server 106-1 is set up with intermediate server 106-2 according to the socket of intermediate server 106-2 and is connected.
Optionally, above-mentioned accessing request information includes TCP header(TCP header)With TCP main bodys(TCP body), form
As shown in table 1:
Table 1
Optionally, it is assumed that link is portal server 102-1 intermediate server 106-1 intermediate server 106-
2 output port server, 702 destination server 104, then link information include following form:
^^^ portal servers 102-1 monitors socket+intermediate server 106-1 and monitors socket+intermediate server 106-
2 sockets+output port server, 702 socket # destination servers 104 monitor socket@load balancing mode $ $ $
For example:
^^^192.168.100.166:80+192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
Optionally, while the connection that sets up between server, client ip and link information are assembled into metadata, should
Metadata using " ^^^ " as beginning label, using " " as end mark, after User IP with " * " distinguish, middle socket it
Between with "+" connect, between output port server 702 and destination server 104 with " # " distinguish, "@" is followed by load balancing mode.False
If link is 702 destination server 104 of intermediate server 106-1 intermediate server 106-2 output port servers,
Metadata form is expressed as follows:
^^^ User IP * intermediate servers 106-1 monitors socket+intermediate server 106-2 sockets+output port server
702 socket # destination servers 104 monitor socket@load balancing mode $ $ $
For example:
^^^192.168.100.112*192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
Optionally, portal server 102-1 by metadata be inserted into access request TCP header and TCP body it
Between.For example, metadata is:
^^^192.168.100.112*192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
Then metadata can be as shown in table 2 below with the relation of TCP header and TCP body:
Table 2
If the next-hop of portal server 102-1 is exactly destination server 104, then avoid the need for encapsulating first number again
According to.
Optionally, if intermediate server 106-1 and intermediate server 106-2 sets up successful connection, intermediate server
106-1 deletes the socket of intermediate server 106-1 from link information, and by renewal after link information and above-mentioned access please
Information is asked to be sent to intermediate server 106-2.In the present embodiment, above-mentioned socket can be included but is not limited to:IP address and
Port numbers or IP address.
For example, link is 702 mesh of intermediate server 106-1 intermediate server 106-2 output port servers
Server 104, the metadata form of transmission is as follows:
^^^192.168.100.112*192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
If intermediate server 106-1 and intermediate server 106-2 sets up successful connection, metadata information is changed, is removed
Then metadata+client ip is transmitted to back-end server, the metadata that intermediate server 106-1 sends by itself socket
Information format is as follows:
^^^192.168.100.112*192.168.100.180:65332+192.168.100.191:65331#
192.168.100.194:80@cip$$$
If intermediate server 106-2 sets up successful connection with output port server 702, intermediate server 106-2 sends
Metadata information form is as follows:
^^^192.168.100.112*192.168.100.191:65331#192.168.100.194:80@cip$$$
Until destination server 104, link information will be deleted, retain client ip and be sent to destination server 104,
Form such as table 3 below:
Table 3
Optionally, if intermediate server 106-1 and intermediate server 106-2 sets up connection failure, intermediate server
106-1 obtains the socket of the output port server 702 as intermediate server 106-2 next-hops from above-mentioned link information;In
Between server 106-1 set up with output port server 702 according to the socket of output port server 702 and be connected.
For example, intermediate server 106-1 is set up with output port server 702 by intermediate server 106-3 and is connected(Such as Fig. 8
Shown in dotted line).Optionally, if intermediate server 106-1 and 106-3 set up connection failure, intermediate server 106-1 is from above-mentioned
The socket of the output port server 702 as intermediate server 106-3 next-hops is obtained in link information;If intermediate server
106-1 sets up successful connection with output port server 702, then intermediate server 106-1 deletes middle clothes from above-mentioned link information
Business device 106-1 and intermediate server 106-3 socket, and by renewal after link information and above-mentioned accessing request information send
Give output port server 702.In the present embodiment, above-mentioned socket can be included but is not limited to:IP address and port numbers or IP ground
Location.
For example, it is assumed that link is:Intermediate server 106-1 intermediate server 106-3 output port servers
702 destination servers 104, the metadata form of transmission are as follows:
^^^192.168.100.112*192.168.100.116:65330+192.168.100.190:65333+
192.168.100.191:65331#192.168.100.194:80@cip$$$
If intermediate server 106-1 and intermediate server 106-3 sets up connection failure, intermediate server 106-3 is skipped
Socket, set up with the socket of next-hop socket output port server 702 and be connected, intermediate server 106-1 will be from above-mentioned
In link information delete intermediate server 106-1 and intermediate server 106-3 socket, and by renewal after link information and
Above-mentioned accessing request information is sent to output port server 702, and the metadata form of transmission is as follows:
^^^192.168.100.112*192.168.100.191:65331#192.168.100.194:80@cip$$$
After output port server 702 receives link information and above-mentioned accessing request information after updating, from above-mentioned chain
The socket of the destination server 104 as 702 next-hop of output port server is obtained in the information of road;702 basis of output port server
The socket of destination server 104 is set up with destination server 104 and is connected;If output port server 702 and destination server 104
Connection establishment success, then output port server 702 accessing request information is sent to destination server 104.That is, going out oral
Link information for network transmission will not be sent to destination server 104 by business device 702.
By above-described embodiment, it is to parse to obtain from the link information of dynamically distributes for setting up the socket of connection
, without being pre-configured with, so as to reduce the complexity of configuration, accelerate the transmission speed of data;Further, may be used
To bring destination server by the IP of portal server so that destination server can get netizen IP.
Embodiment 2
A kind of portal server is present embodiments provided, by taking portal server 102-1 as an example, as shown in figure 9, the present embodiment
In portal server 102-1 include:
1)First transmission unit 802:For receiving accessing request information waiting for transmission, wherein, above-mentioned accessing request information
For accessing the data on destination server;
2)Acquiring unit 804:For obtaining the link information between above-mentioned portal server and above-mentioned purpose server, its
In, link information by the system that configures according to report including the webserver including portal server and destination server itself
The delayed data of other webservers into webserver set and packet loss information are calculated;
3)Second transmission unit 806:For above-mentioned accessing request information is sent to above-mentioned mesh according to above-mentioned link information
Server.
As a kind of optional mode, by taking portal server 102-1 as an example, after above-mentioned access request is completed, by entrance
Server 102-1 sets up and will also be removed to the link connection between destination server 104.
As another kind of optional mode, by taking portal server 102-1 as an example, portal server 102-1 is obtaining entrance
After link information between server 102-1 and destination server 104, portal server 102-1 can pre-build multiple complete
Whole link connection, and be put among connection pool, when access request is accessed, portal server 102-1 can take one from connection pool
The individual connection having built up, carries out the transmission of data, as such, it is possible to reduce the time for setting up connection, plays and accelerates transmission
Effect;After above-mentioned access request is completed, set up to the link connection destination server 104 by portal server 102-1
To also be removed.And have a new connection in connection pool immediately and add among connection pool, make for follow-up access request
With.Additionally, connection has time-out time, the time-out time is determined by destination server 104, the company within connection time-out time
It is all available to connect, and when connection time-out, the connection will be removed from connection pool by active, is always ensured that connection is in connection pool
Available.
In embodiments of the present invention, portal server 102-1 is received by the first transmission unit 802 and is taken for accessing purpose
The accessing request information of the data on business device 104, and being used for by 302 dynamically distributes of configuration system is obtained by acquiring unit 804
Above-mentioned link information between above-mentioned portal server 102-1 and above-mentioned purpose server 104, then, by the second transmission unit
Above-mentioned accessing request information is sent to above-mentioned purpose server 104 according to above-mentioned link information by 806.Optionally, above-mentioned link
Information can be included but is not limited to:The socket of intermediate server 106-1, intermediate server 106-2 and intermediate server 106-2
Word, here, socket includes:IP address and port numbers or IP address.
By above-described embodiment, by the link information of configuration system dynamics distribution, it is possible to reduce the complexity of configuration, accelerate
Transmission speed to dynamic content.
Alternatively, still by taking portal server 102-1 as an example, as shown in Figure 10, above-mentioned portal server
102-1 also includes:
1)3rd transmission unit 902, for before above-mentioned accessing request information waiting for transmission is received, every predetermined period
Or meet predetermined under conditions of obtain prolonging for other webservers in above-mentioned portal server to webserver set
When information and packet loss information, wherein, above-mentioned webserver set includes above-mentioned portal server and above-mentioned purpose server;
Above-mentioned delayed data and above-mentioned packet loss information are sent to above-mentioned configuration system;
2)4th transmission unit 904, for receiving above-mentioned portal server and the above-mentioned purpose that above-mentioned configuration system is returned
Above-mentioned link information between server, wherein, above-mentioned link information is by above-mentioned configuration system according to above-mentioned delayed data and upper
State packet loss information to be calculated;
Wherein, above-mentioned acquiring unit is used for from locally obtaining between above-mentioned portal server and above-mentioned purpose server
State link information.
In an embodiment of the present invention, before above-mentioned accessing request information waiting for transmission is received, portal server 102-1
The 3rd transmission unit 902 every predetermined period obtain or meet predetermined under conditions of obtain above-mentioned portal server 102-1
Delayed data and packet loss information to intermediate server 106-1 to 106-3 or destination server 104;Will be acquired above-mentioned
Delayed data and packet loss information are sent to configuration system 302, and the 4th transmission unit 904 receives configuration system 302 according to above-mentioned
Data calculate link information, and are sent to portal server 102-1.
Alternatively, above-mentioned predetermined condition includes:The above-mentioned webserver receives above-mentioned configuration system
302 link informations for sending obtain request.
In an embodiment of the present invention, portal server 102-1 also can receive the link letter of the transmission of configuration system 302
Breath request, in response to the request, sends above-mentioned delayed data and packet loss information to configuration system 302.
By above-described embodiment, during data access, can in advance from global periodically or with predetermined condition perception whole piece
The information of link, coordinates link detection and link calculation server, more rationally using link circuit resource can accomplish the bandwidth of the whole network
Using maximization, increase link utilization.
Alternatively, as shown in figure 11, above-mentioned acquiring unit 804, including:
1)First transport module 1002, sends for above-mentioned configuration system and asks for obtaining the first of above-mentioned link information
Message;
2)Second transport module 1004, for receiving the use that above-mentioned configuration system sends in response to above-mentioned first request message
In the second request message for obtaining link information;
3)3rd transport module 1006, in response to above-mentioned second request message to above-mentioned configuration system send above-mentioned
The delayed data of other webservers in portal server to webserver set and packet loss information, wherein, above-mentioned
Webserver set includes above-mentioned portal server and above-mentioned purpose server;
4)4th transport module 1008, for receiving that above-mentioned configuration system sends according to above-mentioned delayed data and above-mentioned losing
Above-mentioned link information between the calculated above-mentioned portal server of bag rate information and above-mentioned purpose server.
As a kind of optional mode, by taking portal server 102-1 as an example, after above-mentioned access request is completed, by entrance
Server 102-1 sets up and will also be removed to the link connection between destination server 104.
As another kind of optional mode, by taking portal server 102-1 as an example, portal server 102-1 is obtaining entrance
After link information between server 102-1 and destination server 104, portal server 102-1 can pre-build multiple complete
Whole link connection, and be put among connection pool, when access request is accessed, portal server 102-1 can take one from connection pool
The individual connection having built up, carries out the transmission of data, as such, it is possible to reduce the time for setting up connection, plays and accelerates transmission
Effect;After above-mentioned access request is completed, set up to the link connection destination server 104 by portal server 102-1
To also be removed.And have a new connection in connection pool immediately and add among connection pool, make for follow-up access request
With.Additionally, connection has time-out time, the time-out time is determined by destination server 104, the company within connection time-out time
It is all available to connect, and when connection time-out, the connection will be removed from connection pool by active, is always ensured that connection is in connection pool
Available.
In embodiments of the present invention, portal server 102-1 is from the first transport module 1002 to above-mentioned configuration system 302
The first request message is sent, for obtaining link information;Above-mentioned portal server 102-1 is received above-mentioned by the second transport module 1004
The second request message for obtaining link information that configuration system 302 is sent in response to above-mentioned first request message, for obtaining
Take link information;The 3rd transport modules 1006 of portal server 102-1 in response to the second request message, to above-mentioned configuration system
302 send in the webserver set for itself extremely including the first intermediate server 106-1 to 106-3 or destination server 104
Other webservers delayed data and packet loss information;Link data of the above-mentioned configuration system 302 according to above-mentioned acquisition
Link information is calculated, and is sent to portal server 102-1, received by the 4th transport module 1008.
Optionally, above-mentioned accessing request information includes TCP header(TCP header)With TCP main bodys(TCP body), form
As shown in table 4:
Table 4
Optionally, it is assumed that link is portal server 102-1 intermediate server 106-1 intermediate server 106-
2 output port server, 702 destination server 104, then link information include following form:
^^^ portal servers 102-1 monitors socket+intermediate server 106-1 and monitors socket+intermediate server 106-
2 sockets+output port server, 702 socket # destination servers 104 monitor socket@load balancing mode $ $ $
For example:
^^^192.168.100.166:80+192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
Optionally, while the connection that sets up between server, client ip and link information are assembled into metadata, should
Metadata using " ^^^ " as beginning label, using " " as end mark, after User IP with " * " distinguish, middle socket it
Between with "+" connect, between output port server 702 and destination server 104 with " # " distinguish, "@" is followed by load balancing mode.False
If link is 702 destination server 104 of intermediate server 106-1 intermediate server 106-2 output port servers,
Metadata form is expressed as follows:
^^^ User IP * intermediate servers 106-1 monitors socket+intermediate server 106-2 sockets+output port server
702 socket # destination servers 104 monitor socket@load balancing mode $ $ $
For example:
^^^192.168.100.112*192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
Optionally, portal server 102-1 by metadata be inserted into access request TCP header and TCP body it
Between.For example, metadata is:
^^^192.168.100.112*192.168.100.116:65330+192.168.100.180:65332+
192.168.100.191:65331#192.168.100.194:80@cip$$$
Then metadata can be as shown in table 5 below with the relation of TCP header and TCP body:
Table 5
If the next-hop of portal server 102-1 is exactly destination server 104, then avoid the need for encapsulating first number again
According to.
By above-described embodiment, from the global information for perceiving whole piece link, and according to getting each webserver sense
The link information that knows calculates link, such that it is able to more rationally using link circuit resource, accomplishing that the bandwidth usage of the whole network is maximized, increasing
Link utilization;Additionally, be to parse to obtain from the link information of dynamically distributes for setting up the socket of connection, without
It is pre-configured with, so as to reduce the complexity of configuration, is accelerated the transmission speed of data;Further, it is possible to by entrance
The IP of server brings destination server so that destination server can get netizen IP.
Obviously, those skilled in the art should be understood that each module or each step of above-mentioned the application can be with general
Computing device realizing, they can be concentrated on single computing device, or are distributed in multiple computing devices and are constituted
Network on, alternatively, they can be realized with the executable program code of computing device, it is thus possible to they are stored
Executed by computing device in the storage device, and in some cases, can be executed with the order being different from herein shown
The step of going out or describe, or they are fabricated to each integrated circuit modules respectively, or by the multiple modules in them or
Step is fabricated to single integrated circuit module to realize.So, the application is not restricted to any specific hardware and software combination.
The preferred embodiment of the application is the foregoing is only, the application is not limited to, for the skill of this area
For art personnel, the application can have various modifications and variations.All within spirit herein and principle, made any repair
Change, equivalent, improvement etc., should be included within the protection domain of the application.