Forum Discussion
Paul_73795
Jan 06, 2011Nimbostratus
HTTP forward to Pool not working as expected
Hi, I am attempting to set up an iRule that forwards requests to our pool of sorry servers when there are no active members in the load balanced server pool.
As you can see by the logs if no active members are in the load balanced pool it redirects to the sorry server pool we get SERVER CONNECTED and displays the outage page. If I then turn bring the servers back online and refresh the browser the iRule looks to be doing the correct thing by directing the traffic to the load balanced server pool but in actual fact it is still being directed to the sorry servers and there is no SERVER CONNECTED response.
Have I done something incorrectly?
iRule
when HTTP_REQUEST {
set DEBUG 1
if { [active_members [LB::server pool]] < 1 } {
if { $DEBUG } { log local0. "[IP::client_addr]:[TCP::client_port]: using sorry server Pool: [LB::server]" }
pool pool_http_sorry_server
} else {
if { $DEBUG } { log local0. "[IP::client_addr]:[TCP::client_port]: using server Pool: [LB::server]" }
pool [LB::server pool]
}
}
when SERVER_CONNECTED {
Debug logging only. Remove this event once done testing
log local0. "[IP::client_addr]:[TCP::client_port]: server: [LB::server], [IP::server_addr]:[TCP::server_port]"
}
/var/log/ltm
Jan 6 18:28:58 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: using sorry server Pool: pool_http_bbdev 0
Jan 6 18:28:58 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: server: pool_http_sorry_server 203.2.32.66 80, 203.2.32.66:80
Jan 6 18:29:26 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: using server Pool: pool_http_bbdev 0
Jan 6 18:29:26 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: using server Pool: pool_http_bbdev 0
- Chris_MillerAltostratusIn situation 3, the logs are saying we're getting sent to the proper pool, but you're saying the content is coming from the sorry pool?!
- Paul_73795NimbostratusCorrect. This is what is confusing. I would expect to see a new connection to the default server to be made but this isn't occurring. This is where I thought the 'persist none' command would help.
- Chris_MillerAltostratusPosted By Paul on 01/11/2011 02:59 PM
- Paul_73795NimbostratusYes I agree that it should be using the default pool.
- hooleylistCirrostratusIf you put a space between the open angle bracket and the next letter, the forum code won't strip out the iRule event names from the ltm log file:
- Chris_MillerAltostratusThe description for CACHE::disable says it's only being disabled for that request so I assume you're using it properly.
Also, if you set persist to none for one case, you should explicitly set persistence in the other case. This is because the persist command takes effect for the duration of the connection.
- Paul_73795NimbostratusI noted what Hoolio said about setting persistence in the other part of the if statement. How do you go about setting it back or re-enabling it to use the persistence profile of the Virtual Server.
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