Project

General

Profile

Bug #1715

mod_proxy round robin not working

Added by Anonymous over 8 years ago. Updated about 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_proxy
Target version:
Start date:
Due date:
% Done:

0%

Missing in 1.5.x:

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 View - -- eziman (1.13 KB) Anonymous, 2008-07-11 01:20

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

Associated revisions

Revision d0b5d2b4 (diff)
Added by stbuehler over 8 years ago

Fix round-robin balancing in mod_proxy (#1715)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2258 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 4b197d05 (diff)
Added by stbuehler about 8 years ago

Fixed fix for round-robin in mod_proxy (forgot to increment the index) (#1715)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2335 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1 Updated by stbuehler over 8 years ago

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

#2 Updated by Anonymous over 8 years ago

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

#3 Updated by stbuehler over 8 years ago

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

Fixed in r2258

#4 Updated by stbuehler about 8 years ago

Fixed missing index increment in r2335

Also available in: Atom