Forum Discussion
Irules Data-Group
Hi,
Please allow me to explain this again:
- Basically idea is to apply a single Irule into all the 120 Virtual-servers(60 HTTP+ 60 HTTPS), Which will intelligently identify whether it should go to Static page("/iss_static") or if thats not matching , it will go to /SEUILibrary/ which is for Dynamic Page content. : sample HTTP Irule which is currently attached to all HTTP Virtual-servers is pasted below again:
when HTTP_REQUEST {
set https_uri [string tolower [HTTP::uri]] log local0. "requested [HTTP::uri]" if {$https_uri equals "/" } { HTTP::redirect "https://parveez.com" pool pool_parveez.com log local0. "redirected from /"
return
} elseif { $https_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 { $https_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, as per the requirement the new Irule not only identifies the static and dynamic content of the page but also it will identify which pool it should go when it hit the Virtual-server by seeing its name) by using Data-groups or Class groups.
-
Ist part:will remain constant
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 https_uri [string tolower [HTTP::uri]] log local0. "requested [HTTP::uri]" if {$https_uri equals "/" } { HTTP::redirect "http:www.lenovo.com pool lenovo.com
log local0. "redirected from /"
return
2nd part: trying to get assistance :
a) if we can use Data-groups here which will easily identify the "/iss_static" for static page requirement or else dynamic page requirement(/SEUILibrary/) which is shown by else statement when it is marked to some pool: b) In 2nd part manual pool selection will go off and wanted assistance to replace the same with some kind of class-maps or Data-groups. c) The idea is to easy Management.
} elseif { $https_uri starts_with "/iss_static" } {
log local0. "matched /iss_static"
pool pool_confarmct.leni2.com_http
log local0. "pool_confarmct.leni2.com_http defined, [LB::server pool] selected" return
} else {
log local0. "no match for rev. close connection" pool pool_apbuild.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