当 HTTP 请求时,如果请求的路径以'/pmk/'开头,则使用P_19.50.7.13_16_20148池;否则使用P_19.109.0.20_10001池。

when HTTP_REQUEST {
  if { ([HTTP::path] starts_with "/pmk/") } {
    pool P_19.50.7.13_16_20148
  } else {
    pool P_19.109.0.20_10001
  }
}

该 iRule 使用 when HTTP_REQUEST 语句在每个 HTTP 请求时执行。if 语句检查请求路径是否以 /pmk/ 开头,如果是,则使用 pool P_19.50.7.13_16_20148,否则使用 pool P_19.109.0.20_10001

F5 iRule: 路径匹配负载均衡池

原文地址: https://www.cveoy.top/t/topic/ozsV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录