Forum Discussion
Bill_Guo_210985
Nimbostratus
Aug 16, 2015how to use irule to achieve the complicated load balancing requirement (url contents, cookies for site stickiness)
The application is pointed to one vip with serveral url contents. These url contents are categorized to 2 classes (Content A and content B). Content A is load balanced in the pool-a (spanned at Site ...
David_Larsen_23
Aug 25, 2015Historic F5 Account
This might get you started in the right direction. From here you will have to figure out how to set the persistence to follow the cookie value. That shouldn't be too hard:
{{
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"contenta" {
pool A
HTTP::header insert CookieA [LB::server]
}
"contentb" {
set mycookie {[HTTP::cookie CookieA]}
if [HTTP::cookie CookieA] {
switch -glob $mycookie {
"site1" {
pool poolB-site1
HTTP::header insert CookieB [LB::server]
HTTP::header remove CookieA
}
"site2" {
pool poolB-site2
HTTP::header insert CookieB [LB::server]
HTTP::header remove CookieA
}
}
}
}
}
}
}}
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