How TCP Survives the Worst Network on Earth
Every time you load a webpage, your data gets chopped into pieces, flung across the planet through dozens of machines that could drop it at any moment — and it arrives perfectly in order. The proto...

Source: DEV Community
Every time you load a webpage, your data gets chopped into pieces, flung across the planet through dozens of machines that could drop it at any moment — and it arrives perfectly in order. The protocol responsible is TCP, and once you see how it works, the internet stops feeling like magic. The 3-Way Handshake Before your computer sends a single byte of data, it has to introduce itself. Your machine sends a SYN packet (synchronize). The server responds with SYN-ACK (synchronize acknowledged). Your machine fires back a final ACK. Three packets. No data yet. Just two machines making sure they can hear each other. But those SYN and ACK packets aren't just saying hello — they're exchanging sequence numbers. Random starting numbers that both sides will use to track every single byte that flows between them. Think of it like agreeing on a numbering system before the conversation starts. Segmentation: Chopping Data Into Pieces Say you're downloading an image. It's 100 KB. TCP doesn't send that