Forum Discussion
Exclude subfolder from loadbalancing
Goodafternoon folks
How can I exclude a subfolder from loadbalancing?
Website: testsite.com (just example, because website is not public available) Adminmodule: testsite.com/admin/login.aspx System: LTM BigIP
Server: IIS Sites: the website testsite.com is now loadbalanced in a pool with 2 servers, this is already working. The .../admin/login.aspx subsite can not be loadbalanced. We can only have 1 admin module on a server. Is there a way to exclude this?
Thx a lot.
Drew
5 Replies
- Richard__HarlanHistoric F5 Account
you can do something like this. Note I used contains as it looks like that was not the full uri. If you have the full URI you can use equals.
when HTTP_REQUEST { if { [HTTP::uri] contains "/admin/login/aspx" } { node } }
- RickM
Nimbostratus
I have 4 pools, 2 are set up for round-robin, the other 2 have the same servers but use priority activation so only one is active at a time. This wiki markup is killing me, I don't have the patience for this junk today...
IRULE
Select non-loadbalanced pool or loadbalanced pool when HTTP_REQUEST { if { [string tolower [HTTP::path]] starts_with "/path-not-loadbalanced/" } { select proper non-loadbalanced pool if { [TCP::local_port] equals "443" } { pool nlb-https } else { pool nlb-http } } else { select load balanced pool if { [TCP::local_port] equals "443" } { pool lb-https } else { pool lb-http }}} - Drew_123833
Nimbostratus
Hello Richard
Thx for your reply. For now it seems to work, here is the irule
when HTTP_REQUEST { if {[HTTP::uri] contains "/admin/login.aspx"} { node 192.168.1.20 } else {pool magic_pool} } - Kevin_Stewart
Employee
Rickmmcl, you're on the right track I think, but you need to enable or disable a server SSL profile if you're going between HTTP and HTTPS pools. Add a server SSL profile to your VIP and an iRule like this:
when HTTP_REQUEST { if { [string tolower [HTTP::path]] starts_with "/path-not-loadbalanced/" } { select proper non-loadbalanced pool if { [TCP::local_port] equals "443" } { pool nlb-https } else { pool nlb-http SSL::disable serverside } } else { select load balanced pool if { [TCP::local_port] equals "443" } { pool lb-https } else { pool lb-http SSL::disable serverside } } }And you should probably add a OneConnect profile as well.
- Drew_123833
Nimbostratus
I had some problems that we couldn't always login on the admin subsite. When we reached load balancer 1, the user was not be able to logon. This solved the problem:
when HTTP_REQUEST { if {[HTTP::uri] contains "/admin/*"} { node 192.168.1.20 80 } else {pool magic_pool} }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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