System and method for reducing latency during data transmissions over a network

A system and method is provided whereby more data packets than are necessary may be transmitted in order to prompt a node of network to more quickly increase the number of packets that will be accepted by the node. In one aspect, a single packet of data is split into multiple packets. In another aspect, a single packet of data is padded so that multiple packets need to be sent.

BACKGROUND OF THE INVENTION

The Internet protocol suite is a well known and widely used suite of protocols for servicing data transmissions between two devices communicating information over the Internet. In particular, the Transmission Control Protocol or TCP is a part of the Internet protocol suite that provides for connection-oriented, reliable, and ordered delivery of a stream of information (i.e., payload data) between, for example, a web-browser application running on a client device and a web-server application running on a server device over a local or wide area network.

To communicate with a server device using the TCP protocol, a client device must first establish a TCP connection with the server. After a TCP connection is established, each device may transmit information to the other device in a sequence of discrete data packets, where each data packet contains a header portion and a data portion.

To ensure efficient communication, the TCP protocol incorporates several mechanisms that determine the amount of data (e.g., bytes) that may be transmitted in a single data packet, the flow or rate at which multiple packets are exchanged between the devices, and the effect of the packet transmissions on overall network congestion.

For example, the maximum amount of payload data that a sending device may transmit in the data portion of a single data packet to a receiving device is governed by the maximum segment size (“MSS”) value. By convention, the default MSS value is typically understood to be 1430-1460 bytes, but a larger or smaller MSS value may be set by the receiving device (based on its capabilities to receive a larger or smaller amount of data from the sending device in a single packet) and communicated to the sending device during the initial process of establishing the TCP connection. Once the MSS value is established, a sending device may not transmit a data packet where the data portion of the packet contains an amount of payload data exceeding the MSS value of the receiving device.

Another mechanism provided by the TCP/IP protocol to ensure reliable communication between two devices communicating over the network in accordance with the protocol is the acknowledgement mechanism, where each device acknowledges the reception of data received from the other device. For efficiency and in order to reduce network congestion, the receiving device typically does not send a separate acknowledgement for each data packet that it receives from the sending device. Rather, the acknowledgement mechanism of the TCP protocol is conventionally implemented such that the receiving device will delay transmitting an acknowledgment until it receives at least two data packets from the sending device. The delayed acknowledgement, when transmitted, typically acknowledges the reception of the data contained in two consecutive packets.

A sending device can often fit all of its data into a single packet, in which case it has only one packet to send. Accordingly, if the receiving device receives the first packet but does not receive a second packet, the receiving device will send an acknowledgement indicating the reception of the first packet after waiting for a prescribed amount of time (typically around 200 ms) for the second packet to arrive.

