4 ms·
TCP congestion control is the algorithms that determine when to delay TCP packets and by how much, in the interest of getting maximum speed but not overloading
by Sesse__ 6y ago
TCP congestion control is the algorithms that determine when to delay TCP packets and by how much, in the interest of getting maximum speed but not overloading routers and links. This is crucial to the survival of the Internet and to end-user experience, because without congestion control, everybody would send at their maximum rate all the time (subject only to the receiver's stated TCP receive window, which can be huge these days), and the Internet would collapse. Imagine sitting on a 2G connection in rural Africa, and the server at the other end blasts packets at 100 Gbit/sec on you. On the converse, imagine sitting at a 100 Gbit/sec connection, but the sender being overconservative and sending only at modem speeds...
Basically, this is a really hard problem, since you can measure bandwidth only indirectly (and with much delay), and the changes you do will affect the measurements. Solutions exist in the form of reacting to packet loss (ACKs don't come back, or selective ACKs come back to explicitly tell you something was missing), to ECN (routers along the path setting bits in your header to explicitly tell you it's getting tight on bandwidth) and to changes in delay (as measured by ACK timing and embedded TCP timestamps; higher delay typically means you're building up a queue somewhere, which is bad). They also differ in what rate they start at (initial window), how aggressive and how they increase the rate when things appear to go well (exponential, linear, binary search), and how they decrease the rate when they get negative signals (cut in half, other tactics). An important factor is “fairness”, usually to TCP Reno (a classic congestion algorithm from the 80s); if you and another sender send at the same time down the same path and they use some other congestion control algorithm, you should get about half of the bandwidth each. (An algorithm that's too aggressive could easily cause the other side to lose packets and just keep decreasing its bandwidth estimate, crowding it off the link entirely.)
A perfect congestion algorithm would immediately detect the correct amount of bandwidth (even in the presence of changing conditions and non-congestion-related packet loss such as a bad cable or Wi-Fi errors), send evenly at that rate, never send so much that packets are lost to congestion, never send so much that routers' queues build up and latency increases (bufferbloat) and be perfectly fair to all other algorithms.
As for census; it's interesting to know what exists out there, what people are doing in practice, and what algorithms we need to compete against and be fair to.
- im3w1l 6y ago> Basically, this is a really hard problem, since you can measure bandwidth only indirectly What do you mean? My ISP knows which package I bought and how congested the tubes are, and how full the datatanks are.
- syntheticcdo 6y agoThe hop between your computer and your ISP is likely about 10-20% of the puzzle. Congestion control is necessary to find the optimal transmission rate across all the networks between your PC and the final destination (and back!).
- im3w1l 6y agoDo you have any source for this? My preconception would be that either me-to-isp or server-to-their-isp would be bottleneck large portion of time.
- syntheticcdo 6y agoWell let's take a look at the traceroute from my residential PC to Hacker News as an example: Tracing route to news.ycombinator.com [209.216.230.240] over a maximum of 30 hops: 1 1 ms 1 ms <1 ms 192.168.86.1 2 12 ms 11 ms 6 ms x.x.x.x 3 29 ms 32 ms 24 ms y.y.y.y 4 19 ms 21 ms 22 ms be23.clmkohpe02r.midwest.rr.com [24.33.160.66] 5 28 ms 22 ms 22 ms be27.clmkohpe01r.midwest.rr.com [65.29.1.34] 6 19 ms 23 ms 19 ms bu-ether31-vinnva0510w-bcr00.tbone.rr.com [66.109.6.54] 7 33 ms 31 ms 20 ms ae-13.edge2.Chicago10.Level3.net [4.68.37.137] 8 68 ms 69 ms 69 ms ae-0-11.bar1.SanDiego1.Level3.net [4.69.146.65] 9 71 ms 75 ms 69 ms M5-HOSTING.bar1.SanDiego1.Level3.net [4.16.110.170] 10 69 ms 77 ms 66 ms news.ycombinator.com [209.216.230.240] Hop 1 is to my router Hop 2 is my router to my ISP Hop 3, 4, 5, 6 are all routers within my ISPs network. Hop 7 is from my ISP into "the internet". Level3 is a major provider of interconnectivity. Hops 8 and 9 are within Level3's network. Hop 10 is finally to Hacker News, which indicates HN's "ISP" is Level3 directly. Only hop 2 is where my "400 Mbps" package limitation is in place. Only hop 10 is "server-to-their-ISP". I chose 10-20% as my intuition because, as you see, 10 routers were involved to get my packet from my PC to HN, and only 1 of them is constrained by my internet package.