Feature #1362
closedSQF does not balance very well
Description
If there are more than one backend having the same min_used, SQF always choose the first one in the list. It would be better if we can use RR to choose one.
-- iamawalrus
Files
Updated by Anonymous about 17 years ago
I updated a new patch to fix the initial of min_used_number
-- iamawalrus
Updated by japc over 15 years ago
A better solution, in my opinion, is to start the loop at a random index instead of always at 0. That way the first one with min_used will be a random one.
I attached a patch that does that, it's for lighttp svn trunk (1.5.0) as of 2009-05-14. Am testing it on a production system of ours.
Updated by japc over 15 years ago
Updated by japc over 15 years ago
- File lighttp-rr_sqf_balance_fix-svn-20090514.diff lighttp-rr_sqf_balance_fix-svn-20090514.diff added
As a matter of fact the code for RR can be simplified the same way. Attached a patch for lighttp svn trunk (1.5.0) as of 2009-05-14.
Updated by japc over 15 years ago
- File lighttp-rr_sqf_balance_fix-svn-20090514.diff lighttp-rr_sqf_balance_fix-svn-20090514.diff added
oops. wrong patch, corrected.
Updated by stbuehler over 15 years ago
- Status changed from New to Invalid
- Patch available set to No
- If your server has some real load, it doesn't matter where you start.
- If your server has no load and only one request from time to time, you want to go it to the same (first) backend, so the other backend has the chance to get swapped out or whatever.
- Changing RR leads to non-equally distribution if one or more backends are down (the backend after the dead ones will get their load additionally)
Updated by japc over 15 years ago
You're absolutely right on the last one. I looked at the code failing to see that for both patches :|
Also available in: Atom