Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Network & Infrastructure / High Availability & Recovery Design

Connection draining for services with long-lived sessions

A maintenance drain stops new requests but leaves persistent sessions indefinitely active. An immediate shutdown then interrupts work despite a dashboard showing the backend removed from new selection.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Routed and clustered services; define failure ownership, fencing and application recovery requirements before testing. Diagnostic/design example; not tested on production equipment.

Collect the evidence

Inventory connection lifetimes, protocol multiplexing, active work and the proxy's drain semantics. Measure whether new work can still arrive over an already-established connection.

Explain the result

Removing a backend from new connection selection does not necessarily stop new requests on existing sessions. Drain behavior is protocol- and implementation-dependent.

Plan the fix

Use the application's supported graceful shutdown and proxy drain mechanism with a documented deadline. Define what happens to sessions that cannot finish before the maintenance window ends.

Check the result and rollback

Verify new-work admission stops, in-flight work completes and deadline behavior is acceptable. Abort shutdown if essential work remains outside the agreed interruption policy, restoring readiness if maintenance is deferred.

Share this article

Back to all articles