-
Notifications
You must be signed in to change notification settings - Fork 22.8k
feat: Improvements to HOL blocking article #40184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Preview URLs (comment last updated: 2025-07-16 07:57:46) |
Co-authored-by: Brian Smith <brian@smith.berlin>
|
||
To implement TCP slow start, the congestion window (_cwnd_) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ACK). The slow start threshold (_ssthresh_) determines the (de)activation of slow start. When a new connection is made, cwnd is initialized to one TCP data or acknowledgment packet, and waits for an acknowledgement, or ACK. When that ACK is received, the congestion window is incremented until the _cwnd_ is greater than _ssthresh_. Slow start also terminates when congestion is experienced. | ||
To implement TCP slow start, the congestion window (_cwnd_) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ACK). The slow start threshold (_ssthresh_) determines the (de)activation of slow start. When a new connection is made, cwnd is initialized to one TCP data or acknowledgment packet, and waits for an ACK. When that ACK is received, the congestion window is incremented until the _cwnd_ is greater than _ssthresh_. Slow start also terminates when congestion is experienced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this level of detail?
I'm not sure about the algorithm. I think what happens is cwnd tells us how long before we expect a response. If we send data for more than cwnd without a response that indicates congestion. So what we're doing is increasing the amount we either reach or desired rate as set by the ssthresh, or we don't get a response, indicating congestion.
If so, is this right?
To implement TCP slow start, the congestion window (_cwnd_) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ACK). The slow start threshold (_ssthresh_) determines the (de)activation of slow start. When a new connection is made, cwnd is initialized to one TCP data or acknowledgment packet, and waits for an ACK. When that ACK is received, the congestion window is incremented until the _cwnd_ is greater than _ssthresh_. Slow start also terminates when congestion is experienced. | |
To implement TCP slow start, the congestion window (_cwnd_) sets an upper limit on the amount of data that a source can transmit over the network before receiving an acknowledgment (ACK): if a response is not received in this window then the network is considered to be congested. | |
The slow start threshold (_ssthresh_) determines when slow start is activated and deactivated. | |
When a new connection is made, cwnd is initialized to one TCP data or acknowledgment packet, and waits for an ACK. When that ACK is received, the congestion window is incremented and the next packet is sent. The process continues until either the _cwnd_ is greater than _ssthresh_ or a packet is sent without a response in the congestion window, after which slow start is terminated. |
If not, then we need to rewrite anyway, because it doesnt make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found these useful:
- https://www.researchgate.net/figure/TCP-Slow-Start-and-Congestion-Avoidance-phase_fig1_332436793
- https://www.noction.com/blog/tcp-transmission-control-protocol-congestion-control
So during slow start:
cwnd
grows exponentially for each ACK- When we hit
ssthresh
, congestion avoidance begins andcwnd
grows linearly instead - If there's packet loss (timeout or duplicates),
ssthresh
set tocwnd
/2 andcwnd
is reset - slow start begins again
I think we can say something like this for the:
To implement TCP slow start, the congestion window (_cwnd_) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ACK). The slow start threshold (_ssthresh_) determines the (de)activation of slow start. When a new connection is made, cwnd is initialized to one TCP data or acknowledgment packet, and waits for an ACK. When that ACK is received, the congestion window is incremented until the _cwnd_ is greater than _ssthresh_. Slow start also terminates when congestion is experienced. | |
During TCP slow start, the congestion window (_cwnd_) sets an upper limit on the amount of data that a source can send over the network before receiving an acknowledgment (ACK). | |
If a response is not received in this window then the network is considered to be congested. | |
The slow start threshold (_ssthresh_) determines when slow start is activated and deactivated. | |
When a new connection is made, the cwnd is initialized, and when an ACK is received, the congestion window is increased and the next packet is sent. | |
The process continues until either the _cwnd_ is greater than _ssthresh_ or a packet is sent without a response in the congestion window, after which slow start is terminated and congestion avoidance begins. |
Apparently cubic is the default on a lot of systems since quite a while:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the last sentence might be true, but it isn't helpful without all that information you provided above. Reading it as it is written you'd jump forward to the section on collision avoidance and assume that this text was wrong - because the following sections says that slow start is one of the tools you can use for congestion avoidance.
I think the problem is ... the whole thing. We're trying to spot fix when we need to start again. Slow start is part of either "the" or "A" congestion control algorithm. It really doesn't make sense unless we talk about the whole thing.
Perhaps we can structure this https://www.researchgate.net/figure/TCP-Slow-Start-and-Congestion-Avoidance-phase_fig1_332436793 and even add a similar diagram?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we might do something like this for the whole thing (i.e. replacing all the current text).
I mean really, how much of our audience needs to know more than this. Though the diagram would be nice.
TCP slow start is the first phase of many common {{glossary('TCP')}} congestion control algorithms.
It is designed to rapidly determine a network's capacity at the beginning of a connection, after a period of inactivity, or after detecting congestion, without itself causing congestion.
When using the algorithm, data rates are set using a congestion window (cwnd).
This window defines the upper limit on how much data can be sent in which acknowledgment (ACK) packets are still being reliably received.
If responses are not received with the current cwnd, then the network is considered to be congested.
In the slow start phase the cwnd is initially set to a low value and increased exponentially until a configured slow start threshold (ssthresh) is reached.
In the second phase, "congestion avoidance", the cwnd is ramped up linearly until congestion is detected.
If at any point congestion is detected, ssthresh is set to half the level at which congestion was detected and the slow start phase is restarted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this direction, so yes, I think you're right to go with your first impression to remove the specifics cwnd etc. I like the intro sentences we have, though, so we could cut even more details to summarize with a variation of this:
{{glossary('TCP')}} slow start is an algorithm that detects the available network bandwidth for packet transfer and balances transmission speed according to the network's capabilities.
The slow start mechanism prevents congestion when a network's capabilities are initially unknown, and slowly increases the volume of information sent until the network's maximum capacity is found.Network congestion occurs when more data is sent than the network is able to transfer between nodes at any given time.
When a network is congested, machines on the network experience degraded quality of service, including slow data transfers and dropped packets.
The slow start algorithm is a major part of TCP congestion control, as it ensures that new connections progressively increase data rates and that those rates don't overwhelm other nodes.
Some points to keep, IMO:
- "prevents congestion when a network's capabilities are initially unknown"
- "slowly increases the volume of information sent until the network's maximum capacity is found"
- congestion effects are "degraded quality of service, including slow data transfers and dropped packets"
- "slow start algorithm is a major part of TCP congestion control,"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsmth I think this makes sense, or at least is a better baseline for future discussion. I have merged this in verbatim and if I have further comments I'll add them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great now, Hamish. I think the back and forth was worth it for the results 👏🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phew. Thanks for your patience.
This pull request has merge conflicts that must be resolved before it can be merged. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Brian Smith <brian@smith.berlin>
Co-authored-by: Brian Smith <brian@smith.berlin>
Co-authored-by: Brian Smith <brian@smith.berlin>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I don't have a strong opinion on the level of details. Thanks! 🙃
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Thanks @hamishwillee for the thoughtful reviews, I'll merge this one 🎉 |
Description
The HOL blocking glossary entry is relatively new, but there's some small inaccuracies in there.
It's good to note that this happens over single TCP connections, as there's typically 6 parallel H1 connections that browsers make to origins by default.
I've also updated the slow start glossary to be a little more readable / have less redundant information.
Motivation
Adding some more specifics for how HOL blocking happens in HTTP and the ways the different protocols try to mitigate it.