Forum Discussion
Born_7758
Jun 23, 2011Nimbostratus
Directing traffic to a specific pool member
Hello, I would like to forward traffic to a specific pool member depending on what the URL is. Currently I have an iRule that directs traffic to 1 of 5 pools depending on the URL. Instead ...
Colin_Walker_12
Jun 23, 2011Historic F5 Account
That's pretty easy as well, actually, as long as you have the IP addresses of the members in question.
So if member 1 is 10.10.10.10, and member 5 is 10.10.10.14:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/paymentResponse1.jsp" {
pool resp_pool member 10.10.10.10 80
}
"/paymentResponse2.jsp" {
pool resp_pool member 10.10.10.11 80
}
"/paymentResponse3.jsp" {
pool resp_pool member 10.10.10.12 80
}
"/paymentResponse4.jsp" {
pool resp_pool member 10.10.10.13 80
}
"/paymentResponse5.jsp" {
pool resp_pool member 10.10.10.14 80
}
}
}
And if you have many more you could use a data group and the class command to simplify the long switch case.
Colin
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