To forward traffic to a particular pool using an iRule.

Hi,

Need to forward the requests to Pool 1 only if the pool member is alive. I have a health check monitor HTTP_200 ( GET /test HTTP/1.1\r\nHost: x\r\n\r\n and Receive 200 ) applied to Pool 1.

If Pool_1 is down then the client requests should be forwarded to Pool_2.

Would like to do this by using an iRule, So could you please let me know how can we refer the health monitor which is applied to a Pool in an iRule to check the status of the Pool or Pool Members.

Thanks, Yugandhar.

You dont need to know each member status, because active_members gives the total available members of a pool. you can use this command like that:

when HTTP_REQUEST {
  if { [active_members Pool_1] >= 1 } {
    pool Pool_1
  } else {
pool Pool_2
  }
}