What is an L4 versus L7 health check, and why can a TCP check pass while the app is broken?
IntermediateConceptLoad Balancers, Proxies & CDNs
Answer
A TCP check only verifies something accepts connections on the port; the process can be deadlocked or return 500 and still pass. An HTTP check requests a path and validates the status code (and optionally body), proving the app code is actually answering.
Use HTTP checks for web apps and reserve TCP for protocols without an HTTP interface.
More on Load Balancers, Proxies & CDNs
What is a load balancer and why do we use one?BeginnerWhat is the difference between L4 and L7 load balancing?IntermediateCompare ALB, NLB, GWLB and Classic Load Balancer in AWS.IntermediateWhat load-balancing algorithms are common?BeginnerWhat are health checks and how should they be designed?AdvancedWhat is connection draining (deregistration delay)?Intermediate