Forum Discussion
Get current default pool name in an iRule?
I went through LB and virtual and I don't see anything that would get the real time configuration of a virtual server.
It looks like most examples are related to setting pool is based on information on the http request (file type, path, etc).
I have a scenario where I want to flip the default pool between a "blue" server pool and a "green" server pool as part of an application deployment. Pooled tcp connections can have long lifetimes which leave them connected to the "off" server pool. I need a way to gracefully route traffic to the new pool without forcing the connection closed.
Is this possible in an iRule?
Something similar to this:
when CLIENT_ACCEPTED {
set original_pool [LB::server pool]
}
when HTTP_REQUEST {
pseudo code
set current_pool [SOME_HOW_GET_THIS_INFO_FROM_THE_VIRTUAL_SERVER]
if ($current_pool <> $original_pool) {
pool $current_pool
}
pseudo code
}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
