Networking & Infrastructure
TCP is a reliable, ordered, connection-oriented protocol. UDP is a fast, connectionless, best-effort protocol. They serve different workloads.
TCP (Transmission Control Protocol) provides a reliable, ordered, byte-stream connection between two endpoints. It handshakes (SYN, SYN-ACK, ACK), retransmits lost packets, reorders delivery, and applies congestion control. Almost everything you think of as "the web" — HTTP, HTTPS, SSH, database connections — runs on TCP. The cost is overhead: handshake latency, head-of-line blocking, and bandwidth used for acknowledgments.
UDP (User Datagram Protocol) sends individual packets (datagrams) with no connection setup, no acknowledgment, and no ordering. Packets can arrive out of order, multiple times, or not at all. UDP is fast and minimal — perfect when you would rather drop a packet than wait for a retransmission. Real-time media (voice, video), gaming, DNS lookups, and many telemetry protocols use UDP.
QUIC, the protocol that powers HTTP/3, is built on UDP but adds reliability and ordering on top — getting most of TCP's safety with better recovery from packet loss and faster connection setup.
Use TCP for any workload where reliability and order matter (almost everything). Use UDP when low latency matters more than reliability — real-time media, gaming, telemetry.
TCP handshakes and head-of-line blocking add latency. UDP forces the application to handle reliability if it needs it, which is non-trivial.
A major revision of the HTTP protocol that introduces multiplexing, header compression, and server push over a single binary framing layer on TCP.
The time delay between a request being sent and a response being received — typically measured in milliseconds.
A persistent, bidirectional communication channel between client and server over a single TCP connection — the standard for real-time web features.
A server that sits in front of one or more backend servers and forwards client requests to them, often handling TLS, caching, compression, and load balancing.
A hierarchical, distributed naming system that translates human-readable domain names like systemcity.io into IP addresses computers route to.