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

Source-hash limitations for multiple servers on a subnet



Hi,

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

1.2.3.8
1.2.3.9
1.2.3.10
1.2.3.11

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

Similarly, if I had 3 servers, I could only balance across two.

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.

Roland