[Verse 1] When a broker wakes up in the cluster's embrace It sends registration to the controller's place BrokerRegistrationRequest with details to share Controller responds with an epoch to wear This timestamp badge marks its lifecycle start Every heartbeat proves it's playing its part [Chorus] Registered, epoch assigned, heartbeats in time Fenced or unfenced, walking the line Controller shutdown, graceful and clean Or sudden failure breaks the machine Broker lifecycle, four phases true Registration, beating, shutdown's due [Verse 2] BrokerHeartbeatRequest pulses through the wire Response comes back if the link's not on fire Missing heartbeats trigger the fence Controller marks it gone from hence Unfenced means healthy, taking requests Fenced means blocked till the system resets [Chorus] Registered, epoch assigned, heartbeats in time Fenced or unfenced, walking the line Controlled shutdown, graceful and clean Or sudden failure breaks the machine Broker lifecycle, four phases through Registration, beating, shutdown's due [Bridge] Kill the active controller, watch the dance begin Leader election starts, who's gonna win Metadata log replays the state JMX metrics show if brokers wait Logs reveal the timing's truth Failover testing, laboratory proof [Verse 3] Controlled shutdown sends a proper goodbye Graceful exit, resources won't die Uncontrolled failure leaves things hanging loose Emergency cleanup, cut the broker free Epoch numbers climb with every restart Four phases cycle, end back to start [Outro] From registration through the beating heart To shutdown's choice, controlled or sharp Broker lifecycle in KRaft's new way Four phases dancing every single day
← 3 The Quorum Controller | 1 The KRaft Protocol (Raft Implementation) →