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

make lrc act like rr under low load #13

Merged
merged 1 commit into from
Oct 5, 2012
Merged

make lrc act like rr under low load #13

merged 1 commit into from
Oct 5, 2012

Conversation

prymitive
Copy link
Contributor

with this patch lrc acts more like rr algorithm when request rate is very low. Side effect is that when one adds new node to long running cluster, then lrc will try to catch new node request count up to other nodes value, but since it will only happen during low request rate, than I don't consider it as an issue

…very low. Side effect is that when one adds new node to long running cluster, then lrc will try to catch new node request count up to other nodes value, but since it will only happen during low request rate, than I don't consider it as an issue
@unbit
Copy link
Owner

unbit commented Oct 4, 2012

i will make some test but i think having a 'second round' of checks (when more than one node has the lowest refcnt) is a better approach.

@prymitive
Copy link
Contributor Author

I'm sure that it's not the best way and I do not insist on this particular code, but I've been running my FastRouters with it since yesterday and in case of my workloads it works really well.
Having second loop adds more logic and I don't think that it will be noticeably better in real workloads. The only thing second loop will add is even greater fairness, but since this is under low request rate (more than one node reference is 0) then differences will be minimal.
As always I leave it to Your judgement.

@unbit
Copy link
Owner

unbit commented Oct 5, 2012

i will merge it, honestly this is how lrc should behave. For different scenario we can develop alternatives algo.

unbit added a commit that referenced this pull request Oct 5, 2012
make lrc act like rr under low load
@unbit unbit merged commit e915825 into unbit:master Oct 5, 2012
@zhousir1991 zhousir1991 mentioned this pull request Mar 1, 2016
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.

2 participants