Use Kubernetes readiness probes
Readiness probes help services route traffic only to workloads ready to serve it.
Choose the right signal
A readiness check should represent whether the application can accept requests. Keep it lightweight and avoid making unrelated dependency failures take down every replica.
Set thresholds deliberately
Choose probe timing and failure thresholds based on measured startup and recovery behavior. Distinguish readiness from liveness and startup checks.
Observe behavior
Test deployment and dependency failure scenarios in a safe environment. Monitor endpoint availability and adjust settings based on actual behavior.