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

weighted least reference count (wlrc) load balancing algorithm #15

Merged
merged 1 commit into from
Oct 6, 2012
Merged

weighted least reference count (wlrc) load balancing algorithm #15

merged 1 commit into from
Oct 6, 2012

Conversation

prymitive
Copy link
Contributor

Same as lrc weight handling support pull request but implemented as separate algorithm. Reasons:

  • I disliked idea of patching current lrc algo, it should be left alone as is
  • I've come to conclusion that wlrc algo might be usefull and I would opt for including it

In practice wlrc gives us weighted algorithm that can handle misbehaving nodes (while wrr can't), so if someone is using nodes with different hardware specs than one node might have few times more memory and cpu cores, and so it can spawn much more workers. In such case lrc will probably forward more requests to it only when lower spec nodes are heavily loaded and they start to have longer response times (in theory, I didn't tested it).

Tested with ab -r -c 13 -n 13000 url, each node had number of workers equal to it's weight value. Results:

  • wlrc

    172.16.200.56:3001: weight=1 failcnt=0 requests=1235
    172.16.200.70:3001: weight=4 failcnt=0 requests=4301
    172.16.200.55:3001: weight=8 failcnt=0 requests=7464
    
  • lrc

    172.16.200.70:3001: weight=4 failcnt=0 requests=5847
    172.16.200.55:3001: weight=8 failcnt=0 requests=5353
    172.16.200.56:3001: weight=1 failcnt=0 requests=1800
    

unbit added a commit that referenced this pull request Oct 6, 2012
weighted least reference count (wlrc) load balancing algorithm
@unbit unbit merged commit 6070bd7 into unbit:master Oct 6, 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