Replies: 3 comments
-
After discussing this offline, we agreed that the current proposed mechanism for quorum health check is the most reasonably accurate. The operator should determine the health of quorum based on the Kafka's behaviour, controlled by the controller.quorum.fetch.timeout.ms because that indicates how quickly we expect quorum followers to replicate from the leader. Since we cannot easily get controller's configuration from the controller itself without KIP-919, we have to use the value from the desired configuration, not the current configuration. This is not 100% reliable since we could end up checking the quorum based on configuration value that's not applied to the quorum leader yet. However, this could only happen if user happen to change this specific configuration (controller.quorum.fetch.timeout.ms), therefore we think this is a small risk we can accept. Also, the quorum health is not specific to Strimzi so it is something that should be discussed more in Kafka upstream. Therefore probably can close this discussion, unless anyone else has an objection. |
Beta Was this translation helpful? Give feedback.
-
I think using I also verified that, when the leader node doesn't append First time we query it (note: node 6 and 7 are down)
2nd time we query it (note: node 6 and 7 are down)
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I'm late to this party. In Kafka there is no way to enforce the same |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As part of proposal 91 which discusses how the KafkaRoller should act on a KRaft cluster, we are proposing to only roll a controller node if it will not affect the quorum health to minimise the risk of data loss. There are a few different approaches we could use to work out whether we consider the quorum to be "healthy". To have a more focused discussion we thought it would be useful to open a discussion thread here and then we can put the result of the discussion into the proposal.
Current proposal approach
The current approach described in the proposal is:
lastCaughtUpTimestamp
for every controller node.lastCaughtUpTimestamp
is the last millisecond timestamp at which a replica controller was known to be caught up with the quorum leaderlastCaughtUpTimestamp
of the quorum leaderleaderLastCaughtUpTimestamp - replicaLastCaughtUpTimestamp < controllerQuorumFetchTimeoutMs
numOfCaughtUpControllers
)numOfCaughtUpControllers > ceil((double) totalNumOfControllers / 2)
In order to perform quorum check for controller, KafkaRoller creates admin client connection to the brokers. This is required until KIP-919 is implemented.
Problems with proposed approach
We identified some potential problems with the proposed approach:
controller.quorum.fetch.timeout.ms
that matters is the one on the current active controller, it's not clear how we get that specific value if we can't call that controller directly (due to 919 being missing). In the current KafkaRoller code all we can see is the desired value for the configurationcontroller.quorum.fetch.timeout.ms
to verify that a follower is caught up? Given the description of this configuration in the docs, a controller could maybe be making fetch requests but hasn't been able to catch up to the log end offset. Should we instead use some hardcoded time for the comparison?controller.quorum.fetch.timeout.ms
is defined asPrevious discussions/alternative approaches
This was previously discussed under proposal #82. Some of the other approaches discussed there were:
lastCaughtUpTimestamp
that is close to the leaders'lastCaughtUpTimestamp
@showuon @fvaleri @tombentley @mimaison What are your thoughts here? If we can find an approach we're happy with that only involves calling the describeMetadataQuorum API and doesn't require knowledge of other configuration that would make things simpler as we can do the same check regardless of whether some nodes have been rolled and some haven't.
The response from describeMetadataQuorum looks like:
Beta Was this translation helpful? Give feedback.
All reactions