TECHNICAL FIELD

This disclosure relates to trip time estimation for transport control protocol.

BACKGROUND

Conventionally, processes running on a node can help understand the performance of a transport control protocol (TCP) connection between nodes (or endpoints). For example, a system could be deployed to capture a packet's round trip time (RTT) by measuring a starting time when the packet is sent by the node and an acknowledgement time when an acknowledgment is received by the node. Yet, as the use of middleboxes increases the implementation of intermediary nodes between more conventional endpoints, measuring TCP performance at an endpoint must account for new performance measurement techniques to promote TCP connection optimization.

SUMMARY

One aspect of the disclosure provides a method for estimation of performance characteristics for transport control protocol. The method includes sparsely sampling, at data processing hardware of a middlebox, a plurality of packets from one or more transport control protocol (TCP) connections between one or more source endpoints and one or more destination endpoints transiting through the middlebox over a period of time. For each packet of the sampled plurality of packets, the method includes generating, by the data processing hardware, a time stamp when the packet is sampled and recording, by the data processing hardware, a sequence number and an acknowledgement number for the respective packet. The method further includes generating, by the data processing hardware, an estimated performance characteristic for the one or more TCP connections between the one or more source endpoints and the one or more destination endpoints transiting through the middlebox over the period of time based on at least two of a respective time stamp, a respective sequence number, or a respective acknowledgement number from one or more of the sampled plurality of packets.

In some implementations, the method includes identifying, by the data processing hardware, a first sequence number recorded for a first packet of the sampled plurality of packets transferred between the middlebox and the destination endpoint. Here, the method also includes determining, by the data processing hardware, whether the first sequence number recorded for the first packet matches any of the acknowledgement numbers recorded for sampled plurality of packets transferred between the destination endpoint and the middlebox. In this implementation, when the first sequence number matches the acknowledgement number recorded for a second packet of the sampled plurality of packets, the method includes determining, by the data processing hardware, a first trip time between the middlebox and the destination endpoint based on a difference between the respective time stamps of the first packet and the second packet. In this implementation, when the first sequence number fails to match any of the recorded acknowledgement numbers recorded for the sampled plurality of packets, the method includes estimating, by the data processing hardware, a respective time stamp for a first un-sampled packet from the TCP connection by interpolating the acknowledgement numbers recorded for the sampled plurality of packets. Here, the first un-sampled packet is associated with a corresponding acknowledgement number that matches the first sequence number. This implementation further includes determining, by the data processing hardware, the first trip time between the middlebox and the destination endpoint based on a difference between the first time stamp generated for the first packet and the respective time stamp estimated for the first un-sampled packet.

In some examples, the method includes identifying, by the data processing hardware, a second sequence number recorded for a third packet of the sampled plurality of packets, the third packet transferred between the middlebox and the source endpoint. Here the method also includes determining, by the data processing hardware, whether the second sequence number recorded for the third packet matches any acknowledgement numbers recorded for the sampled plurality of packets transferred between the source endpoint and the middlebox. In this example, when the second sequence number matches the acknowledgement number recorded for a fourth packet of the sampled plurality of packets, the method includes determining, by the data processing hardware, a second trip time between the middlebox and the source endpoint based on a difference between the respective time stamps generated for the third packet and the fourth packet. In this example, when the second sequence number fails to match any of the acknowledgement numbers recorded for the sampled plurality of packets, the method includes estimating, by the data processing hardware, a respective time stamp for a second un-sampled packet from the TCP connection by interpolating the acknowledgement numbers recorded for the sampled plurality of packets, the second un-sampled packet associated with a corresponding acknowledgement number that matches the second sequence number and determining the second trip time between the middlebox and the destination endpoint based on a difference between the third time stamp generated for the third packet and the respective time stamp estimated for the second un-sampled packet. Generating the estimated performance characteristic for the TCP connection may also include calculating a round trip time between the source endpoint and the destination endpoint through the middlebox by summing the first trip time between the middlebox and the destination endpoint and the second trip time between the middlebox to the source endpoint.

In other configurations, the method includes estimating a respective time for an unrecorded acknowledgement number is based on interpolation of the recorded acknowledgement numbers for the sampled plurality of packets. The method may include estimating a respective time for an unrecorded sequence number based on interpolation of the recorded sequence numbers for the sampled plurality of packets.

