Forum Discussion
Elias_O_16228
Nimbostratus
Apr 22, 2013Redirecting request to different pools based on port number
I have two application servers as members to multiple pools. I currently created multiple VS with unique port service.
As you can see from example below, I would like users to be able to, lets s...
Kevin_Stewart
Employee
Apr 22, 2013You don't have to create multiple VIPs at all. With the iRule you have here, minus the port numbers, you can host all of the applications on a single IP and port. I should also point out that [HTTP::host] is only returning the host name and not the URI, so because the host name is the same for all of these, you can create a single VIP and modify your iRule to look something like this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/tuesday*" { pool Stagin_Pool }
"/wednesday*" { pool Management_Pool }
"/thursday*" { pool Development_Pool }
"/friday*" { pool Test_Lab_Pool }
default { pool Production_Pool }
}
}
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