Forum Discussion
Sorry page redirect
Sorry I was running out the door to lunch when I posted that. Now I have food I can explain;-
Without oneconnect enabled, each time HTTP_REQUEST is enabled, the current pool will be the last one selected on the same TCP connection, previous HTTP_REQUEST. So using your iRule, let's say your pool members are down and you invoke the /ESI/solr.erp-pool pool. The next time HTTP_REQUEST is executed, the pool returned by [LB::server pool] will be /ESI/solr.erp-pool. When you check it for active members, it will have them, so you send the request to it. Unfortunately you are sending a path other than "?" so you get a 404 .
My rule simple saves the default pool so that it is the one you always check for active members. In addition if the current pool does have active members it will explicitly select the default pool - just in case your default pool goes down and then come back up.
I hope that makes sense.
- pgsmith_120398Jan 15, 2014AltostratusPerfect. that code works great with one exception which i started with. That rips out every uri including the /images and /css portions of the sorry pages. My sites are set up with an index.html file at the root with an images and css folder. The sorry pages will all have the same exact structure so excluding the uri's /images and /css (if those are actually present in the request) would be acceptable. If those words are not present there are only about 10 images and 1 css file that i wouldn't mind creating a DG for and doing a look up in the rule. Is this possible? I haven't been able to get it to work. when CLIENT_ACCEPTED { set def_pl [LB::server pool] } when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1} { pool /ESI/solr.erp-pool if {![HTTP::uri] contains "images"} { HTTP::uri "/" } else { pool $def_pl } } }
- pgsmith_120398Jan 15, 2014Altostratusi realized after i posted that irule that it was formatted incorrectly. This is what i have and its still not working, i just get a "page cant be displayed". when CLIENT_ACCEPTED { set def_pl [LB::server pool] } when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1} { if {![HTTP::uri] contains "uf"} { HTTP::uri "/" } pool /ESI/solr.erp-pool } else { pool $def_pl } } i would think that by adding the "if {![HTTP::uri] contains "uf"} { HTTP::uri "/"}" line that would mean that any uri except one that includes "uf" will be removed. I may not be able to do this, but i would like to accomplish this on the F5 as its the simplest single point i can set this up at.
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