DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Option 2: Introduce a metadata record for cluster id
- Rough design:
- Introduce a new Metadata Version that supports a ClusterIDRecord.
- Brokers/observers can start Kraft with no cluster id, and rely on metadata publishing pipeline to discover it in-memory
- Bootstrap controllers can add a mandatory “cluster id” record during formatting, or the initial leader can randomly generate a UUID as part of bootstrap metadata records write
- Latter matches the ZK approach more closely, but may present some backwards compatibility challenges
- Pros:
- Fetch replication automatically handles persistence of the cluster id for each local node
- Raft module remains independent from metadata module in that KRaft is only responsible for consensus. ClusterID is simply another piece of metadata on which Kraft achieves consensus
- Cons:
- Currently, KRaft client also needs to be aware of the cluster ID for its own RPC handling, but the raft module does not decode metadata records
- Can duplicate the cluster ID as a control record
- Having a mechanism for “pushing-down” cluster ID from metadata to raft may be complicated.
- We can duplicate data and have a raft level control record for cluster ID.
- The fact that the raft client does currently do validation on cluster id does make it unique (i.e. it is used by both metadata and raft layers to prevent nodes from talking to different “clusters”, which is an argument for option 1).
- For example, if Kraft was used to replicate other data besides the metadata partition, there would still be a concept of cluster id, which needs to be the same across all partitions on the node being managed by Kraft.
- Users of cluster id must wait until after the node catches up to the metadata LEO and fetches the cluster ID
- This might be okay, since we block controller server startup on things like authorizer futures completing, which also rely on fetching the metadata log.
- Controller objects that are initialized with cluster id currently:
- Authorizer futures: we block on these anyways, can move the construction of `endpointReadyFutures` to after local node fetches cluster ID
- QuorumController/ClusterControlManager: Currently set to random UUID if DNE. Used to reject broker registration if IDs do not match.
- ControllerApis: Reported in describe cluster response
- ControllerRegistrationManager: reads but doesn’t use cluster ID
- DynamicTopicCLusterQuotaPublisher: this is a publisher, so the handling is pretty trivial, just set cluster ID via onMetadataUpdate
- Backwards compatibility/migration is non-trivial unless existing clusters are allowed to default to reading `meta.properties` if the cluster ID metadata record does not exist yet.
- ClusterID record can only be written to the log after a leader with a new version containing this KIP is elected.
- Currently, KRaft client also needs to be aware of the cluster ID for its own RPC handling, but the raft module does not decode metadata records
...