Summary#
For pooled connections, extra liveness probes can add latency and still be wrong under some transports. A better default is to reuse the connection directly, detect real failure on first use, and reconnect only when the operation proves the connection is dead.
Problem#
The system paid an extra ping/pong round trip before every use of a pooled connection, which doubled small-query latency and relied on stale-connection heuristics that were not reliable across protocols like HTTPS.
Solution#
Remove unconditional pre-use pings, attempt the real request first, and reconnect on actual failure; when stale detection is unavoidable, use protocol-aware primitives such as socket or TLS peeking rather than generic readiness polling.
Failure Modes#
- Keeping expensive preflight probes that dominate latency for small operations
- Using transport-agnostic liveness checks that misread TLS state
- Failing to make retries idempotent after reconnect
- Turning intermittent disconnects into noisy user-visible failures because reconnect happens too late or not at all
Sources#
- https://github.com/huggingface/transformers/pull/47181
- https://github.com/huggingface/transformers/pull/46842
- https://github.com/huggingface/transformers/pull/47381
- https://github.com/huggingface/transformers/pull/47382
- https://github.com/huggingface/transformers/pull/46854
- https://github.com/huggingface/transformers/pull/47252
- https://github.com/huggingface/transformers/pull/47369
- https://github.com/huggingface/transformers/pull/47218
- https://github.com/huggingface/transformers/pull/47032
- https://github.com/huggingface/transformers/pull/47150
- https://github.com/microsoft/ML-For-Beginners/pull/1002
- https://github.com/microsoft/ML-For-Beginners/pull/1001
- https://github.com/microsoft/ML-For-Beginners/pull/1000
- https://github.com/microsoft/ML-For-Beginners/pull/994
- https://github.com/microsoft/ML-For-Beginners/pull/991
- https://github.com/microsoft/ML-For-Beginners/pull/990
- https://github.com/microsoft/ML-For-Beginners/pull/989
- https://github.com/ClickHouse/ClickHouse/pull/111002
- https://github.com/ClickHouse/ClickHouse/pull/110402
- https://github.com/ClickHouse/ClickHouse/pull/110068
- https://github.com/ClickHouse/ClickHouse/pull/110991
- https://github.com/ClickHouse/ClickHouse/pull/109746
- https://github.com/ClickHouse/ClickHouse/pull/109419
- https://github.com/ClickHouse/ClickHouse/pull/106894
- https://github.com/ClickHouse/ClickHouse/pull/110608
- https://github.com/ClickHouse/ClickHouse/pull/110590
- https://github.com/ClickHouse/ClickHouse/pull/109439
- https://github.com/ClickHouse/ClickHouse/pull/110910
- https://github.com/ClickHouse/ClickHouse/pull/110121
- https://github.com/vercel/turborepo/pull/13400
- https://github.com/vercel/turborepo/pull/13398
- https://github.com/vercel/turborepo/pull/13395
- https://github.com/vercel/turborepo/pull/13394
- https://github.com/vercel/turborepo/pull/13393
- https://github.com/vercel/turborepo/pull/13390
- https://github.com/vercel/turborepo/pull/13387
- https://github.com/vercel/turborepo/pull/13385
- https://github.com/vercel/turborepo/pull/13386
- https://github.com/vercel/turborepo/pull/13392
- https://github.com/vercel/turborepo/pull/13391
- mined_at: 2026-07-20T00:10:25Z
Sagwan Revalidation 2026-07-20T00:49:33Z#
- verdict:
ok - note: 핵심 권장안은 현재도 통용되며 지연·재시도 caveat도 적절함