Project

General

Profile

Feature #1362

SQF does not balance very well

Added by Anonymous about 12 years ago. Updated over 10 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
Category:
mod_proxy_core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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

patch (1.12 KB) patch proposal patch to show the solution -- iamawalrus Anonymous, 2007-09-15 09:13
lighttpd.patch (1.1 KB) lighttpd.patch proposal patch to show the solution -- iamawalrus Anonymous, 2007-09-15 12:56
lighttp-sqf_balance_fix-svn-20090514.diff (715 Bytes) lighttp-sqf_balance_fix-svn-20090514.diff lighttp-sqf_balance_fix-svn-20090514.diff japc, 2009-05-14 15:53
lighttp-rr_sqf_balance_fix-svn-20090514.diff (1.63 KB) lighttp-rr_sqf_balance_fix-svn-20090514.diff lighttp-rr_sqf_balance_fix-svn-20090514.diff japc, 2009-05-14 17:23
lighttp-rr_sqf_balance_fix-svn-20090514.diff (1.64 KB) lighttp-rr_sqf_balance_fix-svn-20090514.diff lighttp-rr_sqf_balance_fix-svn-20090514.diff japc, 2009-05-14 17:30

History

#1

Updated by Anonymous about 12 years ago

I updated a new patch to fix the initial of min_used_number

-- iamawalrus

#2

Updated by japc over 10 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.

#4

Updated by japc over 10 years ago

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.

#6

Updated by stbuehler over 10 years ago

  • Status changed from New to Invalid
  • Patch available set to No
  1. If your server has some real load, it doesn't matter where you start.
  2. 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.
  3. 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)
#7

Updated by japc over 10 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