Forum Discussion
Mouene_240365
Nimbostratus
Aug 21, 2016load balancing 4 servers
I have 4 web application servers and I am successfully load balancing between them , except I want F5 to load balance only between two of these servers once the URI become(for example):
http://192.16...
Kevin_Stewart
Employee
Aug 21, 2016Pretty straight forward. Create two pools: one with all four and the other with the two specific ones. Assign the pool of 4 to the virtual server and employ an iRule something like this:
when HTTP_REQUEST {
if { [string to lower [HTTP::uri]] starts_with "/arch/enj" } {
pool special_pool
}
}
You could also use a switch:
when HTTP_REQUEST {
switch -glob [string to lower [HTTP::uri]] {
"/arch/foo*" -
"/arch/bar*" -
"/arch/enj*" {
pool special_pool
}
}
}
And depending on BIG-IP version you could also skip iRules and do all of this in CPM (LTM policies).
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