Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay average statistic #521

Merged
merged 5 commits into from Dec 6, 2023
Merged

Conversation

ahfa92
Copy link
Contributor

@ahfa92 ahfa92 commented Nov 28, 2023

Adding delay average statistics for failover weighting. Already got the statistic, but still waiting for the weighting calculation. Kindly suggest the weighting algorithm.
values:
delay: average delay
delayCount: counter of lag more than 0 seconds occured
slaveErrCount: counter of slave error
counter: total counter

if we want to see percentage of delay count we can do delayCount / counter and so does with slave err percentage slaveErrCount
based on the logic we should pick the lowest value available.

@ahfa92 ahfa92 marked this pull request as draft November 28, 2023 06:02
@ahfa92 ahfa92 marked this pull request as ready for review December 5, 2023 04:54
@tanji tanji requested a review from svaroqui December 5, 2023 17:08
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we organize code to put most functions in cluster_stat.go file !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@ahfa92
Copy link
Contributor Author

ahfa92 commented Dec 6, 2023

Hi @svaroqui, I already updated the code. Kindly check.

@svaroqui svaroqui merged commit 93d9a7b into signal18:develop Dec 6, 2023
@ahfa92 ahfa92 deleted the failover-weight branch December 27, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants