Forum Discussion
Michael_Yates
Apr 26, 2010Nimbostratus
You could seperate the traffic to each pool of servers based on the content type or by the request in the URI:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/content1" } {
pool pool.for.content1
}
elseif {[string tolower [HTTP::uri]] starts_with "/content2" } {
pool pool.for.content2
}
elseif {[string tolower [HTTP::uri]] starts_with "/content3" } {
pool pool.for.content3
}
elseif {[string tolower [HTTP::uri]] starts_with "/content4" } {
pool pool.for.content4
}
elseif {[string tolower [HTTP::uri]] starts_with "/content5" } {
pool pool.for.content5
}
Choose a Default Action none of the above content is matched
Most often a redirect to a different site, or a redirect to a url that
would be matched by this iRule
else {
HTTP::redirect http://[getfield [HTTP::host] ":" 1]/content1
}
}
Once seperated into each Pool, I'm not sure that you would need to go any further than a custom F5 Cookie Setting to do the rest. These are the possible settings:
Cookie Hash: Specifies that the server provides the cookie, which the system then maps consistently to a specific node.
HTTP Cookie Insert: Specifies that the system inserts server information, in the form of a cookie, into the header of the server response. This is the default setting.
HTTP Cookie Passive: Specifies that the server provides the cookie, formatted with the correct server information and timeout.
HTTP Cookie Rewrite: Specifies that the system intercepts the BIGipCookie header, sent from the server, and overwrites the name and value of that cookie.
Hope this helps.