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...
Chris_Miller
Jan 06, 2011Altostratus
Give this a shot:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { [active_members [$default_pool]] < 1 } {
pool pool_http_sorry_server
} else {
pool $default_pool } }
Insert comments as you wish.
In the client_accepted event, we're setting the variable "default_pool" to the VIP's default pool. Since a user hasn't been mapped to a pool when client_accepted is triggered, this will return the proper default pool.
Then, we're checking whether the default pool has any active members from HTTP_REQUEST and if not, we're sending it to the sorry_server pool.
Finally, I expect you'll need to use OneConnect here to make sure every HTTP Request is evaluated.
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