TCP: Why the Internet Works Even When It's Broken
TL;DR: TCP is how we send big files over a mess of unreliable cables. It chops data into numbered chunks and won't stop nagging the receiver until every single piece is accounted for. If a packet g...

Source: DEV Community
TL;DR: TCP is how we send big files over a mess of unreliable cables. It chops data into numbered chunks and won't stop nagging the receiver until every single piece is accounted for. If a packet gets dropped or a router chokes, TCP just resends it until the job is done. The internet is a series of physical cables and aging hardware that is constantly failing. Between your computer and a server, there are dozens of points of failure where data can be lost, corrupted, or just dropped because a router got too hot. TCP (Transmission Control Protocol) is the protocol that keeps your data from becoming a corrupted mess by assuming the network is going to fail. How does TCP handle data loss on an unreliable network? TCP handles data loss by breaking large files into small chunks and requiring a formal acknowledgment for every single one. Instead of hoping a 1GB file arrives in one piece, it treats the network as a "best-effort" medium and takes full responsibility for verifying that every by