In some implementations, generating the estimated performance characteristic for the TCP connection includes determining, by the data processing hardware, a slope of acknowledgement numbers over the period of time based on the acknowledgement numbers recorded for the sampled plurality of packets transferred from the destination endpoint to the source endpoint through the middlebox and generating a throughput based on the slope of acknowledgement numbers where the throughput corresponds to a rate of packet transfer from the source endpoint to the destination endpoint through the middlebox. In other implementations, generating the estimated performance characteristic for the TCP connection includes determining a slope of acknowledgement numbers over time based on the acknowledgement numbers recorded for the sampled plurality of packets transferred from the source endpoint to the destination endpoint through the middlebox and generating a throughput based on the slope of the acknowledgement numbers where the throughput corresponds to a rate of packet transfer from the destination endpoint to the source endpoint through the middlebox.

In some examples, the method includes, at a given instance in time, receiving, at the data processing hardware, a first packet communicated over the TCP connection from the source endpoint, the first packet comprising a first sequence number and a first acknowledgement number and receiving a second packet communicated over the TCP connection from the destination endpoint, the second packet comprising a second sequence number and a second acknowledgement number. Here, the method also includes estimating, by the data processing hardware, a respective window size for the source endpoint by determining a difference between the first sequence number associated with the first packet and the second acknowledgement number associated with the second packet. In these examples, the method may further include estimating, by the data processing hardware, a respective window size for the destination endpoint by determining a difference between the second sequence number associated with the second packet and the first acknowledgement number associated with the first packet.

In some implementations, sparsely sampling the plurality of packets includes sampling less than all packets from the TCP connection between the source endpoint and the destination endpoint. Sparsely sampling the plurality of packets may include uniformly sampling packets from the TCP connection in a stateless and systematic manner. The source endpoint may be a user equipment (UE) communicating with a remote distributed network and the destination endpoint corresponds to a server in communication with the remote distributed network.

Another aspect of the disclosure provides a system for estimation of performance characteristics for transport control protocol. The system includes data processing hardware and memory hardware in communication with the data processing hardware. The memory hardware stores instructions that when executed on the data processing hardware cause the data processing hardware to perform operations. The operations include sparsely sampling, at a middlebox, a plurality of packets from one or more transport control protocol (TCP) connections between one or more source endpoints and one or more destination endpoints transiting through the middlebox over a period of time. For each packet of the sampled plurality of packets, the operations include generating a time stamp when the packet is sampled and recording a sequence number and an acknowledgement number for the respective packet. The operations further include generating an estimated performance characteristic for the one or more TCP connections between the one or more source endpoints and the one or more destination endpoints transiting through the middlebox over the period of time based on at least two of a respective time stamp, a respective sequence number, or a respective acknowledgement number from one or more of the sampled plurality of packets.

In some implementations, the operations include identifying a first sequence number recorded for a first packet of the sampled plurality of packets transferred between the middlebox and the destination endpoint. Here, the operations also include determining whether the first sequence number recorded for the first packet matches any of the acknowledgement numbers recorded for sampled plurality of packets transferred between the destination endpoint and the middlebox. In this implementation, when the first sequence number matches the acknowledgement number recorded for a second packet of the sampled plurality of packets, the operations include determining a first trip time between the middlebox and the destination endpoint based on a difference between the respective time stamps of the first packet and the second packet. In this implementation, when the first sequence number fails to match any of the recorded acknowledgement numbers recorded for the sampled plurality of packets, the operations include estimating a respective time stamp for a first un-sampled packet from the TCP connection by interpolating the acknowledgement numbers recorded for the sampled plurality of packets. Here, the first un-sampled packet is associated with a corresponding acknowledgement number that matches the first sequence number. This implementation further includes determining the first trip time between the middlebox and the destination endpoint based on a difference between the first time stamp generated for the first packet and the respective time stamp estimated for the first un-sampled packet.

