Project

General

Profile

Actions

Feature #1362

closed

SQF does not balance very well

Added by Anonymous over 16 years ago. Updated almost 15 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_proxy_core
Target version:
ASK QUESTIONS IN Forums:

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

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
Actions #1

Updated by Anonymous over 16 years ago

I updated a new patch to fix the initial of min_used_number

-- iamawalrus

Actions #2

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

Actions #4

Updated by japc almost 15 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.

Actions #6

Updated by stbuehler almost 15 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)
Actions #7

Updated by japc almost 15 years ago

You're absolutely right on the last one. I looked at the code failing to see that for both patches :|

Actions

Also available in: Atom