Project

General

Profile

Feature #2117

Source IP sticky load balancing patch

Added by bra almost 8 years ago. Updated 10 months ago.

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

100%

Estimated time:
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 (2.16 KB) lighttpd-sticky.patch bra, 2009-12-10 13:49

Related issues

Related to Feature #959: add jvmRoute support to mod_proxy_ajp13Missing Feedback

Associated revisions

Revision 65989687 (diff)
Added by gstrauss 10 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 over 7 years ago

  • Target version changed from 1.4.26 to 1.4.27

#2 Updated by nitrox over 7 years ago

  • Target version changed from 1.4.27 to 1.4.28

#3 Updated by stbuehler about 7 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 10 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 10 months ago

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

#6 Updated by gstrauss 8 months ago

  • Related to Feature #959: add jvmRoute support to mod_proxy_ajp13 added

Also available in: Atom