TCP slow start is an algorithm which balances the speed of a network connection. Slow start gradually increases the amount of data transmitted until it finds the network’s maximum carrying capacity.
One of the most common ways to optimize the speed of a connection is to increase the speed of the link (i.e. increase the amount of bandwidth). However, any link can become overloaded if a device tries to send out too much data. Oversaturating a link is known as congestion, and it can result in slow communications or even data loss.
Slow start prevents a network from becoming congested by regulating the amount of data that’s sent over it. It negotiates the connection between a sender and receiver by defining the amount of data that can be transmitted with each packet, and slowly increases the amount of data until the network’s capacity is reached. This ensures that as much data is transmitted as possible without clogging the network.
TCP slow start is one of the first steps in the congestion control process. It balances the amount of data a sender can transmit (known as the congestion window) with the amount of data the receiver can accept (known as the receiver window). The lower of the two values becomes the maximum amount of data that the sender is allowed to transmit before receiving an acknowledgment from the receiver.
Step-by-step, here’s how slow start works:
Once a limit has been determined, slow start’s job is done. Other congestion control algorithms take over to maintain the speed of the connection.
Content providers often adjust their slow start window to maximize performance. The initial congestion window parameter (initcwnd) can have a significant impact on the speed of a network. When the receiver has to send fewer acknowledgments to the sender, more data can be transmitted faster.
Most large CDN providers default to an initcwnd of 10, meaning the CDN will transmit 10 packets before requesting an acknowledgment. Cachefly has an initcwnd of 70, compared to Microsoft’s initcwnd of 2. For comparison, MaxCDN has an initcwnd of about 30. A good balance will be determined by the type of data transmitted and the general speed of the network.
Slow start ensures the speed and integrity of a network while protecting content providers and consumers.
The speed of an Internet connection doesn’t rely solely on bandwidth. In general, an increase from a 5Mbps connection to a 10Mbps connection only results in a 5% improvement in page load time. The key lies in the time it takes for a sender to transmit a message to a receiver, which is where slow start shines.
By optimizing bandwidth usage, slow start makes it easy for users to connect to web services without sacrificing their experience.