Forum Discussion
jdekrnl_118963
Nimbostratus
Aug 06, 2013Rewrites to different virtual servers
I was wondering if any of you may have any suggestions on how to solve a desgin problem. The attached picture may give an idea of our current set up. I am new to F5, so I apologize if this is a trivi...
Kevin_Stewart
Employee
Aug 06, 2013This is a crude example, but I think close to what you're trying to accomplish:
when RULE_INIT {
set ::lb_counter 1
}
when HTTP_REQUEST {
if { not ( [HTTP::header Cookie] contains "BIGipServer" ) } {
if { $::lb_counter == 1 } {
pool port-8081-pool
log local0. "sending to port-8081-pool"
set ::lb_counter 2
return
} elseif { $::lb_counter == 2 } {
pool port-8082-pool
log local0. "sending to port-8082-pool"
set ::lb_counter 1
}
}
}
Create two pools (example: "port-8081-pool" and "port-8082-pool") and apply the built-in cookie persistence profile to the the VS00 virtual server. On first request the client will not present a BIG-IP persistence cookie and get round robin load balanced to one of the pools. LTM will then inject that pool's persistence information into the first response to the client. Subsequent requests will contain the "BIGipServer" cookie and bypass the round robin function in favor the of the cookie's persistence information.
You could do something similar with VIP targeting, but you'd need to handle persistence a little more manually. The real benefit of VIP targeting is that each internal VIP could have its own unique configurations and iRules.
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