Forum Discussion
Hamdi_Fersi_350
Dec 10, 2015Nimbostratus
Round-Robin based on client IP
Hi,
Is there a way to make round-robin based on client source IP?
And what is the difference between source and destination persistence profile?
Thanks,
Hamdi_Fersi_350
Nimbostratus
Thanks for your answer Stephan, I want to have round robin based on source IP. I need to have an iRule to make the LB selects one pool member in a time (and persist it in 2 different places).
Dec 11, 2015
That would be the opposite of a persistence. You are right, chances are good to forward (redirect is a different story) to the same real server (pool member) in case of two members only.
You are right, it will require a table based approach to make sure to select a different pool member for each new connection a client creates.
In the iRule I would create a list of available pool members with each new CLIENT_ACCEPTED event.
Next step would be to lookup the table having the client IP as key and the index of the selected pool member as value.
As long as the value is less than the number of the available pool members the value is increased and now used as a pointer to pick a new target from the list created in the first step and update the value.
If the value is greater than the number of available pool members in the list it will be initialized to point to the first in the list. Select pool member. Increase and update the value.
Probably one hour to write and test.
Cheers, Stephan
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