Project

General

Profile

Feature #2117

Source IP sticky load balancing patch

Added by bra about 7 years ago. Updated 2 months ago.

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

100%

Missing in 1.5.x:
No

Description

The attached patch implements source IP address dependent sticky load balancing with the same algorithm as the hash balancer.
The only differences are the parameters, which help the decision on what target should be chosen.

The patch takes the HTTP client's (source) IP, the remote proxy IP and port into account during the decision, so if the server list doesn't change, the same client will always get the same proxy target (IP and port) for its queries.

The patch is against lighttpd 1.4.25.

lighttpd-sticky.patch View (2.16 KB) bra, 2009-12-10 13:49

Associated revisions

Revision 65989687 (diff)
Added by gstrauss 2 months ago

[mod_proxy] proxy.balance = "sticky" option (fixes #2117)

attempt to route requests to same backends based on requestor (client)
IP address and target host and port of request.

(thx bra)

x-ref:
"Source IP sticky load balancing patch"
https://redmine.lighttpd.net/issues/2117

History

#1 Updated by stbuehler about 7 years ago

  • Target version changed from 1.4.26 to 1.4.27

#2 Updated by nitrox almost 7 years ago

  • Target version changed from 1.4.27 to 1.4.28

#3 Updated by stbuehler over 6 years ago

  • Target version changed from 1.4.28 to 1.4.x
  • % Done changed from 100 to 0

strdup() without any free - memleak.

#4 Updated by gstrauss 2 months ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.x to 1.4.44

BTW, no need to strdup() result from inet_ntop_cache_get_ip(), since value is already cached in con->dst_addr_buf

#5 Updated by gstrauss 2 months ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom