Forum Discussion
pool selectction base on context root .
I have requirement to select pool base on context root. I created two pools and use below irule, however it didn't work, under virtual server I didn't apply any pool under Virtual server ? is that why below iRule didn't work? when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/outpool" { pool outpool_7001_Pool } "/Inpool" { pool Inpool_7003_Pool } }
}
Thx
5 Replies
- Arie
Altostratus
If you select a pool via an iRule there's no need to configure a default pool. A drawback is that you can't readily tell whether a VIP is up or down since it doesn't have any pool members.
As for your iRule, it will do an exact match of "/outpool" and "/inpool". My guess is that you'll want to select pools based on the beginning of the path. You can do that by adding an asterisk (*) at the end of the string.
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/outpool*" { pool outpool_7001_Pool } "/Inpool*" { pool Inpool_7003_Pool } } } - Arie
Altostratus
PS I just noticed that you used a capital "I" in "Inpool". You'll want to change that to lower case.
- KJ_50941
Nimbostratus
Thank you so much, that was it , Capital "I".
appreciate quick response.
- Arie
Altostratus
Glad to help. Would you mind marking the response as the answer?
- KJ_50941
Nimbostratus
Thank you so much, that was it , Capital "I".
appreciate quick response.
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