Keep-Alive
ELI5 — The Vibe Check
Keep-Alive tells the server 'don't hang up after this request — I've got more coming.' Instead of opening a new TCP connection for every request (expensive!), you reuse the same one. It's like keeping the phone line open instead of hanging up and redialing for every sentence.
Real Talk
HTTP Keep-Alive (persistent connections) reuses TCP connections for multiple HTTP requests/responses, avoiding the overhead of TCP handshakes and TLS negotiations for each request. Default in HTTP/1.1, configurable via Connection and Keep-Alive headers. Superseded by HTTP/2's single multiplexed connection.
When You'll Hear This
"Keep-Alive reduced our API latency by eliminating repeated TCP handshakes." / "In HTTP/2 you get one connection period — Keep-Alive is a solved problem."
Related Terms
Connection Pooling Pattern
Connection Pooling keeps a bucket of pre-opened database (or HTTP) connections ready to use. Instead of opening a new connection for every request (slow!
HTTP/2
HTTP/2 is a supercharged version of HTTP. With HTTP/1.1, you could only ask for one thing at a time per connection.
Multiplexing
Multiplexing sends multiple requests over a single connection simultaneously.
TCP (Transmission Control Protocol)
TCP is like sending a package with delivery confirmation.