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 traffic it will always be load balanced to pool_member1 (so even if no this client IP didn't send any packet in a week, next time it will send some packet it will get to pool_member1)
And ofcourse client with source IP 172.17.1.2 will always be load balanced to pool_member2
And so on...
How can I achieve this?
- The_Bhattman
Nimbostratus
This sounds like an iRule post then iControl post. Next time please post in iRule otherwise your question would have been overlooked. - Yaniv_99962
Nimbostratus
Thanks for you quick response - The_Bhattman
Nimbostratus
Setting 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.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 }
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