Forum Discussion
Need to Replace POOL Selection Using Data-Groups
Hi,
Ok let’s take one existing of one sample Irule extracted from older posts into the same subject:
when CLIENT_ACCEPTED { set default_pool [LB::server pool] log local0. "Default pool [LB::server pool] set" log local0. "Client IP is [IP::remote_addr]" }
when HTTP_REQUEST { set http_uri [string tolower [HTTP::uri]] log local0. "requested [HTTP::uri]" if {$https_uri equals "/" } { HTTP::redirect "http://www.lenovo.com" pool pool_lenovo.com-http log local0. "redirected from /"
return
} elseif { $http_uri starts_with "/iss_static" } {
log local0. "matched /iss_static"
pool pool_confarmsp.leni2.com_http
log local0. "pool_confarmsp.leni2.com_http defined, [LB::server pool] selected" return
} elseif { $http_uri starts_with "/"} { log local0. "URI starts with /"
pool pool_apuat_leni2.com_http
log local0. " pool_apuat_leni2.com_http defined, [LB::server pool] selected" return
} else {
log local0. "no match for rev. close connection"
pool pool_apuat_leni2.com_http }
}
So summary:
-
If we check the HTTP Profile Irules, we have much in common and we have different pools mentioned into the irule w.r.t Virtual-server too, so in place of that we wanted to have a class-group/Data-group.
-
So, when a user hit the Virtual-server, the request will check whether it need the static page mentioned by "/iss_static" or to the dynamic page content mentioned in elseif statement and then go to respective pools, but our requirement is saying not to specify manual pool into the Irule, we need to specify with the Data-group.
-
We want to keep constant the pool marked against iss_static into the Irule, only we wanted to keep/add Data-group for the pools mapped against the ElseIf statement( the pool where the traffic will go when it don’t match iss_static).
} elseif { $http_uri starts_with "/" } { pool pool_apctdev.leni2.com_http return
- And for future if any new request comes, apart from Virtual-server creation, we will just attach the irule which contains the Data-group which contains all the pool information into that, and in that Data-group we will just add the new pool, so this is to eliminate maximum of human error and operationally also this will be great.
Whether this concept work, putting all the Pools in Data-group and by what means we can match or send the entry to the right pool based on the respective Virtual-Server.
Thanks and Regards Parveez
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