Forum Discussion
Elias_O_16228
Nimbostratus
Apr 22, 2013Redirecting request based on port number
I have two application servers as pool members to multiple pools. I want to be able to load balance based on port.
For example, If a user click first link, load balance staging pool. If user is...
Elias_O_16228
Nimbostratus
Apr 23, 2013Below is what I was able to put all together, evaluating only the URI and wildcard (*) for other trailing links.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
http://example.mtd.today.com:8088/tuesday* "8088" { pool Stagin_Pool }
http://example.mtd.today.com:8089/wednesday* "8089" { pool Management_Pool }
http://example.mtd.today.com:8090/thursday* "8090" { pool Development_Pool }
http://example.mtd.today.com:8091/friday* "8091" { pool Test_Lab_Pool }
default { pool Production_Pool }
}
}
I was not sure of the ports with quotes "8091" based on your first response and the ones in the hostname.
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