Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
As shown in Figure 1, the embodiment of the invention provides the data transmission method in a kind of CDN network, comprising:
Step 11, a plurality of HTTP request messages of reception.
Step 12, obtain the data that a plurality of HTTP request messages are asked.
Step 13, send the data that a plurality of HTTP request messages are asked by response message, wherein, the sequencing that sends the data that a plurality of HTTP request messages are asked is corresponding to the sequencing that gets access to the data that a plurality of HTTP request messages are asked.
The executive agent of the data transmission method in the embodiment of the invention CDN network can be the network node in the CDN network, and described network node can comprise: Area Node or Centroid.Area Node, Centroid are used for store network data.Centroid is as the upper layer node of Area Node, and a Centroid can connect a plurality of Area Nodes.Optionally, between fringe node (can be Edge Server) and Centroid, can there be multistage Area Node, thus the service needed that satisfies.
Wherein, in an embodiment of the present invention, if receive a plurality of HTTP request messages, so when the data that a plurality of HTTP request messages of step 13 transmission are asked, can be the data that got access to a plurality of HTTP request messages, also can be to have got access to the data that wherein several (can be 1 here, also can be wherein several) HTTP request message is asked.Then, when sending the data that got access to, obtain the data that other HTTP request messages are asked simultaneously.Such as: received 5 HTTP request messages altogether, can send data after getting access to the data that 5 HTTP request messages are asked so, also can be just to send data obtaining after the data that 1 (also can be 2,3 or 4 here) HTTP request message is asked.
Below, the data transmission method in the simple declaration embodiment of the invention CDN network:
Click the connection of certain content on the website as the terminal use after, corresponding HTTP request is routed on the Edge Server, when the Edge Server inspection self does not have content that the buffer memory terminal asked, to CDN routing device inquiry the Area Node of the data that preservation asks or the address information of Centroid are arranged, the CDN routing device returns the Area Node of the data that preservation asks to some extent or the address information of Centroid, as IP address or domain name.Wherein, the address information of Area Node or Centroid comprises domain name or IP address.When address information was domain name, Edge Server was resolved by DNS (Domain Name System, domain name system) and is obtained corresponding IP address, does not give unnecessary details at this.
Afterwards, Edge Server is asked to preserving the 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 a plurality of HTTP request messages that Edge Server sends, enter step 12 Area Node or Centroid again and obtain the data that a plurality of HTTP request messages are asked, enter step 13 Area Node or Centroid again and send the data that the HTTP request message is asked by response message.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, sequencing by sending the data that a plurality of HTTP request messages are asked is corresponding to the sequencing that gets access to the data that a plurality of HTTP request messages are asked, the high priority data of the HTTP request that realization gets access to earlier transmits, and can improve the efficiency of transmission of data.
Data transmission method in the embodiment of the invention CDN network also is applicable to the transfer of data between Area Node and the Centroid, transfer of data between Edge Server and other Edge Servers, transfer of data between Area Node and other Area Nodes.
Be example only below, the data transmission method in the embodiment of the invention CDN network is described with Edge Server and network node.
Data transmission method in the embodiment of the invention CDN network, in step 11 and step 13, network node can pass through TCP (Transmission Control Protocol, transmission control protocol) connects the HTTP request message that receives the 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 sets up 1 or many TCP between the Edge Server and is connected.Wherein, many TCP connections can be understood as at least two TCP and connect, and a plurality of HTTP request messages can be understood as at least two HTTP request messages.
Exemplary, return the address information of network node of the data that preservation asks to some extent to Edge Server at the CDN routing device after, whether the Edge Server inspection has existed the TCP of map network address of node information to connect, if there is no, Edge Server can ask with network node between set up many TCP and be connected.Like this, many TCP connection requests of network node response Edge Server and are set up many TCP and are connected between the Edge Server.
Wherein, the number that network node is connected with TCP between the Edge Server can be determined as required.
When the TCP between Edge Server and the network node is connected to one, carry stream index indication X-Flow-Index in the HTTP request message, carry stream index indication X-Flow-Index in the HTTP request message corresponding response message, wherein, stream index indication X-Flow-Index is used to identify the request content of HTTP request message.
As seen, 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 in corresponding and HTTP request message Edge Server is consistent, and HTTP request message and response message do not need strict order-preserving.And, after Edge Server is received the response message of network node, X-Flow-Index can be associated with the HTTP request message according to the stream index indication, thereby is associated with on the terminal use, and final Edge Server will consign to the terminal use from the data that network node returns.
When the TCP between Edge Server and the network node is connected to many, carry stream index indication X-Flow-Index in the HTTP request message and be connected index indication X-Connection-Index, carry stream index indication X-Flow-Index in the HTTP request message corresponding response message and be connected index indication X-Connection-Index, wherein, stream index indication X-Flow-Index is used to identify the request content of HTTP request message, connects index indication X-Connection-Index and is used to identify the TCP connection that the HTTP request message uses.
As seen, on the value of connection index indication X-Connection-Index, be consistent in each HTTP request of successively initiating in same the TCP connection.Therefore, HTTP request message and response message do not need strict order-preserving, and the HTTP request message can not be connected at same TCP with response message, realize the transmission of parallel data, make full use of the TCP bandwidth.
Be noted that also in the step 12 that it is different that network node obtains the time delay that each HTTP asks pairing data, for example, the HTTP request that network node receives earlier, the HTTP acquisition request that receives after may being later than is to data.
Therefore, when the TCP between Edge Server and the network node was connected to many, the data transmission method in the embodiment of the 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 that TCP connects, and can comprise:
Propagation delay time refers to that promptly needs wait 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 that TCP connects can be understood with reference to present general prior art, do not give unnecessary details at this.
As seen, based between Edge Server and network node, existing many TCP to connect, network node responds the HTTP request according to obtaining the sequencing that each HTTP asks pairing data, and the TCP that selects current propagation delay time minimum connects the data that transmission HTTP request message is asked, and, the HTTP request message has all been expanded stream index indication X-Flow-Index and has been connected index indication X-Connection-Index with response message, HTTP request message and response message do not need strict order-preserving, and the HTTP request message can not be connected at same TCP with response message.For example, 2 terminal uses are arranged simultaneously to same Edge Server request content, then Edge Server can be according to Pipeline (pipeline) mode, need not to wait for the response data of network node, Edge Server is directly initiated request continuously in a plurality of TCP connections, go up asynchronous reception response data from a plurality of TCP then, can realize the transmission of parallel data, make full use of the TCP bandwidth.
Data transmission method in the embodiment of the invention CDN network can also comprise:
When TCP was connected to many, if the minimum transfer time delay is greater than setting up the time delay that new TCP connects in the current propagation delay time of many TCP connections, then network node was set up new TCP connection;
Perhaps, when TCP was connected to one, if the current propagation delay time that TCP connects is greater than setting up the time delay that new TCP connects, then network node was set up new TCP and is connected.
Concrete, network node can detect the bandwidth that every TCP connects in real time, ask pairing data if got access to certain HTTP, but, the TCP connection free time of setting up before needing to wait for, network node was according to the propagation delay time of current transmission bandwidth and every TCP of transmission data prediction when sending data, and the TCP that determines the minimum transfer time delay connects, and according to newly setting up the time delay that TCP connects to Edge Server RTT (Round-Trip Time, round-trip delay) prediction:
Connect the stable of number if the minimum transfer time delay, is then kept current TCP less than newly setting up the time delay that TCP connects, still wait the TCP that sets up before to be used to connect and transmit data.
If the minimum transfer time delay is greater than newly setting up the time delay that TCP connects, then network node is initiatively set up the TCP connection to Edge Server.
Therefore, the TCP that network node can initiatively be established to Edge Server connects, and has improved CDN to terminal use's request responding speed, has promoted QoE (Quality of Experience, Quality of experience).
Wherein, network node can initiatively be established to the TCP connection of Edge Server by response HTTP request responding message, perhaps initiatively is established to the TCP connection of Edge Server by HTTP POST mode.And, carry X-Flow-Index and X-Connection-Index header field in the POST message, be used for being associated with before HTTP request message.
Wherein, the TCP number of connection that network node can dynamically be set up at most to each Edge Server can be set, thereby limit the TCP number of connection that each network node and Edge Server need be safeguarded.
Data transmission method in the embodiment of the 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 to set up earlier connects and sends the data that the HTTP request message is asked.
Therefore, the preferential data of selecting the TCP connection transmission request of foundation at first of network node, then 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 safeguard the expense that a large amount of TCP connect simultaneously.
Data transmission method in the embodiment of the invention CDN network can also comprise:
Monitor many TCP and connect the quantity that sends response messages, when the quantity that sends response message less than predetermined threshold or when not sending response message, then the corresponding TCP of deletion connects.
As seen, network node can be according to the actual response message quantity that is used for monitoring in each bar TCP connection that makes of TCP connection.If the response message number in certain bar TCP connection is less than specified threshold value, perhaps the response message number in certain bar TCP connection with respect to the response message number in other the TCP connection less than specified threshold value, then illustrate this TCP connect the network path status transmission of process bad, network node can dynamically be deleted this TCP and connect, and rebulids new TCP and connects.
In addition, no longer include flow between certain Area Node that Edge Server may and connect before, therefore, network node can be monitored the flow in each bar TCP connection of having set up.If all do not have flow behind the duration of lasting appointment to each bar TCP connection of certain IP address, then 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 the embodiment of the 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, then 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 the content of being asked from the network node on upper strata, does not give unnecessary details at this.
As shown in Figure 2, corresponding to the data transmission method in the CDN network of the foregoing description, the embodiment of the invention provides a kind of network node, comprising:
Request receiving element 21 is used to receive a plurality of http hypertext transfer protocol request messages.
Acquiring unit 22 is used to obtain the data that a plurality of HTTP request messages are asked.
Transmission unit 23, be used to get access to the data that the HTTP request message is asked, then send the data that the HTTP request message is asked by response message, wherein, the sequencing that sends the data that a plurality of HTTP request messages are asked is corresponding to the sequencing that gets access to the data that a plurality of HTTP request messages are asked.
Wherein, many TCP connections can be understood as at least two TCP and connect, and a plurality of 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 used for store network data.Optionally, between Edge Server and Centroid, can there be multistage Area Node, thus the service needed that satisfies.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, sequencing by sending the data that a plurality of HTTP request messages are asked is corresponding to the sequencing that gets access to the data that a plurality of HTTP request messages are asked, the high priority data of the HTTP request that realization gets access to earlier transmits, and can improve the efficiency of transmission of data.
As shown in Figure 3, embodiment of the invention network node can also comprise:
Identify unit 31, when being used for by tcp transmission control protocol connection reception HTTP request message and transmission response message, when TCP is connected to one, carry stream index indication X-Flow-Index in the HTTP request message, carry stream index indication X-Flow-Index in the HTTP request message corresponding response message, wherein, stream index indication X-Flow-Index is used to identify the request content of HTTP request message;
When TCP is connected to many, carry stream index indication X-Flow-Index in the HTTP request message and be connected index indication X-Connection-Index, carry stream index indication X-Flow-Index in the HTTP request message corresponding response message and be connected index indication X-Connection-Index, wherein, stream index indication X-Flow-Index is used to identify the request content of HTTP request message, connects index indication X-Connection-Index and is used to identify the TCP connection that the HTTP request message uses.
Therefore, on the value of connection index indication X-Connection-Index, be consistent in each HTTP request of successively initiating in same the TCP connection.After Edge Server is received the response message of network node, according to stream index indication X-Flow-Index be connected index and indicate X-Connection-Index can be associated with the HTTP request message, thereby be associated with on the terminal use, final Edge Server will consign to the terminal use from the data that network node returns.
Embodiment of the invention network node can also comprise:
First selected cell 32 is used for when TCP is connected to many, according to the current propagation delay time that many TCP connect, selects the TCP of propagation delay time minimum to connect the data that transmission HTTP request message is asked.
To sum up, because the HTTP request message has all been expanded stream index indication X-Flow-Index and has been connected index indication X-Connection-Index with response message, HTTP request message and response message do not need strict order-preserving.For example, 2 terminal uses are arranged simultaneously to same Edge Server request content, then Edge Server can need not to wait for the response data of network node according to the Pipeline mode, need not to wait for the response data of network node, Edge Server is directly initiated request continuously in a plurality of TCP connections, go up asynchronous reception response data from a plurality of TCP then, can realize the transmission of parallel data, make full use of the TCP bandwidth.
Embodiment of the invention network node can also comprise:
First sets up unit 33, is used for when TCP is connected to many, and the minimum transfer time delay is then set up new TCP and connected greater than setting up the time delay that new TCP connects in the current propagation delay time of many TCP connections; Perhaps, when TCP was connected to one, the current propagation delay time that TCP connects was then set up new TCP and is connected greater than setting up the time delay that new TCP 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 the TCP connection of Edge Server by response HTTP request responding message, perhaps initiatively is established to the TCP connection of Edge Server by HTTP POST mode.And, carry X-Flow-Index and X-Connection-Index header field in the POST message, be used for being associated with before HTTP request message.
And, the TCP number of connection that network node can dynamically be set up at most to each Edge Server can be set, thereby limit the TCP number of connection that each network node and Edge Server need be safeguarded.
Embodiment of the invention network node can also comprise:
Second selected cell 34 is used for the current propagation delay time that connects as many TCP when identical, connects the sequencing of setting up according to TCP, and the TCP that selects to set up earlier connects and sends the data that the HTTP request message is asked.
Therefore, the preferential data of selecting the TCP connection transmission request of foundation at first of network node, then first TCP that sets up the unit connects and can be reclaimed gradually, thus the TCP linking number that minimizing need be safeguarded.
Embodiment of the invention network node can also comprise:
Monitoring means 35 is used to monitor many TCP and connects the quantity that sends response messages, when the quantity that sends response message less than predetermined threshold or when not sending response message, then the corresponding TCP of deletion connects.
As seen, no longer include flow between certain Area Node that Edge Server may and connect before, therefore, network node can be monitored the flow in each bar TCP connection of having set up.If all do not have flow behind the duration of lasting appointment to each bar TCP connection of certain IP address, then Edge Server is deleted all connections of this IP address, reduces the TCP number of connection that needs maintenance.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, safeguard that between Edge Server and network node many TCP connect, after network node is received a plurality of HTTP request messages of Edge Server transmission, get access to the data data that just this HTTP of transmission asks in the TCP of time delay minimum connection earlier of which HTTP request earlier, realize the transmission of parallel data, and make full use of the TCP bandwidth.
As shown in Figure 4, the embodiment of the invention provides the data transmission method in a kind of CDN network, comprising:
Step 41, determine with network node between whether establish TCP and be connected.
Step 42, determine with network node between do not establish TCP and be connected, set up with network node between many TCP is connected, by many a plurality of HTTP request messages of TCP connection transmission.
Step 43, connect by many TCP and to 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 the embodiment of the 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 a plurality of 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 used for store network data.Optionally, between fringe node and Centroid, can there be multistage Area Node, thus the service needed that satisfies.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, safeguard that between fringe node and network node many TCP connect, after network node is received a plurality of HTTP request messages of fringe node transmission, realize the transmission of parallel data, make full use of the TCP bandwidth.
Particularly, the data transmission method in the embodiment of the invention CDN network:
After the CDN routing device returns the address information (address information can comprise domain name or IP address) of the Area Node of the data that preservation asks to some extent or Centroid to fringe node, then enter step 41.
Particularly, step 41 can comprise:
Whether the fringe node inspection has existed the TCP of corresponding IP address to connect.
And if existed TCP to connect between the corresponding IP address, then fringe node directly connects by TCP and sends the HTTP request message.
And if do not exist TCP to connect between the corresponding IP address, enter step 42.
Particularly, step 42 can comprise:
Do not exist TCP to connect between fringe node and the corresponding IP address, then fringe node is set up corresponding TCP linking number according to configuration requirement.For example default configuration need be set up 2 TCP connections, and then fringe node initiatively is established to 2 TCP connections of corresponding IP address.
Fringe node can connect by TCP of polling, submits the HTTP request message to Area Node layer or Centroid in this TCP connection.Simultaneously, carry stream index indication X-Flow-Index in this HTTP request message and be connected index indication X-Connection-Index.Stream index is indicated X-Flow-Index, is used to identify the request content of HTTP request message, connects index indication X-Connection-Index, is used to identify the TCP connection that the HTTP request message uses.
Thereby network node can select to transmit the data that the HTTP request message is asked by many TCP.Enter step 43, fringe node connects the response message that receives the network node transmission by many TCP, obtains the response data of HTTP request message.Simultaneously, carry stream index indication X-Flow-Index in this response message and be connected 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, then in the step 43, the TCP of the propagation delay time minimum during fringe node connects by many TCP connects the response message that receives the network node transmission, obtains the response data of HTTP request message.
At last, fringe node is received the response message that network node sends, according to the stream index of response message indication X-Flow-Index be connected index and indicate X-Connection-Index can be associated with the HTTP request message, thereby finally be associated with the terminal use, will consign to the terminal use from the data that network node returns.
Because the HTTP request message has all been expanded stream index indication X-Flow-Index and has been connected index indication X-Connection-Index with response message, HTTP request message and response message do not need strict order-preserving.For example, 2 terminal uses are arranged simultaneously to same Area Node request content, then fringe node can need not the response data of waiting area node according to the Pipeline mode, need not to wait for the response data of network node, fringe node is directly initiated request continuously in a plurality of TCP connections, go up asynchronous reception response data from a plurality of TCP then, can realize the transmission of parallel data, make full use of the TCP bandwidth.
Optionally, fringe node can also be replaced metadata cache that whether algorithm decision will consign to the terminal use in this locality according to temperature, thereby fringe node is follow-up other-end user's identical service request service.Temperature is replaced algorithm, as LRU (Least Recently Used, least recently used) algorithm, or the like.
Data transmission method in the CDN network of the embodiment of the invention can also comprise:
Monitor many TCP and connect the quantity of received response message, the quantity of the response message that connects as TCP is during less than predetermined threshold, and then the corresponding TCP of deletion connects.
Perhaps, monitor many TCP and connect, do not have flow on TCP connects, then the corresponding TCP of deletion connects.
Concrete, fringe node is used for monitoring received response message quantity from each bar TCP connection according to actual the making that TCP connects.If the response message number of receiving in certain bar TCP connection is less than specified threshold value, perhaps the response message number of receiving in the TCP connection of response message number with respect to other of receiving in certain bar TCP connection is less than specified threshold value, then illustrate this TCP connect the network path status transmission of process bad, fringe node can dynamically be deleted this TCP and connect, and rebulids new TCP and connects.
And, may be after the CDN routing server be adjusted routing policy, no longer include flow between fringe node and certain Area Node of having connected before, so fringe node need be monitored the flow in each bar TCP connection of having set up.If all do not have flow behind the duration of lasting appointment to each bar TCP connection of certain IP address, then 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 the foregoing description, the embodiment of the invention provides a kind of fringe node, comprising:
Determining unit 51, be used for determining with network node between whether establish TCP and be connected.
Second sets up unit 52, be used for determining with network node between do not establish TCP and be connected, set up with network node between many TCP is connected, by many a plurality of HTTP request messages of TCP connection transmission.
Response receiving element 53 is used for connecting the response message that receives the network node transmission by many TCP, obtains the response data of HTTP request message.
Embodiment of the invention fringe node can be Edge Server, and many TCP connections can be understood as at least two TCP and connect, and a plurality of 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 used for store network data.Optionally, between fringe node and Centroid, can there be multistage Area Node, thus the service needed that satisfies.
The technical scheme that is provided by the embodiment of the invention described above safeguards that between fringe node and network node many TCP connect as can be seen, realizes the transmission of parallel data, and makes full use of the TCP bandwidth.
Particularly, response receiving element 53, the TCP that can also be used for the propagation delay time minimum that connects by many TCP connect and receive the response message that network node sends, and obtain the response data of HTTP request message.
Second sets up to carry stream index indication X-Flow-Index and be connected index in the HTTP request message that unit 52 sends and indicates X-Connection-Index.
The response message that response receiving element 53 receives carries described stream index indication X-Flow-Index and is connected index indication X-Connection-Index.
Wherein, described stream index is indicated X-Flow-Index, is used to identify the request content of HTTP request message, and described connection index indication X-Connection-Index is used to identify the TCP connection that the HTTP request message uses.
Because the HTTP request message has all been expanded stream index indication X-Flow-Index and has been connected index indication X-Connection-Index with response message, HTTP request message and response message do not need strict order-preserving.For example, 2 terminal uses are arranged simultaneously to same Area Node request content, then fringe node can need not the response data of waiting area node according to the Pipeline mode, need not to wait for the response data of network node, fringe node is directly initiated request continuously in a plurality of TCP connections, go up asynchronous reception response data from a plurality of TCP then, can realize the transmission of parallel data, make full use of the TCP bandwidth.
As shown in Figure 6, embodiment of the invention fringe node can also comprise:
First monitoring means 61 is used to monitor the quantity that many TCP connect received response message, and the quantity of the response message that connects as TCP is during less than predetermined threshold, and then the corresponding TCP of deletion connects.
As seen, this TCP connect the network path status transmission of process bad, fringe node can dynamically be deleted this TCP and connect, and rebulids new TCP and connects.
Perhaps, embodiment of the invention fringe node can also comprise:
Second monitoring means 62 is used to monitor many TCP and connects, and does not have flow on TCP connects, and then the corresponding TCP of deletion connects.
As seen, 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 invention provides a kind of data transmission system, comprises first network node 71 and second network node 72:
First network node 71, be used to receive a plurality of HTTP request messages, obtain the data that the HTTP request message is asked, send the data that the HTTP request message is asked by response message, wherein, the sequencing that sends the data that a plurality of HTTP request messages are asked is corresponding to the sequencing that gets access to the data that a plurality of HTTP request messages are asked;
Second network node 72 is used for sending a plurality of 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 the embodiment of the invention CDN system, first network node 71 can be understood with reference to the foregoing description network node.Second network node 72 can be understood with reference to the foregoing description Edge Server as Edge Server.Many TCP connections can be understood as at least two TCP and connect, and a plurality of HTTP request messages can be understood as at least two HTTP request messages.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, sequencing by sending the data that a plurality of HTTP request messages are asked is corresponding to the sequencing that gets access to the data that a plurality of HTTP request messages are asked, the high priority data of the HTTP request that realization gets access to earlier transmits, and can improve the efficiency of transmission of data.
As shown in Figure 8, Edge Server 81 is responsible for the media delivery task of a plurality of terminals 82 as the media delivery node, safeguards between Edge Server 81 and the Area Node 83 that many TCP connect.And, outside Area Node 83, can also there be multistage Area Node, thus the service needed that satisfies.
As shown in Figure 9, be example with Edge Server and Area Node, specify the data transmission method in the CDN network, comprising:
91, after the terminal use clicks the connection of certain content on the website, corresponding HTTP request is routed on the Edge Server.
92, Edge Server is according to URI (the Uniform Resource Identifier of terminal use's request, the generic resource identifier) validation of information this locality does not have the content that buffer memory is asked, and Edge Server has the Area Node of the content that preservation asks or the address information of Centroid to CDN routing device inquiry.
93, the CDN routing server returns to Edge Server and preserves the positional information of the Area Node of request content to some extent, comprises domain name or IP address.If what return is domain name, then Edge Server also can get access to corresponding IP address by dns resolution.
94, whether whether the Edge Server inspection existed the TCP connection of corresponding IP address to exist: if there is no, then set up many corresponding TCP according to configuration requirement and connect; And if had the TCP linking number of configuration requirement between the corresponding IP address, then need not set up new TCP more separately and connect.
95, Edge Server selects a TCP to connect, and submits the HTTP request to Area Node in this TCP connection, has indicated the URI information of the content that will ask in the HTTP request message, and as follows at X-Flow-Index header field of HTTP request message head expansion:
X-Flow-Index=″X-Flow-Index″″:″1*DIGIT
It is as follows also to expand an X-Connection-Index header field at HTTP request message head:
X-Connection-Index=″X-Connection-Index″″:″1*DIGIT
Exemplary, the HTTP request message between Edge Server and the 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, after Area Node is received the HTTP request message of Edge Server, locate the content that to ask according to the URI in the HTTP request message.After Area Node gets access to the content that Edge Server HTTP request needs, select to send the TCP that response data need use and connect to Edge Server.
The current transmission bandwidth that connects to each bar TCP of Edge Server of Area Node inspection is connected with every TCP and also needs data quantity transmitted at present, can calculate the propagation delay time that TCP is connected according to data volume waiting for transmission with transmission bandwidth, refer to that promptly needs wait TCP connects the idle wait time delay that sends data, Area Node selects the TCP of propagation delay time minimum to connect to come the transmission response data.
Area Node is according to the data that get access to which HTTP request earlier corresponding data of transmission earlier then, and the little then transmission in this TCP connections of the propagation delay time in which bar TCP connections, the flexible and efficient transmission of realization data, and embodiment high priority data, time delay are preferential.
Area Node carries X-Flow-Index and X-Connection-Index header field equally in response message, the value of these two header fields is consistent with the value of header field in the 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 at before the content of asking in the storage mediums such as Area Node internal memory or hard disk then 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 the content of being asked from the Area Node on upper strata more.
97, after Edge Server is received the response message of Area Node, can be associated with the HTTP request message according to X-Flow-Index and X-Connection-Index header field, thereby finally be associated with in terminal use's request.Final Edge Server will be given the terminal use from the content delivery that Area Node returns.
Optionally, in the above-mentioned steps 96, the current transmission bandwidth that connects to each bar TCP of Edge Server of Area Node inspection is connected with every TCP and also needs data quantity transmitted at present, 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 the minimum transfer time delay connects, according to newly setting up the time delay that TCP connects to Edge Server RTT prediction:
Connect the stable of number if the minimum transfer time delay, is then kept current TCP less than newly setting up the time delay that TCP connects, still wait the TCP that sets up before to be used to connect and transmit data.
If the minimum transfer time delay is greater than newly setting up the time delay that TCP connects, then network node is initiatively set up the TCP connection to Edge Server.
Area Node can carry X-Flow-Index and X-Connection-Index header field by HTTP POST method transmission data in POST message, be used for being associated with before HTTP request message, and the 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 that is provided by the embodiment of the invention described above as can be seen, according to the data that get access to which service request earlier then earlier the little principle of then in this TCP connection, transmitting of propagation delay time that is connected with that TCP of the corresponding data of transmission realize the flexible and efficient transmission of data, embody high priority data, time delay is preferential, realize reducing dynamically deleting and build the expense that TCP connects, avoid TCP to open influence slowly to transmission rate, reduce the TCP linking number that needs maintenance, promote multiplexing, the concurrent efficient in every TCP connection.
Need to prove, for aforesaid each method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected 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 the 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, do not have the part that describes in detail among certain embodiment, 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 that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.