Forum Discussion
Can I load balance multiple subdomain URLs?
Hi cmeyer,
are you looking for Content Switching / URL based load balancing? In that case, this iRule should be a starting point:
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::path]] {
"/path1*" {
pool pool_app1
return
}
"/path2*" {
pool pool_app2
return
}
default {
pool pool_default
}
}
}
Is this helpful for you?
KR
Daniel
- cmeyerJul 19, 2022
Altostratus
Daniel_Wolf In this case my pools would stay the same. I am utilizing the same servers in each case. Not sure if that matters.
- Daniel_WolfJul 20, 2022
MVP
If you have loadbalancing for page.domain.com, loadbalancing will also work for page.domain.com/subsite1, page.domain.com/subsite2, or anything else - since they are served by the same pool of servers as page.domain.com. In this scenario, there is no need for an additional iRule.
Unless... I didn't get your setup right 🙂- cmeyerJul 21, 2022
Altostratus
I think I understand. I would specify the same pool in the rule and define "path1" and "path2". There is currently no iRule in place since we were balancing just the single page. I will give that a try. Thanks for the help!
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