If the data acknowledged by the receiving device does not match the data that was transmitted (for example, if the receiving device only acknowledges the data in one packet when two data packets were transmitted by the server), the sending device retransmits the unacknowledged data packet to the receiving device, until all transmitted data is successfully acknowledged by the receiving device. Furthermore, if the sending device does not receive an acknowledgement within a prescribed period of time (because, for example, the client's acknowledgement packet is lost in transmission, or because none of the data packets transmitted by the server were received at the client device), the sending device retransmits unacknowledged data packets to the receiving device after waiting for an acknowledgement for a prescribed amount of time. The amount of time that the sending device waits prior to retransmitting the unacknowledged data packet is dynamically determined by the sending device based on estimated network conditions.

The mechanism known as the congestion window (“CW”) is another aspect of the TCP protocol that is designed to increase efficiency. Rather than defining the maximum size of the packet, the CW defines the maximum amount of data that a sending device (e.g., a server) may transmit at any given time to a receiving device (e.g., a client) before having to wait for an authorization from the receiving device to send more. In this regard, the CW comprises the maximum number of unacknowledged packets that a sending device may transmit to a receiving device in series prior to having to wait for an acknowledgement from the receiving device, where the maximum amount of data contained in each of the transmitted packets is based upon the MSS value of the receiving device.

In particular, some conventional implementations of the TCP/IP protocol set the CW to an initial default value of two (2) packets. Thus, a sending device may initially send two unacknowledged data packets to a receiving device and then must wait for an acknowledgement of those packets prior to sending any remaining packets. Upon receiving an acknowledgement for the initial two packets, the sending device may increase the value CW and transmit a larger number of the remaining packets in series prior to having to again wait for another acknowledgement from the receiving device.

The value of CW is typically increased by the number of packets that are acknowledged. Thus, for example, once the server receives an acknowledgement indicating the reception of the initial two packets, the server may increase the initial CW value (2 packets) by the number of acknowledged packets (2 packets), resulting in a new CW value of four (4) packets. Consequently, the server may now transmit four packets in a sequence to the client prior to having to wait for another acknowledgment.

The process of increasing the value of CW by the number of the acknowledged packets can theoretically continue indefinitely, until all available payload data has been successfully transmitted from the sending device to the receiving device. In the event that the sending device determines that one or more transmitted packets have been lost (i.e., because the transmitted packets have not been acknowledged by the receiving device within a prescribed period of time or because a negative acknowledgement is received), the value of CW is conventionally reduced by half (attributing the loss to congestion on the network) and the unacknowledged packets are retransmitted by the sending device in accordance with the reduced value of CW.

BRIEF SUMMARY OF THE INVENTION

In one aspect, a method of transmitting packets over a network is provided. The method includes: receiving first data to be transmitted via the network to a client device; determining a first value with a processor, the first value based upon a number of data packets that will be acknowledged by the client device prior to receiving additional packets; determining a second value with the processor, where the second value is based upon a maximum data size of a data packet; determining, based on the first and second values, whether the minimum number of data packets necessary to transmit the first data to the client device is less than the first value; transmitting, based on the determination that the minimum number data packets necessary to transmit the first data is less than the first value, the first data to the client device in a plurality of data packets greater than or equal to the first value via the network.

In another aspect, a system is provided that includes a memory storing instructions and data, the data comprising first data to be transmitted over a network to a client device; and a processor to execute the instructions and to process the data. The instructions include: receiving first data to be transmitted via the network to a client device; determining a first value with a processor, the first value based upon a number of data packets that will be acknowledged by the client device prior to receiving additional packets; determining a second value with the processor, where the second value is based upon a maximum data size of a data packet; determining, based on the first and second values, whether the minimum number of data packets necessary to transmit the first data to the client device is less than the first value; transmitting, based on the determination that the minimum number data packets necessary to transmit the first data is less than the first value, the first data to the client device in a plurality of data packets greater than or equal to the first value via the network.

In a yet another aspect, a method for transmitting data is provided, the method including: receiving first payload data to be transmitted from a first node to a second node via a network, the first payload data having a size less than the maximum amount of payload data that will be accepted by the second node in a single data packet; and transmitting, from the first node to the second node via the network, a first data packet and a second data packet, where each of the first data packet and the second data packet include a portion of the first payload data.

In a yet another aspect, A method for transmitting data is provided, the method including: receiving first payload data to be transmitted via a network from a first node to a second node, determining whether the first payload data has a size less than the maximum amount of payload data that will be accepted by the second node in a single data packet; providing padding data based on the determining, where padding data includes data not intended to be discernable by a user associated with the second node; and transmitting, from the first node to the second node via the network, a first data packet and a second data packet, where at least one of the packets contains the first payload data and where at least one of packets contains the padding data.

In a further aspect, a system is provided, the system including: a first device at a first node of a network, the first device including a first memory storing a first set of instructions and a first processor that processes data in accordance with the first set of instructions; a second device at a second node of the network, the second computer comprising a second memory storing a second set of instructions and a second processor that processes data in accordance with the second set of instructions; the first device having access to first data to be transmitted over the network to the second device. Wherein, the first set of instructions include: receiving first data to be transmitted via the network to a client device; determining a first value, the first value based upon a number of data packets that will be acknowledged by the client device prior to receiving additional packets; determining a second value, where the second value is based upon a maximum data size of a data packet; determining, based on the first and second values, whether the minimum number of data packets necessary to transmit the first data to the client device is less than the first value; transmitting, based on the determination that the minimum number data packets necessary to transmit the first data is less than the first value, the first data to the client device in a plurality of data packets greater than or equal to the first value via the network. And wherein the second set of instructions include: receiving the plurality of packets transmitted by the first device via the network; transmitting an indication via the network to the first device that additional data may be sent; and displaying the first data to a user on a display.

DETAILED DESCRIPTION

In one aspect, a system and method is provided whereby latency between a sending device and receiving device, such as but not limited to a server and a client exchanging information over a network, is reduced by splitting data that may be transmitted to the receiving device in a single data packet into multiple smaller data packets, so as to induce the receiving device to send an acknowledgment earlier than it would if only a single data packet was transmitted.

Referring toFIGS. 1-2, a communication system100in accordance with one aspect of the invention may provide for exchange of data between a client computer12and a server computer50over a communication network60. The client computer12contains a processor20, memory22and other components typically present in general purpose computers. In addition, the server50contains a processor70and a memory72.

The memory22stores information accessible by the processor20, including instructions24that may be executed by the processor20and data26that may be retrieved, manipulated or stored by the processor20. Similarly, the memory72stores information accessible by processor70, including instructions76that may be executed by the processor70and data74that may be retrieved, manipulated or stored by the processor70. The memory may be of any type capable of storing information accessible by the processor, such as a hard-drive, memory card, ROM, RAM, DVD, CD-ROM, write-capable, read-only memories.

The processors20,70may comprise any number of well known processors, such as processors from Intel Corporation. Alternatively, the processors may be a dedicated controller such as an ASIC.

The instructions24,76may comprise any set of instructions to be executed directly (such as machine code) or indirectly (such as scripts) by the processors20,70, respectively. In that regard, the terms “instructions,” “steps” and “programs” may be used interchangeably herein. The instructions may be stored in object code form for direct processing by the processor, or in any other computer language including scripts or collections of independent source code modules that are interpreted on demand or compiled in advance. The functions, methods and routines of instructions in accordance with the present invention are explained in more detail below.

The data26,74may be retrieved, stored or modified by the processors20,70in accordance with the instructions24,76, respectively. The data may be stored as a collection of data. For instance, although the invention is not limited by any particular data structure, the data may be stored in computer registers, in a relational database as a table having a plurality of different fields and records, XML documents, or flat files. The data may also be formatted in any computer readable format such as, but not limited to, binary values, ASCII or EBCDIC (Extended Binary-Coded Decimal Interchange Code). Moreover, the data may comprise any information sufficient to identify the relevant information, such as descriptive text, proprietary codes, pointers, references to data stored in other memories (including other network locations) or information which is used by a function to calculate the relevant data.

Although the processor and memory are functionally illustrated inFIG. 2within the same block, it will be understood by those of ordinary skill in the art that the processor and memory may actually comprise multiple processors and memories that may or may not be stored within the same physical housing. For example, some of the instructions and data may be stored on removable CD-ROM and others within a read-only computer chip. Some or all of the instructions and data may be stored in a location physically remote from, yet still accessible by, the processor. Similarly, the processor may actually comprise a collection of processors which may or may not operate in parallel.

In one embodiment, the client computer12may be a general purpose computer, intended for use by a person, having all the internal components normally found in a personal computer such as a central processing unit (CPU), display30, input32such as a CD-ROM drive, mouse, keyboard or microphone, and a hard-drive, speakers, modem and/or router (telephone, cable or otherwise) and all of the components used for connecting these elements to one another. Moreover, computers50,12in accordance with the systems and methods described herein may comprise any device capable of processing instructions and transmitting data to and from humans and other computers, including network computers lacking local storage capability, PDAs with modems and Internet-capable wireless phones. Although the only input means shown inFIG. 1are the mouse and keyboard, other means for inputting information from a human into a computer are also acceptable such as a microphone, touch-sensitive screen, voice recognition, position or orientation sensitive devices including accelerometers, etc.

The server50and the client computer12are capable of direct and indirect communication, such as over the network60. Although only a single client computer and a single server are depicted inFIGS. 1 and 2, it should be appreciated that a typical system can include a large number of connected computers and several servers to which the computers can connect, with each different computer being at a different node of the network. The network, and intervening nodes, may comprise various configurations and protocols including the Internet, intranets, virtual private networks, wide area networks, local networks, private networks using communication protocols proprietary to one or more companies, Ethernet, WiFi and HTTP. Such communication may be facilitated by any device capable of transmitting data to and from other computers, such as modems (e.g., dial-up or cable), networks cards and wireless interfaces.

In accordance with one aspect of the invention, instructions76in server50may include a search engine78application and communication routines80. The search engine receives search queries and generates search results in response, such as the search results provided by Google.com. While particularly advantageous when used in connection with search engines, it will be understood that the system and method is not limited to any particular application.

The communication routines80assist in the receipt and transmission of the information, such as placing the results into the payload data portion of a data packet and transmitting the results to a web-browser application running on the client device in accordance with the TCP communication protocol. In this regard, the functions of sending, receiving and processing the TCP packets may be accomplished using communication routines provided by operating systems such as Linux and Microsoft Windows.

Data74in the server50may include data82received from client12over network60. The data82received from client12may include a search request that is input by a user into a web-browser application running on the client device and directed to the search engine running on the server device.

Data74may also include data84to be transmitted from the server device50to the client device12over network60. The data to be transmitted from the server to the client may include padded or split payload data generated by the search engine in response to the search request. The payload data may include, for example, webpage formatting data and search results data generated by the search engine in response to the search request.

Instructions24in client12may include a web-browser application38and communication routines40. The web-browser application38may communicate a search request, input by a user into the web-browser and directed to the search engine running on the server, to the communication routines40, which may service data transmissions between client12and server50and transmit the search request to the search engine running on the server device in accordance with the TCP communication protocol. The web-browser application may also format and display, to the user, the payload data received from the server in response to the search request, as part of one or more web-pages.

The communication routines40assist in the receipt and transmission of the information from the client device to the server device. For example, the communication routines40may place the search request into the data portions of one or more data packets and transmit the packets to the search engine application running on the server device in accordance with the TCP communication protocol. In this regard, the functions of sending, receiving and processing the TCP packets may be accomplished using communication routines provided by operating systems such as Linux and Microsoft Windows.

Data26in the client computer12may include data received by the communication routines40from server50over the network. The data42received from the server may include padded or split payload data generated by the search engine running on the server in response to a search request.

Data26may also include data44to be transmitted via the communication routines40from the client12to the server50over the network60. The data44to be transmitted to the server may include a search request input by a user into the web-browser running on the client device.

An exemplary operation in accordance with the process shown inFIG. 17and various aspects of the invention follows below. It should be understood that the following operations do not have to be performed in the precise order described below. Rather, various steps can be handled in reverse order or simultaneously.

In accordance with a aspect, when the size of the payload data initially available for transmission from the server to the client is less than the MSS value of a single data packet, the server may split and transmit the initially available data in two data packets (even though it could be sent in one packet), where each of the two transmitted data packets includes a portion of the initially available payload data.

As indicated earlier, conventional implementation of the TCP protocol provides for one acknowledgement for every two data packets received at the client. In addition, the initial and default number of packets that a server may transmit to a client during the first transmission of data is typically two data packets due to the initial CW value of two (2). By splitting the payload data into two data packets even though all of the available payload data may be contained in a single data packet, the server induces the client computer to transmit an acknowledgement earlier, because the client does not have to wait a prescribed amount of time (typically 200 ms) for the second packet to arrive before sending an acknowledgement.

In many cases where the amount of the initially available payload data is less than the MSS of a single packet, splitting the available payload data into two packets may result in a client acknowledgement being received at the server relatively much earlier than it would otherwise.

For example, if only one packet was transmitted by the server containing all of the initially available data, the client will conventionally wait for a full 200 ms of time for a second data packet before acknowledging the reception of the one packet, which will proportionally delay the time at which the acknowledgement is received at the server by at least the same amount of time. In contrast, if the available payload data is split into two packets, the client will acknowledge the data contained in the two packets as soon as it receives both packets, which in many circumstances may result in the acknowledgement being received relatively much earlier at the server.

The relatively earlier reception of the acknowledgement at the server, in turn, enables the server to enlarge the value of CW and to transmit the remaining payload data, which, for a short transmission, typically becomes available in the meantime, relatively earlier in the subsequent transmission.

For example, receiving an acknowledgement for the first two packets 100 ms earlier than it would be received if only a single data packet was transmitted enables the server to increase the value of CW from two (2) to four (4) and transmit four data packets 100 ms earlier, where, in typical short transmissions, the four transmitted packets may contain all of the remaining portion of payload data responsive to a search request from the client. In contrast, if only a single packet had been transmitted initially, the server would have to wait at least 200 ms before it could send all of the same four packets, resulting in an overall larger latency. Thus, by inducing the client to send acknowledgements earlier when transmissions are short, data packets may be transmitted earlier from the server to the client, resulting in an overall reduction of latency from the perspective of a user at the client device.

FIGS. 3-10illustrate an exemplary embodiment of a transmission in accordance with the process ofFIGS. 14-15.

At an initial time as shown inFIG. 3, client device350requests and receives information from server310. For example, a user may use a browser360executed by client device350to log into a web site hosted by server310in order to transmit a search query380to the server's search engine330via web pages provided by the server. As shown by the dotted lines, the search query may be provided to the search engine330with the assistance of the communication routines330.

In accordance with TCP/IP protocol, the server310and client device350may have already established values (shown as TCP data340) indicating that the server side MSS value is 1460 bytes, and the CW value is initially set to 2.

As shown inFIG. 4, the search engine330may generate initial results410responsive to search query380for display to the user on a web page and pass the results to the communication routines320for transmission before the remainder of the page is ready. For example, the initial results410may include information that can be transmitted quickly because it is completely or mostly independent of the user's query such as text and images that are always present at the top or bottom of the web page sent to the user. Instead or in addition, the initial results may include the first search results retrieved in response to the query, such as sponsored ads or non-sponsored results. It will be assumed for the purposes of the example that the initial results are less than the MSS, namely, the initial results are 1000 bytes compared to the MSS value of 1460 bytes.

In a typical prior art system and method operating in accordance with TCP/IP protocol, communication routines would parse the initial results into the least number of required packets. For example, in such a system and method, the initial results410may be sent immediately to the client device in a single packet because it is small enough to fit in a single packet. As a result of sending only one packet the client device will not acknowledge the packet before waiting for a prescribed amount of time for a second packet thus delaying or stalling the server device from increasing the congestion window.

In accordance with one aspect of the present system and method, the server determines whether the initial results would fit within a single packet and, if so, splits the initial results into multiple packets each containing a different portion of the results. For example, as shown inFIG. 5, the server310splits the initial results410into two packets510and511, each of which contains a different half of the results data. In this regard, it will be understood that the present invention is not limited to splitting the results into multiple packets each containing an equal portion of the results, and that the multiple packets may contain different amounts of the results without departing from the scope of the invention.

As shown inFIG. 6, the server310transmits the two packets510-11to client device350. Because the client device has now received two packets, it will transmit an acknowledgment610to server310without waiting for any additional packets. In response to receiving the acknowledgement for packets510-11, server310increases the value of the congestion window620from “2” to “4”, i.e., the server may now transmit up to four packets to the client without waiting for another acknowledgement.

As shown inFIG. 7, the client may display both halves510-511of the initial results (i.e., all of the initial results410) on the display370while awaiting additional results from the server.

As shown inFIG. 8, the search engine330provides additional results810to communication routines320for transmission in response to the client device's original request. It will be assumed for the purposes of the example that the additional results are substantially greater than the MSS, namely, the additional results are 5000 bytes compared to the MSS value of 1460 bytes. Accordingly, as shown inFIG. 9, the communication routines320split the data into individual packets911-914sized to fit with the maximum packet size.

As shown inFIG. 10, the packets911-914of additional results are transmitted to the client device350, which displays the additional results810along with the initial results410on the display370. In response to receiving packets911-914, client device350will transmit acknowledgements1020-21to the server device310. In response to receiving acknowledgements1020-21, server310may further increase the congestion window (such as by increasing the CW from four (4) to eight (8) as shown at reference number1030).

Accordingly, by splitting the initial payload data into multiple packets when the server may have instead sent the entire payload in a single packet, the server in many cases facilitates an earlier transmission of an acknowledgement from the client, which allows the server to enlarge the congestion window and send the remaining portions of the payload data to the client at an earlier time.

In another aspect, the system and method will continue to determine the amount of packets required to induce the client device to send acknowledgements earlier than if the packets are sent at their maximum size. For example, if the size of the additional results inFIG. 9was 1000 bytes (less than the MSS of 1460 bytes), the additional results may be split into two packets sized at 500 bytes each (thus inducing the client to send one acknowledgement in response), or even four packets sized at 250 bytes each (thus inducing the client to send two acknowledgements in response).

In another aspect of the system and method, instead of splitting the initially available payload data into two packets where the size of the initially available payload data is less than the MSS value of a single data packet, the server may instead append additional non-payload data to the payload data, where the non-payload data is data that is not requested by the client and is unrelated to the search request. The amount of the non-payload data that is appended to the payload data may be such that the total amount of the payload data and the non-payload data together exceeds the MSS value of a single data packet, but is less than or equal to the combined MSS value of two data packets. The server may then transmit two data packets to the client as before, but rather than splitting the payload data into two packets, in this case the first data packet includes all of the initially available payload data and a portion of the appended non-payload data, and the second data packet only includes the remaining portion of the appended non-payload data.

FIGS. 11-14provide an example of this aspect of the system and method in accordance with the process ofFIG. 16. TCP/IP Routines1120may comprise communication routines, such as those present in certain existing operating systems that are preconfigured to use as few packets as possible to transmit data in accordance with TCP/IP protocol. Padding routine1125may comprise instructions that process data from the search engine330prior to it being provided to the TCP/IP Routines.

As shown inFIG. 11and by way of example, padding routine1125receives initial search results1130from the search engine330such that the search results are small enough (e.g., 1000 bytes) to be transmitted in a single packet.

Because the initial results are small enough to be sent as a single packet, the server’ padding routine1125may append information to the results until it is too large to fit within a single packet. As shown inFIG. 12, for example, server310may append padding data1240to the initial results1130to create padded results1250. In one aspect of the system and method, the padding data comprises data that will be either removed by the client device prior to display or information that is difficult for a user to discern—or otherwise meaningless to the user if discerned—when displayed (by way of example only, null characters, space characters, pictures having 0 pixels, HTML header data, etc.). For example, if the initial results were 1000 bytes and the MSS was 1460 bytes, the server may append 461 bytes of null characters so that the combined results exceed the MSS.

As shown inFIG. 13, the padded results1250are sent to the TCP/IP routines1120, which packetize different portions of the padded results into two packets1311-12(because the size of the padded data exceeds the MSS of 1460). The server then transmits both packets to the client device350, which displays the padded results to the user on display370. As noted above, the padding may be selected so as to be essentially invisible to the user, in which case displaying the padded results causes the initial results1130be readily discernable to the user whereas the padding1240is not.

As before, based on receipt of the packets1311and1312, the client computer350will transmit an acknowledgement acknowledging the reception of the data contained in the two transmitted packets. As a result, the server310increases the value of congestion window by the number of acknowledged packets. Appending additional data to the initial payload data thus enables the server to send more packets to the client device before waiting for another acknowledgment from the client device. Accordingly, in this aspect of the system and method, increasing the size of the requested data may actually reduce the latency for transmission and reception of the overall dataset.

FIG. 17shows a process in accordance with various aspects of the invention. As shown therein, a sending device, such as, for example, a server, may receive information to be provided to a client device over, for example, a network. The sending device may determine the size of the information, and may also determine the minimum number of packets necessary to transmit the information to the client device, where the minimum number of packets is determined based on the maximum size of data that may be included in each of the minimum number of packets. After determining the minimum number of packets required, the sending device may also determine if any additional or remaining number of packets may be transmitted to the client in order to induce the client into sending an acknowledgement earlier, that is, without waiting to receive any more packets. If so, the sending device may increase the number of packets to be transmitted to the client device by the additional or remaining number of packets by either splitting or padding the information to be transmitted as disclosed herein above. The sending device may then transmit the information to the client by transmitting the increased number packets over the network. After the increased number of packets are transmitted to the client, the sending device and may receive one or more indications from the client that acknowledge the reception of the transmitted packets. Subsequent to receiving the one or more indications, the sending device may increase the maximum number of packets that may be transmitted to the client device by the number of the acknowledged packets in a subsequent transmission of information to the client device.

The aspects of the invention disclosed herein have the advantage of being flexible enough to accommodate a variety of alternatives. For example, the splitting or padding of data may be performed by the search engine, by the operating system or another routine on the sending device.

Yet further, the system and method may be used with client devices that operate in accordance with conventional implementations of the TCP/IP protocol. For example and in one aspect, the client device provides acknowledgements and permits increases in the size of the congestion window without determining (or without receiving any information indicating) that the packets were split or padded by the server. In another aspect, the client device implements routines that complement the actions of the server, such as searching for and removing padding data added by the server.