What are Consul health checks and how do they affect discovery?
⚡
Quick Answer
Checks (script, HTTP, TCP, TTL) mark instances healthy or not; only passing instances are returned by discovery.
Detailed Answer
Each registered service can define health checks; failing ones remove the instance from DNS/HTTP query results, so traffic routes only to healthy nodes. This makes discovery self-healing without a separate load balancer health-checking layer.
💡
Interview Tip
Failing checks silently drain traffic — a key benefit.
consulhealth-checksdiscovery