Forum Discussion
uni
Altostratus
Nov 27, 2008Switching LB mode based on request
I have been asked to look at switching LB mode based on the request URI. There are two approaches I see to this.
Change the LB:mode based on the request uri:
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/whatever/"} {
LB::mode rr
} else {
LB::mode leastconns
}
}
Presumably the LTM maintains a counter to decide which member to select when using round-robin. Does switching in and out of rr mode reset the round-robin counter, or does it use a "total requests" counter or similar?
Also, does the LB mode reset to the one defined in the pool at each request (i.e. is the "else" clause required)?
If it does reset the counter each time, I assume I would have to have a separate pool for each LB type and select them base on the uri.
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/whatever/"} {
pool roundrobin-pool
} else {
pool leastconns-pool
}
}
This is less desirable, as it means having a duplicate pool with duplicate monitoring, plus additional maintenance requirements.
Any other comments welcome (except "but why would you want to do that?").
- john_124672
Nimbostratus
Interested to hear back on this as well. Can anyone from F5 shed some light into this?
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