Forum Discussion
Multiple strategies for maintenance page
- Aug 01, 2019
Your irule is just missing the LB::reselect command. Pool on its own is not enough as the pool has already been selected and tried in the LB_FAILED event.
Some of my configuration requires the same; if the primary pool is down it is necessary to send the traffic to a standby server in a different pool. I do it without a lot of checks in the irule, using standard config instead.
The pool is configured to do a reselect to a different member if a x number of the other members are down.
Then the irule only includes the LB failed event:
when LB_FAILED { LB::reselect pool web-noname_standby_pool persist none }
Hello,
Maybe you are trying that in the wrong event.
Is better to check members status before send to pool, for example in HTTP_REQUEST event, right?
I changed some parts to retry on default pool before sent to the backup and turns back when default pool comes up again. It is just an idea.
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
set _retry 0
}
when HTTP_REQUEST {
if { [active_members $default_pool] > 0 } {
pool $default_pool
} else {
log local0. "no target pool member available, ressort to fallback pool"
pool fallback_https_pool
}
}
when LB_SELECTED {
log local0. "the pool and member [LB::server] has selected..."
}
when LB_FAILED {
if { [incr _retry] <= 3 } {
log local0. "the pool member [LB::server addr] has failed, trying another ($_retry)..."
LB::mode rr
LB::reselect
}
}
when SERVER_CONNECTED {
set _retry 0
}
Regards.
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