Forum Discussion
Michael_Rose_11
Nimbostratus
Oct 31, 2008Can an iRule loop through values from a file or website?
Greetings all,
Long time reader/user, first time poster.
We are using a wildcard DNS entry to send all *.company.com requests to a specific pool. However, we have another pool setup to handle our larger customers, which use a different hostname. We have been using DNS entries to redirect them to this second pool, but the number of “large” customers is getting quiet large and we would like to make this redirection done on the LB by having it lookup if the hostname exists in a file and redirecting to the specific pool based on if the hostname exists or not.
For example:
*.companyname.com goes to “pool allrequests”.
If the request is received to siteA.companyname.com, redirect to “pool bigcustomers” other wise redirect to "pool allrequests".
We have over 30 hostnames that need to be redirected to a different pool from the wildcard pool.
Can a iRule be written to see if the hostname exists in a file (or website) and redirect based on whether the hostname exists in the file/website or not?
Thanks in advance,
- dennypayne
Employee
Sure just create a data group with the hostnames that need to go to the other pool, let's say call it "bigcustomers".when HTTP_REQUEST { if { [matchclass [HTTP::host] equals $::bigcustomers] } { pool bigcustomers } else { pool allrequests } }
Recent Discussions
Related Content
- Oct 11, 2021Former Member
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