Forum Discussion
Aug 14, 2015
It'd be something like this:
when HTTP_REQUEST {
if { rand() > 0.25 } {
pool pool_1
} else {
pool pool_2
}
}
Please note that unless you use connection multiplexing this rule would establish a new connection server-side every fourth request (more or less). If I were you I'd change the event to CLIENT_ACCEPTED because:
- Then the connections would not have to be re-established saving server performance.
- The iRule is only executed once per connection instead of once per request saving LTM performance.
Good luck!
/Patrik