Forum Discussion
6 Replies
- Vaibhav_95632NimbostratusPasting the irule again as some statements are missing when LB_FAILED { if { [active_members -list ] < 1 } { catch { LB::down pool member } catch { LB::down pool member } LB::reselect node } else { pool APPSRV_POOL } }
- nitassEmployee
just wondering why you don't use active_members checks pool status in clientside event before choosing pool (something like example in active_members wiki).
active_members wiki
https://devcentral.f5.com/wiki/iRules.active_members.ashx
anyway, active_members -list returns a list. if you want a number, you do not need the list option.
please be noted there is a bug that active_members does not work properly with priority group. it is fixed in 11.5.0.
ID428895 - active_members iRule command doesn't take into account priority groups for pools with minactive members set
- Vaibhav_95632Nimbostratus
Thanks for the answer Nitass let me try that.
Will it select the pool member despite of priority groups in place because the member that I need to choose is in the lowest priority amongst the other ones.
- nitassEmployee
Will it select the pool member despite of priority groups in place because the member that I need to choose is in the lowest priority amongst the other ones.
i understand there is no issue because you are using node command.
e.g.
when CLIENT_ACCEPTED { if { [llength [active_members -list db_pool]] < 1 } { node app_pool_member_3 } else { pool app_pool } }
- hooleylistCirrostratus
You could avoid the llength command using this:
when CLIENT_ACCEPTED { if { [active_members db_pool] < 1 } { node app_pool_member_3 } else { pool app_pool } }
Aaron
- HarishNimbostratus
Can you suggest similar solution , if i have more than one pools that needs the active members check ? active_members -list db-pool will list members of the pool db_pool, what if I have 2 other pools like app1_pool and app2_pool and i would like to run a common rule for all pools that it would hit on a pool ( depending on the app request ) using : when HTTP_REQUEST...
Thanks,
Harish