Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, the embodiment of the present invention provides the data transmission method in a kind of CDN network, comprising:
Step 11, receive multiple HTTP request messages.
Step 12, obtain the data that multiple HTTP request messages are asked.
Step 13, by response message, send the data that multiple HTTP request messages are asked, wherein, the sequencing that sends the data that multiple HTTP request messages ask is corresponding to the sequencing that gets the data that multiple HTTP request messages ask.
The executive agent of the data transmission method in embodiment of the present invention CDN network can be the network node in CDN network, and described network node can comprise: Area Node or Centroid.Area Node, Centroid are for store network data.Centroid is as the upper layer node of Area Node, and a Centroid can connect multiple Area Nodes.Optionally, between fringe node (can be Edge Server) and Centroid, can there is multistage Area Node, thus satisfied service needed.
Wherein, in an embodiment of the present invention, if receive multiple HTTP request messages, so when step 13 sends the data that multiple HTTP request messages ask, can be the data that got multiple HTTP request messages, also can be to have got the data that wherein several (can be 1 here, can be also wherein several) HTTP request message is asked.Then, when sending the data that got, obtain the data that other HTTP request messages are asked simultaneously.Such as: received altogether 5 HTTP request messages, can send data getting after the data that 5 HTTP request messages ask so, can be also just to send data obtaining after the data of asking at 1 (can be also 2,3 or 4 here) HTTP request message.
Below, the data transmission method in simple declaration embodiment of the present invention CDN network:
When terminal use clicks after the connection of certain content on website, corresponding HTTP request is routed on Edge Server, when Edge Server inspection self does not have content that buffer memory terminal asks, to CDN routing device, inquire about the Area Node of data or the address information of Centroid that have preservation to ask, CDN routing device returns to the Area Node of data or the address information of Centroid that preservation is asked to some extent, as IP address or domain name.Wherein, the address information of Area Node or Centroid comprises domain name or IP address.When address information is domain name, Edge Server is resolved and is obtained corresponding IP address by DNS (Domain Name System, domain name system), and therefore not to repeat here.
Afterwards, Edge Server is asked to preserving Area Node or the Centroid request msg of the content of request to some extent by HTTP, thereby, enter step 11 Area Node or Centroid and receive multiple HTTP request messages that Edge Server sends, enter again step 12 Area Node or Centroid and obtain the data that multiple HTTP request messages are asked, then enter step 13 Area Node or Centroid sends by response message the data that HTTP request message is asked.
The technical scheme being provided by the embodiment of the invention described above can be found out, sequencing by sending the data that multiple HTTP request messages ask is corresponding to the sequencing that gets the data that multiple HTTP request messages ask, realize the high priority data transmission of the HTTP request first getting, can improve the efficiency of transmission of data.
Data transmission method in embodiment of the present invention CDN network, is also applicable to the transfer of data between Area Node and Centroid, transfer of data between Edge Server and other Edge Servers, transfer of data between Area Node and other Area Nodes.
Below only take Edge Server and network node as example, the data transmission method in embodiment of the present invention CDN network is described.
Data transmission method in embodiment of the present invention CDN network, in step 11 and step 13, network node can pass through TCP (Transmission Control Protocol, transmission control protocol) connect the HTTP request message that receives Edge Server transmission, and send response message to Edge Server.
Concrete, network node can respond 1 or many TCP connection requests of Edge Server, and between Edge Server, sets up 1 or many TCP and be connected.Wherein, many TCP connections can be understood as at least two TCP and connect, and multiple HTTP request messages can be understood as at least two HTTP request messages.
Exemplary, at CDN routing device, to Edge Server, return after the address information of network node of the data that preservation asks to some extent, whether Edge Server inspection has existed the TCP of map network address of node information to connect, if there is no, Edge Server can ask to set up many TCP between network node and is connected.Like this, many TCP connection requests of network node response Edge Server, and between Edge Server, set up many TCP and be connected.
Wherein, the number that the TCP between network node and Edge Server is connected, can determine as required.
When the TCP between Edge Server and network node is connected to one, in HTTP request message, carry stream index indication X-Flow-Index, in response message corresponding to HTTP request message, carry stream index indication X-Flow-Index, wherein, stream index indication X-Flow-Index is for identifying the request content of HTTP request message.
Visible, the value of stream index indication X-Flow-Index in the response message of network node, the value of middle stream index indication X-Flow-Index correspondence and in HTTP request message Edge Server is consistent, and HTTP request message and response message do not need strict rank preservation.And, Edge Server is received after the response message of network node, according to stream index indication, X-Flow-Index can be associated with HTTP request message, thereby it is upper to be associated with terminal use, and final Edge Server consigns to terminal use by the data of returning from network node.
When the TCP between Edge Server and network node is connected to many, in HTTP request message, carry stream index indication X-Flow-Index and join index indication X-Connection-Index, in response message corresponding to HTTP request message, carry stream index indication X-Flow-Index and join index indication X-Connection-Index, wherein, stream index indication X-Flow-Index is for identifying the request content of HTTP request message, and join index indication X-Connection-Index connects for the TCP that identifies the use of HTTP request message.
Visible, each HTTP request of successively initiating in same TCP connection is consistent in the value of join index indication X-Connection-Index.Therefore, HTTP request message and response message do not need strict rank preservation, and HTTP request message can not be connected at same TCP with response message, realizes the transmission of parallel data, makes full use of TCP bandwidth.
Also be noted that in step 12, it is different that network node obtains the time delay that each HTTP asks corresponding data, for example, the HTTP request that network node first receives, the HTTP acquisition request receiving after may being later than is to data.
Therefore,, when the TCP between Edge Server and network node is connected to many, the data transmission method in embodiment of the present invention CDN network can also comprise:
The current propagation delay time that network node connects according to many TCP, selects the TCP of propagation delay time minimum to connect the data that transmission HTTP request message is asked.
Wherein, network node is determined the mode of the propagation delay time of TCP connection, can comprise:
Propagation delay time refers to wait for that TCP connects the idle wait time delay that sends data, and network node can connect data volume waiting for transmission according to TCP and be connected the propagation delay time that bandwidth determines that TCP connects with TCP.Concrete, determine that the concrete mode of the propagation delay time of TCP connection can be understood with reference to current general prior art, therefore not to repeat here.
Visible, based on existing many TCP to connect between Edge Server and network node, network node asks the sequencing of corresponding data to respond HTTP request according to obtaining each HTTP, and the TCP that selects current propagation delay time minimum connects the data that transmission HTTP request message is asked, and, HTTP request message and response message have all been expanded stream index indication X-Flow-Index and join index indication X-Connection-Index, HTTP request message and response message do not need strict rank preservation, HTTP request message can not be connected at same TCP with response message.For example, there are 2 terminal uses to same Edge Server request content simultaneously, Edge Server can be according to Pipeline (pipeline) mode, without the response data of waiting for network node, Edge Server is directly initiated continuously request in multiple TCP connections, then asynchronous reception response data from multiple TCP, can realize the transmission of parallel data, makes full use of TCP bandwidth.
Data transmission method in embodiment of the present invention CDN network, can also comprise:
When TCP is connected to many, if minimum transfer time delay is greater than the time delay of setting up new TCP connection in the current propagation delay time of many TCP connections, network node is set up new TCP connection;
Or, when TCP is connected to one, if being greater than, the current propagation delay time that TCP connects sets up the time delay that new TCP connects, and network node is set up new TCP connection.
Concrete, network node can detect the bandwidth that every TCP connects in real time, if got certain HTTP, ask corresponding data, but, need to wait for when the TCP connection free time of setting up before sends data, network node is according to the propagation delay time of current transmission bandwidth and every TCP of transmission data prediction, the TCP that determines minimum transfer time delay connects, and according to newly setting up to Edge Server RTT (Round-Trip Time, round-trip delay) prediction the time delay that TCP connects:
If minimum transfer time delay is less than, newly set up the time delay that TCP connects, maintain current TCP and connect the stable of number, the TCP setting up before still etc. to be used connects to transmit data.
If minimum transfer time delay is greater than, newly set up the time delay that TCP connects, network node is initiatively set up TCP connection to Edge Server.
Therefore, the TCP that network node can initiatively be established to Edge Server connects, and has improved the response speed of CDN to terminal use's request, has promoted QoE (Quality of Experience, Quality of experience).
Wherein, network node can initiatively be established to by the response message of response HTTP request the TCP connection of Edge Server, or by HTTP POST mode, is initiatively established to the TCP connection of Edge Server.And, in POST message, carry X-Flow-Index and X-Connection-Index header field, for being associated with HTTP request message before.
Wherein, the TCP number of connection that network node at most can Dynamic Establishing to each Edge Server can be set, thereby limit the TCP number of connection that each network node and Edge Server need to be safeguarded.
Data transmission method in embodiment of the present invention CDN network, can also comprise:
When the current propagation delay time that connects as many TCP is identical, connect the sequencing of setting up according to TCP, the TCP that selects first to set up connects and sends the data that HTTP request message is asked.
Therefore, the preferential data of selecting the TCP setting up at first to connect transmission request of network node, newly-established TCP connects and can be reclaimed gradually, thereby reduces the TCP linking number that needs maintenance, has reduced Edge Server, network node and need to safeguard the expense that a large amount of TCP connect simultaneously.
Data transmission method in embodiment of the present invention CDN network, can also comprise:
Monitor many TCP and connect the quantity that sends response message, when the quantity of transmission response message is less than predetermined threshold or does not send response message, delete corresponding TCP and connect.
Actual the making for monitoring each the response message quantity in TCP connection visible, network node can connect according to TCP.If the response message number in certain TCP connection is less than the threshold value of appointment, or the response message number in certain TCP connection is less than the threshold value of appointment with respect to the response message number in other TCP connection, illustrate this TCP connect the network path status transmission of process bad, network node can dynamically be deleted this TCP and connect, and re-establishes new TCP and connects.
In addition, between certain Area Node that Edge Server may and connect before, no longer include flow, therefore, network node can be monitored the flow in each the TCP connection of having set up.If all there is no flow after the duration that continues to specify to each TCP connection of certain IP address, Edge Server is deleted all connections of this IP address, reduces the TCP number of connection that needs maintenance.
Also be noted that, data transmission method in embodiment of the present invention CDN network, for network node, if the content of asking has been kept in the storage mediums such as internal memory or hard disk, network node can directly obtain from this locality, otherwise network node can adopt and obtain the similar mode of content with Edge Server and obtain asked content from the network node on upper strata, and therefore not to repeat here.
As shown in Figure 2, corresponding to the data transmission method in the CDN network of above-described embodiment, the embodiment of the present invention provides a kind of network node, comprising:
Request reception unit 21, for receiving multiple http hypertext transfer protocol request messages.
Acquiring unit 22, the data of asking for obtaining multiple HTTP request messages.
Transmission unit 23, for getting the data that HTTP request message is asked, by response message, send the data that HTTP request message is asked, wherein, the sequencing that sends the data that multiple HTTP request messages ask is corresponding to the sequencing that gets the data that multiple HTTP request messages ask.
Wherein, many TCP connections can be understood as at least two TCP and connect, and multiple HTTP request messages can be understood as at least two HTTP request messages.
Above-mentioned network node can comprise: Area Node or Centroid.Area Node, Centroid are for store network data.Optionally, between Edge Server and Centroid, can there is multistage Area Node, thus satisfied service needed.
The technical scheme being provided by the embodiment of the invention described above can be found out, sequencing by sending the data that multiple HTTP request messages ask is corresponding to the sequencing that gets the data that multiple HTTP request messages ask, realize the high priority data transmission of the HTTP request first getting, can improve the efficiency of transmission of data.
As shown in Figure 3, embodiment of the present invention network node, can also comprise:
Identify unit 31, when receiving HTTP request message and sending response message for connecting by tcp transmission control protocol, when TCP is connected to one, in HTTP request message, carry stream index indication X-Flow-Index, in response message corresponding to HTTP request message, carry stream index indication X-Flow-Index, wherein, stream index indication X-Flow-Index is for identifying the request content of HTTP request message;
When TCP is connected to many, in HTTP request message, carry stream index indication X-Flow-Index and join index indication X-Connection-Index, in response message corresponding to HTTP request message, carry stream index indication X-Flow-Index and join index indication X-Connection-Index, wherein, stream index indication X-Flow-Index is for identifying the request content of HTTP request message, and join index indication X-Connection-Index connects for the TCP that identifies the use of HTTP request message.
Therefore each HTTP request of, successively initiating in same TCP connection is consistent in the value of join index indication X-Connection-Index.Edge Server is received after the response message of network node, according to stream index indication X-Flow-Index and join index indication X-Connection-Index, can be associated with HTTP request message, thereby it is upper to be associated with terminal use, final Edge Server consigns to terminal use by the data of returning from network node.
Embodiment of the present invention network node, can also comprise:
The first selected cell 32, for when TCP is connected to many, the current propagation delay time connecting according to many TCP, selects the TCP of propagation delay time minimum to connect the data that transmission HTTP request message is asked.
To sum up, because HTTP request message and response message have all been expanded stream index indication X-Flow-Index and join index indication X-Connection-Index, HTTP request message and response message do not need strict rank preservation.For example, there are 2 terminal uses to same Edge Server request content simultaneously, Edge Server can be according to Pipeline mode without the response data of waiting for network node, without the response data of waiting for network node, Edge Server is directly initiated continuously request in multiple TCP connections, then asynchronous reception response data from multiple TCP, can realize the transmission of parallel data, makes full use of TCP bandwidth.
Embodiment of the present invention network node, can also comprise:
First sets up unit 33, and for when TCP is connected to many, in the current propagation delay time of many TCP connections, minimum transfer time delay is greater than the time delay of setting up new TCP connection, sets up new TCP and connects; Or when TCP is connected to one, the current propagation delay time that TCP connects is greater than sets up the time delay that new TCP connects, and sets up new TCP and connects.
Therefore, the TCP that network node can initiatively be established to Edge Server connects, and improves the transmission speed of data.Network node can initiatively be established to by the response message of response HTTP request the TCP connection of Edge Server, or by HTTP POST mode, is initiatively established to the TCP connection of Edge Server.And, in POST message, carry X-Flow-Index and X-Connection-Index header field, for being associated with HTTP request message before.
And, the TCP number of connection that network node at most can Dynamic Establishing to each Edge Server can be set, thereby limit the TCP number of connection that each network node and Edge Server need to be safeguarded.
Embodiment of the present invention network node, can also comprise:
The second selected cell 34, when identical for the current propagation delay time that connects as many TCP, connects the sequencing of setting up according to TCP, the TCP that selects first to set up connects and sends the data that HTTP request message is asked.
Therefore, the preferential data of selecting the TCP setting up at first to connect the request of transmission of network node, the first TCP that sets up unit connects and can be reclaimed gradually, thereby reduces the TCP linking number that needs maintenance.
Embodiment of the present invention network node, can also comprise:
Monitoring means 35, connects for monitoring many TCP the quantity that sends response message, when the quantity of transmission response message is less than predetermined threshold or does not send response message, deletes corresponding TCP and connects.
Visible, between certain Area Node that Edge Server may and connect before, no longer include flow, therefore, network node can be monitored the flow in each the TCP connection of having set up.If all there is no flow after the duration that continues to specify to each TCP connection of certain IP address, Edge Server is deleted all connections of this IP address, reduces the TCP number of connection that needs maintenance.
The technical scheme being provided by the embodiment of the invention described above can be found out, between Edge Server and network node, safeguard that many TCP connect, network node is received after multiple HTTP request messages of Edge Server transmission, the data that first get which HTTP request are just first transmitted the data of this HTTP request in the TCP of time delay minimum connection, realize the transmission of parallel data, and make full use of TCP bandwidth.
As shown in Figure 4, the embodiment of the present invention provides the data transmission method in a kind of CDN network, comprising:
Step 41, determine between network node whether set up TCP and be connected.
Step 42, determine between network node and not do not set up and have TCP to be connected, many TCP that set up between network node are connected, by many multiple HTTP request messages of TCP connection transmission.
Step 43, by many TCP, connect and receive the response message that network nodes send, obtain the response data of HTTP request message.
Wherein, the executive agent of the data transmission method in embodiment of the present invention CDN network can be fringe node, fringe node can be Edge Server, and many TCP connections can be understood as at least two TCP and connect, and multiple HTTP request messages can be understood as at least two HTTP request messages.
Above-mentioned network node can comprise: Area Node or Centroid.Area Node, Centroid are for store network data.Optionally, between fringe node and Centroid, can there is multistage Area Node, thus satisfied service needed.
The technical scheme being provided by the embodiment of the invention described above can be found out, between fringe node and network node, safeguard that many TCP connect, network node is received after multiple HTTP request messages of fringe node transmission, realizes the transmission of parallel data, makes full use of TCP bandwidth.
Particularly, the data transmission method in embodiment of the present invention CDN network:
At CDN routing device, to fringe node, return after the Area Node of data or the address information of Centroid (address information can comprise domain name or IP address) that preservation asks to some extent, enter step 41.
Particularly, step 41, can comprise:
Whether fringe node inspection has existed the TCP of corresponding IP address to connect.
And if between corresponding IP address, existed TCP to connect, fringe node directly connects transmission HTTP request message by TCP.
And if between corresponding IP address not TCP connect, enter step 42.
Particularly, step 42, can comprise:
Between fringe node and corresponding IP address, do not exist TCP to connect, fringe node is set up corresponding TCP linking number according to configuration requirement.For example default configuration need to be set up 2 TCP and connect, and fringe node is initiatively established to 2 TCP connections of corresponding IP address.
Fringe node can connect by TCP of polling, in this TCP connection, to Area Node layer or Centroid, submits HTTP request message to.Meanwhile, in this HTTP request message, carry stream index indication X-Flow-Index and join index indication X-Connection-Index.Stream index indication X-Flow-Index, for identifying the request content of HTTP request message, join index indication X-Connection-Index, the TCP connection of using for identifying HTTP request message.
Thereby, the data that network node can select transmission HTTP request message to ask by many TCP.Enter step 43, fringe node is connected and is received the response message that network node sends by many TCP, obtains the response data of HTTP request message.Meanwhile, in this response message, carry stream index indication X-Flow-Index and join index indication X-Connection-Index.
If network node selects the TCP of propagation delay time minimum to connect the data that transmission HTTP request message is asked, in step 43, the TCP of the propagation delay time minimum during fringe node connects by many TCP connects the response message that receives network node transmission, obtains the response data of HTTP request message.
Finally, fringe node is received the response message that network node sends, according to the stream index indication X-Flow-Index of response message and join index indication X-Connection-Index, can be associated with HTTP request message, thereby be finally associated with terminal use, the data of returning from network node are consigned to terminal use.
Because HTTP request message and response message have all been expanded stream index indication X-Flow-Index and join index indication X-Connection-Index, HTTP request message and response message do not need strict rank preservation.For example, there are 2 terminal uses to same Area Node request content simultaneously, fringe node can be according to Pipeline mode the response data without waiting area node, without the response data of waiting for network node, fringe node is directly initiated continuously request in multiple TCP connections, then asynchronous reception response data from multiple TCP, can realize the transmission of parallel data, makes full use of TCP bandwidth.
Optionally, whether fringe node can also determine the data buffer storage that consigns to terminal use in this locality according to temperature replace Algorithm, thereby fringe node is follow-up other-end user's identical service request service.Temperature replace Algorithm, as LRU (Least Recently Used, least recently used) algorithm, etc.
Data transmission method in the CDN network of the embodiment of the present invention, can also comprise:
Monitor many TCP and connect the quantity of received response message, when the quantity of the response message connecting as TCP is less than predetermined threshold, deletes corresponding TCP and connect.
Or, monitor many TCP and connect, on connecting, TCP there is no flow, and delete corresponding TCP and connect.
Concrete, actual the making for monitoring response message quantity received from each TCP connection that fringe node connects according to TCP.If the response message number of receiving in certain TCP connection is less than the threshold value of appointment, or the response message number of receiving in the TCP connection of the response message number of receiving in certain TCP connection with respect to other is less than the threshold value of appointment, illustrate this TCP connect the network path status transmission of process bad, fringe node can dynamically be deleted this TCP and connect, and re-establishes new TCP and connects.
And, may adjust after routing policy at CDN routing server, between fringe node and certain Area Node of having connected before, no longer include flow, therefore fringe node need to be monitored the flow in each the TCP connection of having set up.If all there is no flow after the duration that continues to specify to each TCP connection of certain IP address, fringe node is deleted all connections of this IP address, reduces the TCP number of connection that needs maintenance.
As shown in Figure 5, the data transmission method in the CDN network of corresponding above-described embodiment, the embodiment of the present invention provides a kind of fringe node, comprising:
Determining unit 51, for determining that whether having set up TCP between network node is connected.
Second sets up unit 52, for determining between network node, does not set up and has TCP to be connected, and many TCP that set up between network node are connected, and by many TCP, is connected and is sent multiple HTTP request messages.
Response receiving element 53, for being connected and received the response message that network node sends by many TCP, obtains the response data of HTTP request message.
Embodiment of the present invention fringe node can be Edge Server, and many TCP connections can be understood as at least two TCP and connect, and multiple HTTP request messages can be understood as at least two HTTP request messages.
Above-mentioned network node can comprise: Area Node or Centroid.Area Node, Centroid are for store network data.Optionally, between fringe node and Centroid, can there is multistage Area Node, thus satisfied service needed.
The technical scheme being provided by the embodiment of the invention described above can be found out, safeguards that many TCP connect, and realize the transmission of parallel data, and make full use of TCP bandwidth between fringe node and network node.
Particularly, response receiving element 53, the TCP that can also be used for the propagation delay time minimum connecting by many TCP connects the response message that receives network node transmission, obtains the response data of HTTP request message.
Second sets up and in the HTTP request message that unit 52 sends, carries stream index indication X-Flow-Index and join index indication X-Connection-Index.
The response message that response receiving element 53 receives carries described stream index indication X-Flow-Index and join index indication X-Connection-Index.
Wherein, described stream index indication X-Flow-Index, for identifying the request content of HTTP request message, described join index indication X-Connection-Index, the TCP connection of using for identifying HTTP request message.
Because HTTP request message and response message have all been expanded stream index indication X-Flow-Index and join index indication X-Connection-Index, HTTP request message and response message do not need strict rank preservation.For example, there are 2 terminal uses to same Area Node request content simultaneously, fringe node can be according to Pipeline mode the response data without waiting area node, without the response data of waiting for network node, fringe node is directly initiated continuously request in multiple TCP connections, then asynchronous reception response data from multiple TCP, can realize the transmission of parallel data, makes full use of TCP bandwidth.
As shown in Figure 6, embodiment of the present invention fringe node, can also comprise:
The first monitoring means 61, connects the quantity of received response message for monitoring many TCP, when the quantity of the response message connecting as TCP is less than predetermined threshold, deletes corresponding TCP and connect.
Visible, this TCP connect the network path status transmission of process bad, fringe node can dynamically be deleted this TCP and connect, and re-establishes new TCP and connects.
Or embodiment of the present invention fringe node, can also comprise:
The second monitoring means 62, connects for monitoring many TCP, on TCP connects, there is no flow, deletes corresponding TCP and connects.
Visible, fringe node is deleted all connections of this IP address, reduces the TCP number of connection that needs maintenance.
As shown in Figure 7, the embodiment of the present invention provides a kind of data transmission system, comprises first network node 71 and second network node 72:
First network node 71, be used for receiving multiple HTTP request messages, obtain the data that HTTP request message is asked, by response message, send the data that HTTP request message is asked, wherein, the sequencing that sends the data that multiple HTTP request messages ask is corresponding to the sequencing that gets the data that multiple HTTP request messages ask;
Second network node 72, for send multiple HTTP request messages to first network node 71, and receives the data that HTTP request message that first network node 71 sends is asked.
In embodiment of the present invention CDN system, first network node 71 can be understood with reference to above-described embodiment network node.Second network node 72, as Edge Server, can be understood with reference to above-described embodiment Edge Server.Many TCP connections can be understood as at least two TCP and connect, and multiple HTTP request messages can be understood as at least two HTTP request messages.
The technical scheme being provided by the embodiment of the invention described above can be found out, sequencing by sending the data that multiple HTTP request messages ask is corresponding to the sequencing that gets the data that multiple HTTP request messages ask, realize the high priority data transmission of the HTTP request first getting, can improve the efficiency of transmission of data.
As shown in Figure 8, Edge Server 81, as media delivery node, is responsible for the media delivery task of multiple terminals 82, safeguards that many TCP connect between Edge Server 81 and Area Node 83.And, outside Area Node 83, can also there is multistage Area Node, thus satisfied service needed.
As shown in Figure 9, take Edge Server and Area Node as example, illustrate the data transmission method in CDN network, comprising:
91,, when terminal use clicks after the connection of certain content on website, corresponding HTTP request is routed on Edge Server.
92, Edge Server is according to URI (the Uniform Resource Identifier of terminal use's request, generic resource identifier) content that validation of information this locality does not have buffer memory to ask, Edge Server is inquired about the Area Node of content or the address information of Centroid that have preservation to ask to CDN routing device.
93, CDN routing server returns and preserves the positional information of the Area Node of request content to some extent to Edge Server, comprises domain name or IP address.If what return is domain name, Edge Server also can get corresponding IP address by dns resolution.
94, whether whether Edge Server inspection existed the TCP connection of corresponding IP address to exist: if there is no, according to configuration requirement, set up many corresponding TCP and connect; And if between corresponding IP address, there is the TCP linking number of configuration requirement, need not set up separately newer TCP and connect.
95, Edge Server selects a TCP to connect, and in this TCP connection, to Area Node, submits HTTP request to, has indicated the URI information of the content that will ask in HTTP request message, and as follows at an X-Flow-Index header field of HTTP request message head expansion:
X-Flow-Index=″X-Flow-Index″″:″1*DIGIT
At HTTP request message head, also expand an X-Connection-Index header field as follows:
X-Connection-Index=″X-Connection-Index″″:″1*DIGIT
Exemplary, the HTTP request message between Edge Server and Area Node is as follows:.
GET/HTTP/1.1
Accept:*/*
Accept-Language:zh-cn
Accept-Encoding:gzip,deflate
User-Agent:Mozilla/4.0(compatible;MSIE?6.0;Windows?NT?5.1;SV1)
Host:www.ABC.com
X-Flow-Index=1234
X-Connection-Index=1
96, Area Node is received after the HTTP request message of Edge Server, locates the content that will ask according to the URI in HTTP request message.Area Node gets after the content that Edge Server HTTP request needs, and selects to send the TCP that response data need to be used to Edge Server and connects.
Area Node checks that the current transmission bandwidth connecting to each TCP of Edge Server is connected the data volume that also needs transmission at present with every TCP, according to data volume waiting for transmission, can calculate with transmission bandwidth the propagation delay time that TCP is connected, refer to wait for that TCP connects the idle wait time delay that sends data, Area Node selects the TCP of propagation delay time minimum to connect to come transmission response data.
Area Node first transmits corresponding data according to the data that first get which HTTP request, and the propagation delay time in which bar TCP connections is little in this TCP connections, transmits, and realizes the flexible and efficient transmission of data, and embodiment high priority data, time delay are preferential.
Area Node carries equally X-Flow-Index and X-Connection-Index header field in response message, and the value of these two header fields is consistent with the value of header field in HTTP request message.
Exemplary, response message is as follows:
HTTP/1.1200?OK
Date:Mon,19?Jul?201007:10:06?GMT
Expires:-1
Cache-Control:private,max-age=0
Content-Type:text/html;charset=UTF-8
Content-Encoding:gzip
Server:gws
X-Flow-Index=1234
X-Connection-Index=1
Content-Length:4125
Message?Body
In addition, if be kept in the storage mediums such as Area Node internal memory or hard disk before the content of asking, Area Node can directly obtain from this locality, otherwise Area Node can adopt and obtains the similar mode of content with Edge Server and obtain asked content from the Area Node on upper strata more.
97, Edge Server is received after the response message of Area Node, can be associated with HTTP request message, thereby be finally associated with in terminal use's request according to X-Flow-Index and X-Connection-Index header field.Final Edge Server by the content delivery returning from Area Node to terminal use.
Optionally, in above-mentioned steps 96, Area Node checks that the current transmission bandwidth connecting to each TCP of Edge Server is connected the data volume that also needs transmission at present with every TCP, network node calculates every propagation delay time that TCP is connected according to data volume waiting for transmission with transmission bandwidth, the TCP that determines minimum transfer time delay connects, according to newly setting up to Edge Server RTT prediction the time delay that TCP connects:
If minimum transfer time delay is less than, newly set up the time delay that TCP connects, maintain current TCP and connect the stable of number, the TCP setting up before still etc. to be used connects to transmit data.
If minimum transfer time delay is greater than, newly set up the time delay that TCP connects, network node is initiatively set up TCP connection to Edge Server.
Area Node can, by HTTP POST method transmission data, carry X-Flow-Index and X-Connection-Index header field in POST message, and for being associated with HTTP request message before, POST message examples is as follows:
POST/HTTP/1.1
Accept:*/*
Accept-Language:zh-cn
Accept-Encoding:gzip,deflate
User-Agent:Mozilla/4.0(compatible;MSIE?6.0;Windows?NT?5.1;SV1)
Host:www.ABC.com
X-Flow-Index=1234
X-Connection-Index=1
Content-Length:4125
Message?Body
The technical scheme being provided by the embodiment of the invention described above can be found out, according to the data that first get which service request first transmit propagation delay time that corresponding data are connected with that TCP little in this TCP connection the principle of transmission realize the flexible and efficient transmission of data, embody high priority data, time delay preferential, realize reducing dynamically to delete and build the expense that TCP connects, avoid TCP to open slowly the impact on transmission rate, reduce the TCP linking number that needs maintenance, promote multiplexing, the concurrent efficiency in every TCP connection.
It should be noted that, for aforesaid each embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the present invention is not subject to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part of detailed description, can be referring to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above; only for preferably embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with in technical scope that those skilled in the art disclose in the present invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.