In some examples, the operations include identifying a second sequence number recorded for a third packet of the sampled plurality of packets, the third packet transferred between the middlebox and the source endpoint. Here the operations also include determining whether the second sequence number recorded for the third packet matches any acknowledgement numbers recorded for the sampled plurality of packets transferred between the source endpoint and the middlebox. In this example, when the second sequence number matches the acknowledgement number recorded for a fourth packet of the sampled plurality of packets, the method includes determining, by the data processing hardware, a second trip time between the middlebox and the source endpoint based on a difference between the respective time stamps generated for the third packet and the fourth packet. In this example, when the second sequence number fails to match any of the acknowledgement numbers recorded for the sampled plurality of packets, the operations include estimating a respective time stamp for a second un-sampled packet from the TCP connection by interpolating the acknowledgement numbers recorded for the sampled plurality of packets, the second un-sampled packet associated with a corresponding acknowledgement number that matches the second sequence number and determining the second trip time between the middlebox and the destination endpoint based on a difference between the third time stamp generated for the third packet and the respective time stamp estimated for the second un-sampled packet. Generating the estimated performance characteristic for the TCP connection may also include calculating a round trip time between the source endpoint and the destination endpoint through the middlebox by summing the first trip time between the middlebox and the destination endpoint and the second trip time between the middlebox to the source endpoint.

In other configurations, the operations include estimating a respective time for an unrecorded acknowledgement number is based on interpolation of the recorded acknowledgement numbers for the sampled plurality of packets. The operations may include estimating a respective time for an unrecorded sequence number based on interpolation of the recorded sequence numbers for the sampled plurality of packets.

In some implementations, generating the estimated performance characteristic for the TCP connection includes determining a slope of acknowledgement numbers over the period of time based on the acknowledgement numbers recorded for the sampled plurality of packets transferred from the destination endpoint to the source endpoint through the middlebox and generating a throughput based on the slope of acknowledgement numbers where the throughput corresponds to a rate of packet transfer from the source endpoint to the destination endpoint through the middlebox. In other implementations, generating the estimated performance characteristic for the TCP connection includes determining a slope of acknowledgement numbers over time based on the acknowledgement numbers recorded for the sampled plurality of packets transferred from the source endpoint to the destination endpoint through the middlebox and generating a throughput based on the slope of the acknowledgement numbers where the throughput corresponds to a rate of packet transfer from the destination endpoint to the source endpoint through the middlebox.

In some examples, the operations include, at a given instance in time, receiving a first packet communicated over the TCP connection from the source endpoint, the first packet comprising a first sequence number and a first acknowledgement number and receiving a second packet communicated over the TCP connection from the destination endpoint, the second packet comprising a second sequence number and a second acknowledgement number. Here, the operations also include estimating a respective window size for the source endpoint by determining a difference between the first sequence number associated with the first packet and the second acknowledgement number associated with the second packet. In these examples, the operations may further include estimating a respective window size for the destination endpoint by determining a difference between the second sequence number associated with the second packet and the first acknowledgement number associated with the first packet.

In some implementations, sparsely sampling the plurality of packets includes sampling less than all packets from the TCP connection between the source endpoint and the destination endpoint. Additionally or alternatively, sparsely sampling the plurality of packets may include uniformly sampling packets from the TCP connection in a stateless and systematic manner. The source endpoint may be a user equipment (UE) communicating with a remote distributed network and the destination endpoint corresponds to a server in communication with the remote distributed network.

Another aspect of the disclosure provides a method for a trip time estimation for transport control protocol. The method includes sparsely sampling, at data processing hardware of a middlebox, a plurality of packets from one or more transport control protocol (TCP) connections between endpoints communicating through the middlebox over a period of time. For each packet of the sampled plurality of packets, the method includes generating, by the data processing hardware, a time stamp when the packet is sampled. The method includes determining, by the data processing hardware, that a first sequence number for a first sampled packet of the sampled plurality of packets transferred between the middlebox and a respective endpoint fails to match any acknowledgement numbers of the sampled plurality of packets. The method also includes estimating, by the data processing hardware, a respective time for an acknowledgement number that matches the first sequence number based on interpolation of a plurality of acknowledgement numbers for the sampled plurality of packets. The method further includes determining, by the data processing hardware, a trip time between the middlebox and the respective endpoint by a difference between a first time stamp associated with the first packet and the estimated respective time.

This aspect may include one or more of the following optional features. In some examples, sparsely sampling the plurality of packets includes sampling less than all packets from the TCP connection between the endpoints through the middlebox. Optionally, sparsely sampling the plurality of packets may include uniformly sampling packets from the TCP connection in a stateless and systematic manner. The endpoints may include a user equipment (UE) communicating with a remote distributed network as a source endpoint and a server in communication with the remote distributed network as a destination endpoint.

The details of one or more implementations of the disclosure are set forth in the accompanying drawings and the description below. Other aspects, features, and advantages will be apparent from the description and drawings, and from the claims.

