Bug #1715

mod_proxy round robin not working

Added by Anonymous 180 days ago. Updated 93 days ago.

Status:Fixed Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:mod_proxy
Target version:1.4.21
Pending:

No

Resolution:

fixed


Description

Hi,

recently I download the lasted stable version (1.4.19) and found that round robin on mod_proxy does not work as expected. After looping the first time the back-end selector always return the same back-end:

since the condition to assign a higher back-end is:

/* get next ndx */
if ((int)k > host->last_used_ndx) {

after the first loop and no reseting the "host->last_used_ndx" on back-ends (host) we always get the same back-end over and over again...

the solution is to reset all last_used_ndx on each "host" after a higher value of k is reached.

patch is attached.

Regards.
Ezequiel,

-- eziman

lighttpd-1.4.19.mod_proxy-rr-fix.patch - -- eziman (1.1 KB) Anonymous, 07/11/2008 01:20 AM

lighttpd-1.4.19.mod_proxy-rr-fix2.patch - -- eziman (985 Bytes) Anonymous, 07/11/2008 12:14 PM

History

07/11/2008 05:55 AM - stbuehler

Unreadable patch; use "diff -u". But i get the feeling that the code is really broken.

07/11/2008 12:18 PM - Anonymous

Replying to stbuehler:

Unreadable patch; use "diff -u". But i get the feeling that the code is really broken.

I have re-submitted the patch. The patch works fine for me on production environment...

-- eziman

07/31/2008 10:36 AM - stbuehler

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2258

10/05/2008 10:47 PM - stbuehler

Fixed missing index increment in r2335

Also available in: Atom PDF