Forum Discussion
youe_100642
Nimbostratus
Nov 30, 2011Host header based web farm iRule & Class
We run multiple name based clusters of web servers (some with thousands of name based virtual hosts). For various reasons, we need to be able to divide the web server configuration of these clusters ...
hoolio
Cirrostratus
Nov 30, 2011Hi Youe,
Great work. That's a nice, simple iRule for the scenario.
The only improvement I see is to change class match -element to class match -value to retrieve just the pool name from the datagroup. You can then check for $zone_pool ne "" before trying to assign the pool.
Another slight change you could make is to check that the host isn't null or an IP before doing the class match:
Check if the host header is not null and not an IP address
if {[string match {*[a-zA-Z]*} [HTTP::host]]}{
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects