Velocity: TCP and low bandwidth network performance [translation]

Original: andthe-lower-bound-of-web-performance/

John Rauser (Amazon) is my favorite speaker at the Velocity Conference. He is very good about KEYNOTE that creates a cultural change, I suggest you go to this video.

John has done another longer and more technical report – “TCP and low bandwidth network performance”. ” But unfortunately, no arrangement in the video room. But yesterday Mike Bailey Contact me said he has recorded this report. After John’s allowable, Mike has previously passed the video on his Blog (click on the link).

John takes the beginning of the report from the end of the round trip to the West Bank:

The retrieval distance from the West Bank to the East Shore is the speed of 7400 kilometers in vacuo is 299,792.458 km / sec. Theoretically, the lowest round trip delay is 25 milliseconds (translation: 24.68 milliseconds), but because the light is actually not in vacuum Spread, but in the glass fiber, the refractive index of the glass fiber is 1.5, which means that the speed of propagating light in the glass fiber is a third-third of the speed of the vacuum propagation. It is said that the actual return time is approximately 37 milliseconds. This round-trip time is approximately 90 ms. This time is not very poor considering other factors. (Translation: John Tested this time through ping in his own home)

The problem is that there is more than 10 years, and Stuart Cheshire describes similar delay in 1996. Understanding network delays when developing response web applications.

In this context, John enters the description of TCP history and leads us to the current network delay. The Internet was born in September 1981, its mark is the RFC 793 Transmission Control Protocol, which is what we now say TCP protocol.

When the round trip time of any host transmission exceeds the maximum retransmission interval, the host will generate a number of the same packets sent to the network. This will cause the network to become severe. The available buffers between all exchange nodes will be filled, and many data packets will be lost. The host sent each packet multiple times, and the last number of the same copy arrived at the destination, which is a congestion crash.

When this state is stable, once the saturation point is reached, if the algorithm of the package to be discarded is fair, the network will continue to operate in a degraded state. Congestion crashes and morbid congestions are not common in Arpanet and Milnet systems because these networks have substantial excess capacity.

In 1984, the RFC896 was prepared, and the network had “substantial excess capacity” was quickly changed. In 1981, there were only 213 hosts on the network, but the number of hosts was rapidly increased. In October 1986, there have been more than 5,000 hosts on the Internet. At this time, a series of congestion crash events have occurred.

This situation has led to the development of the TCP slow start algorithm, which is described in RFC2581, 3390 and 1122. The key point of this algorithm is to introduce a new concept-blocking window (CONGESTION Window, CWnd), and the blocking window is managed by server. Basic algorithms are as follows:

The initial CWnd is three complete report segments to each confirmation character ACK, add CWND according to a complete message section.

The TCP slows the start algorithm has extensive adaptability. As the packet flow map below, the number of packets is small and is multiplexed, so that congestion collisions can be avoided.

But this is still not high enough. In some cases, too much confirm character ACK is sent, so we have an ACK delay algorithm in RFC813. The figure below can see the number of data packets is relatively reasonable.

After referenceing so many RFC documents and confirms the image of the character ACK, John asked “Why should we care about this problem?”. John took us back to the basic issue to be dealt with Web developers every day.

Remember that the size of each message section is 1460 bytes (which is 1,500 bytes described in RFC 894, and 40 bytes of differences are used to store the heads of TCP and IP protocols). Let’s see how many round-trips are needed to send different payloads. (Expressed in KB format, red)

John’s summary is that TCP slows the network delay to strictly limit the throughput of new links. He gives the following recommendations for this situation:

Very careful considering the content of each byte considering what should be placed in the forefront of the packet keep your cookie is enough to open the link in the three packets in front of the useful resource to download the small resource to receive the light speed(Abolith Close User) All web developers should have a basic understanding of the protocols used by their applications.John has made a rich and attractive report, just like a real takeaway store, enjoy it.

Steve Souders


(Translation: This article has been translated by STEVE SOUDERS, John’s PPT here)