NGINX Stream Module ↔︎ TCP Backend Servers – Health‑Check Interoperability
25.5K reputation · 02 Aug 2023, 12:57 UTC
Goal
To enable automatic upstream failover for TCP backends using the NGINX Stream module without a commercial license.
Constraints
The open‑source edition lacks a built‑in health_check directive; upstream blocks rely on manual failover via max_fails and fail_timeout. Using Plus‑only syntax causes configuration errors. External scripts can be employed but require careful integration.
Unresolved Decision
Whether to emulate health checks with the existing parameters or to implement an external health‑check mechanism that can signal upstream status changes.
What are the viable approaches to provide automatic TCP health checks in open‑source NGINX? How do max_fails and fail_timeout compare to a custom script in terms of reliability and maintenance? Can external health‑check tools be integrated cleanly with the Stream module’s upstream status reporting?