Forum Discussion
iRule and persistence behavior with active_members and no persistence set
I have the following iRule to failover requests should there be at least one member of the primary pool down. The failover process works, but when all members come back up in the primary pool the connections are not then sent to the primary pool. Originally I had cookie persistence enabled on the virtual server, but even after setting persistence to none and testing with different "new" connections, all traffic is still sent to the backup pool. Any thoughts on why once it fails over, the VS or iRule continues to believe that traffic should be sent to the backup pool?
when HTTP_REQUEST {
if { [active_members primary-qa-443_1214-pool] < 2 } {
pool backup-qa-443_1214-pool
} else {
pool primary-qa-443_1214-pool
}
}
2 Replies
- JG
Cumulonimbus
This article should help shed light on your issue: K9800: Using an iRule to load balance HTTP requests to multiple pools .
- JG
Cumulonimbus
Your "new" connection may already have an entry in the connection table. You can try this:
when HTTP_REQUEST { catch {LB::detach} if { [active_members primary-qa-443_1214-pool] < 2 } { pool backup-qa-443_1214-pool } else { pool primary-qa-443_1214-pool } }
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