Forum Discussion
iRule LB_FAILED event when not doing any load balancing
i have the following iRule on a standard virtual server without a default pool, no local traffic policies and no other iRules:
when HTTP_REQUEST {
log local0. "HTTP_REQUEST"
TCP::close
return
}
when LB_FAILED {
log local0. "LB_FAILED"
}
when i perform a single HTTP request is it logical that the LB_FAILED event is triggered? i mean nowhere any selection is made and the client side TCP session is closed. so why the LB_FAILED?
- Brad_ParkerCirrus
You're not going to get to LB_FAILED as no LB action was taken when you closed the connection with TCP::close, then exit with return. There's no server side connection needed, so no load balancing decision needs to be made.
- giltjrNimbostratus
Sorry for the stupid question, but what are you trying to do? What do you expect to happen? If you are not doing load balancing, then why are you even checking for LB_FAILED?
- giltjrNimbostratus
Well at a very high level, the only time LB_FAILED should be triggered is when LTM is fails to choose a pool or can't connect to a pool member.
Since you have no pool associated with this VS, I would assume that LTM is triggering LB_FAILED, because there is no pool to choose.
Ref:
https://devcentral.f5.com/wiki/iRules.lb_failed.ashx
- shaggyNimbostratus
not sure if the behavior is logical or not, but you may be able to avoid it by using the event command:
when HTTP_REQUEST { log local0. "HTTP_REQUEST" TCP::close event LB_FAILED disable return } when LB_FAILED { log local0. "LB_FAILED" }
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