In this article
Separate endpoint health changes from the cost of closing accepted TCP sessions; immediate closure can create its own event-processing interruption.
The recovery action becomes observable work
A TCP-proxy upstream fails health checks while many long-lived sessions remain attached. An operator enables immediate closure of failed-host connections to avoid retaining bad sessions. The closure itself can occupy processing time and delay unrelated traffic.
The cluster API reference documents close_connections_on_host_health_failure and warns about spending substantial time closing many connections. Treat this as an explicit recovery action with resource cost, not a free consequence of changing an endpoint label.
Keep the TCP-proxy scope explicit
The field is documented as supported for connections created by tcp_proxy. Do not extend that statement into a universal HTTP stream-management contract or infer behavior for another filter merely because it uses the same cluster.
Record the actual listener filter, upstream cluster and effective setting. Connection pooling and multiplexed request handling have their own contracts. A count of accepted application requests is not automatically the number of raw TCP sessions that this action will close.
Identify the triggering transition
The outlier-detection overview describes marking an ejected host unhealthy. Active health checks can also supply host-health transitions. Preserve the actual trigger and the endpoint identity alongside the closure event.
Do not conflate removing a host from service discovery, marking it unhealthy and terminating its established sessions. Those are distinct observations. A service-recovery record should show which event caused closure and which session population was attached at that moment.
Account for the closure burst
Capture established-session counts, closure timing and unrelated proxy progress over a common interval. Keep retrying downstream clients visible: closing sessions can cause reconnection work that adds to the original cleanup burst.
Use a bounded disposable connection fixture rather than generating uncontrolled reconnection pressure against a live upstream. Compare the intended policy with the relevant existing-session behavior, preserving per-session outcomes and the time during which other traffic is delayed.
Acceptance for the recovery policy
Accept immediate closure when it achieves the intended release of failed-host sessions and the proxy’s remaining service meets its stated interruption tolerance. Record abandoned application operations explicitly. A closed transport does not establish whether an earlier remote action committed.
Accepted-work termination explains the separate classification of active operations. Health decision roles explains why a health observation and the action following it must be reviewed together.
Avoid transferring the guarantee to another protocol
This policy does not promise graceful completion or safe automatic replay. Nor does the documented caveat prove that every deployment will experience a measurable stall; that depends on its session population and implementation. Preserve the actual filter scope and observed workload. The useful result is a qualified failure-response action whose cleanup cost is visible, rather than an assumption that immediate session removal cannot affect the rest of the proxy.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.