Forum Discussion
tottenc
Nimbostratus
May 21, 2010Question on Select_pool_member_based_on_ HTTP_query_string_parameter iRule
I'm new to iRules as well as the f5's, and I've been trying to use the functionality from the Select_pool_member_based_on_ HTTP_query_string_parameter I found on devcentral. I've changed it so that it uses the new 'members' method which gets all of the members of the pool regardless of status, and that is working perfectly. The problem I've run into however is that I have this setup on 2 virtual servers, one of which is for http and one is for https. The https virtual server is doing SSL offload so the pool that's associated with it is the same as what's setup in the http virtual server. When I browse to the site I can select the member that I want with the parameter, and the cookie persistence works correctly, however during the course of the website, there is a transition from http to https and this seems to cause the browser to detect that there is a redirection problem, and I get a browser error. If I remove the iRule from the https virtual server when I hit the transition I get loadbalanced as normal. I've verified this by disabling the second server in the pool, and specifying it as the member I want to hit, but when I get to the https part of the site, I can see that I've been sent back to the first server in the pool which is the active member. Anyone have any ideas on how I can maintain the persistence correctly from http to https?
5 Replies
Sort By
- hoolio
Cirrostratus
Hi, - tottenc
Nimbostratus
Hey Aaron, - hoolio
Cirrostratus
Hi Curtis, - hoolio
Cirrostratus
So it looks like the member selection is succeeding in that the .65:80 member is selected for both requests. Is that what you're seeing?Use a workaround to parse the parameter value from the query string described on http:// devcentral.f5.com/wiki/default.aspx/iRules/uri__query set param_value [URI::query "?&[HTTP::query] "&$member_param"] Save a copy of the URI with the param and value removed set uri [string map [list "$member_param=$param_value" ""] [HTTP::uri]] Replace && with & in the updated query string if && is present and set the URI to this HTTP::uri [string map "&& &" $uri]
- tottenc
Nimbostratus
I actually just found what was causing the problem. The SSL offload had been setup a while back, and was tested as working then. In the meantime, I was working on getting this iRule working, and someone had broken the SSL offload. I've been able to fix that, and it's working like a champ now! I'm not sure why when I removed the iRule it was working, but I can get through the transition without problems now, so that's all that matters. Thanks for the help!
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