[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Source-hash limitations for multiple servers on a subnet

On Thursday, Jun 12, 2003, at 22:48 US/Pacific, Roland Chan wrote:

As I understand the source hash option, it will redirect the packet to one
of a set of IPs based on a hash of the source address.

This is dandy in a 'sticky load balancing' situation, when you have a power
of two number of servers, and they are all running.

However, if I had 4 destination IPs

and I was load balancing across the set as, what could I do if was no longer available? As I understand it, all I could do would
be to load balance across at best?

Correct; source-hash is limited to a single CIDR block.

This seems a bit limiting. Would it not be more appropriate to use the
source address to work out which of the listed IP address (after expanding
CIDR notation) should be chosen? That way no "memory" of the previous choice
would be required. Admittedly, if the number of destinations in the rule
changed, connections would be routed differently, but that would seem to be
the case anyway.

I'm not sure what you're thinking of in this case. Source-hash has no IP
memory as it is; that's one of its strong points. A hash of the source
address is created, then masked according to the CIDR boundary to get the
redirection address. The same key is used for each hash, hence the sticky

It sounds like you want this extended in syntax similar to round-robin:
accepting lists of addresses (possibly in CIDR format) to map to. Is this