What are HTTP keep-alive and connection reuse, and why do they matter?
AdvancedConceptHTTP, TLS & Certificates
Answer
Keep-alive keeps the TCP (and TLS) connection open for multiple requests, avoiding a handshake each time. It is default in HTTP/1.1.
Timeouts must be coordinated: if an upstream closes idle connections sooner than the load balancer does, the LB reuses a dead socket and returns 502. Rule of thumb: the backend keep-alive timeout should exceed the LB idle timeout (ALB default 60s, so set Node/nginx upstream to 65s+).
More on HTTP, TLS & Certificates
What is the structure of an HTTP request and response?BeginnerWhich HTTP status code classes and codes should every DevOps engineer know?BeginnerWhat are the common HTTP methods and which are idempotent?BeginnerWhat changed between HTTP/1.1, HTTP/2 and HTTP/3?IntermediateHow does QUIC differ from TCP+TLS?AdvancedWhat is the difference between HTTP and HTTPS?Beginner