Interview Prep/Networking/Load Balancers, Proxies & CDNs

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.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancers, Proxies & CDNs