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
Dec 10, 2015Nimbostratus
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, 2015Hi Hamdi, what do you mean with "persist it in 2 different places"? Is it the same client using different virtual servers with different pools? By default the persistence table is build in context of the virtual servers and not applied globally. Thanks, Stephan
- Hamdi_Fersi_350Dec 11, 2015NimbostratusI'm having 2 nodes per pool, and I have several clients opening at least 2 sessions towards the LB. What I need to have is that I want the client to be redirected to both of them, and not having the scenario where 1 client opening 2 sessions towards the same pool member. With a simple RR, you have 50% of chance to get your client redirected to different pool member. So I guess I would need to setup tables with keys as source:destination IP as unique value? Do you have any idea on how I can do that? Thanks,
- Dec 11, 2015That 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