Forum Discussion
avik_bose_1048
Nimbostratus
Aug 07, 2008Need help for cache load balancing irule
Hi,
Need help in configuring an irule for cache load balancing.
The customer has a group of 5 bluecoat proxies which are used to load balance all port 80 traffic.
The customer now has procured 2 additional bluecoat proxies which they want to use exclusively for caching any requests to "YouTube.com".
So , the requirment is that any request to "Youtube.com" should go to these new 2 bluecoat proxies while all other http requests should go to the other 5 older bluecoat proxies.
I have written this following irule to do the same :
when HTTP_REQUEST {
if {[HTTP::uri] equals {http://www.youtube.com}}
{pool pool1}
}else pool pool2
}
}
Not sure if it's correct or not.
Any help will be greatly appreciated.
- Nicolas_Menant
Employee
Hi,when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "www.youtube.com"} { pool pool1 } else { pool pool2 } }
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "www.dailymotion.com" - "195.8.214.141" - "195.8.214.142" - "195.8.214.140" { if {[active_members pool1] > 1]} { pool pool1 else { pool pool2 } } default { pool pool2} } } It may be more interesting to use a class if you add more stuff to filter to different bluecoat: Click here
- avik_bose_1048
Nimbostratus
Thanks a lot for your help. Will try the same on saturday on customer's site and will let u know the results. - avik_bose_1048
Nimbostratus
Hi , - avik_bose_1048
Nimbostratus
Hi , - Patrick_Chang_7Historic F5 AccountYou might want to look up the election hash iRule on devcentral for some technical background on this type of problem.
- Nicolas_Menant
Employee
Hi,
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