CEP 59 Graceful Disconnect for Apache Cassandra
When a Cassandra node shuts down, clients experience timeout errors because drivers cannot distinguish planned shutdown from a crash. CEP-59 introduces a GRACEFUL_DISCONNECT event in the native binary protocol that lets the server signal drivers before closing connections. My implementation uses a self-draining mechanism that hooks into the existing cleanup() callback in CQLMessageHandler — each connection closes itself when its last response flushes out, after a grace period that accounts for network-latent requests. Three conditions added to an existing callback, no new threads or timers. Deliverables: server-side four-phase shutdown (SEAL, SIGNAL, DRAIN, DEADLINE), Python driver support with DRAINING host state, configuration and observability metrics, protocol spec update, and unit/integration tests. Java driver support as a stretch goal. JIRA: CASSANDRA-21265 (7 sub-tasks).
Project details
Technologies
Not listed in the archive