TCP AIMD Congestion Control Simulator

This simulator runs the real Additive-Increase/Multiplicative-Decrease algorithm that TCP uses to control how fast it sends data. Several competing flows each keep their own congestion window and offer that many packets, every simulated round-trip time, to one shared bottleneck link with a genuinely finite buffer. When combined demand exceeds what the link and its buffer can hold, real packets are dropped — determined by actual queue occupancy each round, never a scripted "loss event" — and whichever flows lose a packet immediately halve their window. Flows that get through cleanly grow their window: doubling every RTT during slow start, then by a flat one packet per RTT once they cross their own slow-start threshold. Watch the live cwnd-vs-time chart as new flows join a few rounds apart and the buffer's real drop-on-overflow behavior repeatedly cuts back whichever flow is hogging the link, driving all of them toward the same, well-documented AIMD result: roughly equal long-run bandwidth share, with no central coordination at all.