Forum Discussion
Yaniv_99962
Nimbostratus
May 05, 2009soudce address persistency
Hi,
I want the F5 to load balance the same client IP to the same pool member ALWAYS
so If I have 2 pool members
I want that if client with source IP 172.17.1.1 sends traff...
The_Bhattman
Nimbostratus
May 05, 2009Setting the time out in Source Address (SAA) to indefinite will create a large table over time as you pointed out and lead to overload if you know you are going to have a large list of addresses. You can mitigate some by setting the mask to coverage a large range, but ultimately I think it's going to inefficient.
As I mentioned you could use a CRC32 with modulo to gain the same type of effect.
I.E.
when HTTP_REQUEST {
set poolnum [crc32 [IP::client_addr]]
The following takes poolnum variable, divides it by 4 and assigns the remainder to poolnum.
This will result in the following answers 0,1,2,3. If you divded by 5 then it's 0,1,2,3,4, etc,.
4 is equal to the total of nodes in pool_member.
If a node is added then you must increment by N number of nodes that were added.
I.E., if 2 nodes are added then 4 + 2 = 6.
set poolnum [expr $poolnum % 4 ]
switch $poolnum {
0 { pool pool_member member 192.168.8.1 80 }
1 { pool pool_member member 192.168.8.2 80 }
2 { pool pool_member member 192.168.8.3 80 }
3 { pool pool_member member 192.168.8.4 80 }
}
}
Triggered when the selected members fails in the selected pool, all connections on the failed node will be forced to re participate in load balancing during the failed event. Otherwise it will return back
when LB_FAILED {
pool pool_members
persist source_addr 1800 This allow you stick to a specific host for x amount of time until the member comes back up.
LB::reselect
}
I hope this helps
CB
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
