Forum Discussion
iRule for Pool member redirection
Hi, I have a requirement from my customer. Need some advice how to proceed with iRule with iApp.
Fqdn : abc.def.com (user would be accessing abc.def.com/ghi and abc.def.com/jkl) VS_IP: 10.20.30.40 Servers in the pool : over 7013,7023 10.20.30.50:7013 and 10.20.30.60:7013 (should reach to the module abc.def.com/ghi) 10.20.30.50:7023 and 10.20.30.60:7023 (should reach to the module abc.def.com/jkl)
Here is my plan please correct me if I am wrong and share the iRule: 1. Will create a VIP with all pool member on iApp. Fqdn : abc.def.com VS_IP: 10.20.30.40 2. Will place iRule to reach to first pool member for /ghi else second pool member for /jkl
Can anyone help me with the iRule and suggest if this way I can achieve the target.
Thanks, Nantu
6 Replies
- nitass
Employee
are these helpful? sol9800: Using an iRule to load balance HTTP requests to multiple pools https://support.f5.com/kb/en-us/solutions/public/9000/800/sol9800.html sol15097: Using the Local Traffic Policies feature to load balance HTTP requests to multiple pools https://support.f5.com/kb/en-us/solutions/public/15000/000/sol15097.html - Torti
Cirrus
What is with persistence profiles? Can you attach different persistence profiles, too? Or will be the default persistence profile attached to the different pools? - mikeshimkus_111Historic F5 AccountYou can attach multiple persistence profiles to a virtual server (not a pool). You can set primary and fallback persistence profiles, or multiple primary profiles with a one as the default.
- Nantu_Mandal_16
Nimbostratus
Hey Nitass, I have gone through both of the solution. I will try to apply Tomorrow on my LB. I am going to configure one iApp with default pool. Also will apply one iRule to the VS. Like this: Will this work? when HTTP_REQUEST { if { [HTTP::uri] starts_with "/foo" } { pool foo } else { pool bar } } Or, Should I use the next one: when CLIENT_ACCEPTED { since no LB decision has been made for each brand new connection, [LB::server pool] returns the name of the default pool configured on the virtual server set def_pool [LB::server pool] } when HTTP_REQUEST { if { [HTTP::uri] starts_with "/foo" } { pool foo } else { pool $def_pool } } - nitass
Employee
either looks okay to me. :-) - Nantu_Mandal_16
Nimbostratus
Hi Nitas, Thanks!! I tested both Were working at my LAB setup. Today I had tested on my production works as well.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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