Paragrf commented on PR #389:
URL: 
https://github.com/apache/kvrocks-controller/pull/389#issuecomment-4488129889

   > Hi @Paragrf. Sorry for the delay! The PR looks good to me so far.
   > 
   > > Why does Kvrocks cap the slave lag update frequency at 1s rather than 
providing real-time updates? Is it a performance trade-off to avoid overhead?
   > 
   > Yes, it is mainly a performance trade-off. The slave lag shown by the 
master is intended as a coarse-grained monitoring/health metric, so updating it 
once per second avoids adding extra work or locking on the replication hot path.
   
   @jihuayu @git-hulk OK, if we immediately trigger a _getack command on the 
server side upon receiving INFO replication, it will force the slave to report 
its current seq right away. Since INFO replication is currently only invoked by 
the operator and the controller, the performance impact on the server would be 
minimal. This also enables the monitoring system to capture real-time slave 
lags (the current parameter has a 1-second delay between the master and slave, 
which is virtually meaningless for monitoring purposes). Additionally, the 
controller's workflow during an active master switch can be simplified. What do 
you think of this idea?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to