Forum Discussion
Irules Data-Group
A. And secondly yes Sir, even for /iss_static page, there are different pools( 2-3 pools only) but problem is the naming convention is not matching with the Virtual-server, so don't know how to send the traffic to the right pool. So, that's why don't why how can we put that in Data-group.
B. So, lets say we have 3 pools for /iss_static page : a) pool_confarmct.leni2.com_http b) pool_confarmsp.leni2.com_http c) pool_confarmap.leni2.com_http
C. So, plan is to make a manual list against all the Virtual-servers created and to note the current static pool mapped, and based on that we will create 3 Irules which will contain Data-Groups containing pools for Dynamic pages also.
Means Ist Irule with pool_confarmct.leni2.com_http for /Iss_static and with Data-Group for Dynamic Pages.
2nd Irule with pool_confarmsp.leni2.com_http for /Iss_static and with Data-Group for Dynamic Pages.
3rd Irule with pool_confarmap.leni2.com_http for /Iss_static and with Data-Group for Dynamic Pages.
So, that next time any new Virtual-server we need to create, we just add the new pool name into the Data-Group for Dynamic content and keeping in mind the specific pool for /iss_static, we would call that particular Irule.
with these inputs, kindly assist me in writing or adjusting the full irule as per our requirement:
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.parveez.com" pool pool_parveez.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 }
}
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