Forum Discussion
GaryZ_31658
Jul 14, 2008Historic F5 Account
Vip target VIP
All,
I have a scenario where I want to LB "pods" of servers using a Master VIP. I could have many nodes in each pool and do not want to disable each individual node when we take a "pod"...
GaryZ_31658
Jul 15, 2008Historic F5 Account
We decided to modify the logic slightly... Instead of RR connections to the Pod VIP's we allow the first connection (no cookie set) to go to a "master pool" which includes all the nodes contained in each pod. We will use least connections (LB Algorithm) on this master pool to ensure the new request goes to not only the most available pod but also the server with the least connections. My thoughts are that once the logic sends this initial connection to the most available node, we can set a persist cookie on the reply. This cookie name/value is being set correctly based on server info in the podx_class but I need to include the proper persist value (Server:port) inside the cookie.
Question: Can anyone tell me how to set the value of the cookie so when the return comes back, and the iRule logic sends the return request to the proper VIP, the cookie can be used to persist to the proper node inside the pod pool?
Thanks,
when HTTP_REQUEST {
set reqcookie [findstr [HTTP::cookie names] "my_cookie"]
if { $reqcookie starts_with "my_cookie"} {
set podcookie [findstr $reqcookie "my_cookie" 9 " "]
set podvip [findclass "$podcookie" $::pod_ip " "]
virtual $podvip
} else {
pool master_pod_pool
}
}
when HTTP_RESPONSE {
if { [matchclass [IP::server_addr] equals $::pod1_class] } {
HTTP::cookie insert name "pod1" value [IP::server_addr]
} elseif { [matchclass [IP::server_addr] equals $::pod2_class] } {
HTTP::cookie insert name "pod2" value [IP::server_addr]
} elseif { [matchclass [IP::server_addr] equals $::pod3_class] } {
HTTP::cookie insert name "pod3" value [IP::server_addr]
}
}
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