Forum Discussion
Kevin_106976
Jul 16, 2010Nimbostratus
Distribute load based on uri
Hi,
I want to distribute load across two uri's (/some/uri1 and /some/uri2) on a 70/30 percentage basis. Can I do this via an iRule ?
The_Bhattman
Jul 25, 2010Nimbostratus
Here is another one
when RULE_INIT {
set counter 0
}
when HTTP_REQUEST {
if {$::counter <= 7} {
The first 7 requests are redirected to URI 1
HTTP::redirect "http://uri1"
incr $::counter
} elseif {$::counter <= 10 } {
The next 3 requests are redirect to URI 2
HTTP::redirect "http://uri2"
incr $::counter
} else {
Reset counter and send the 11th request to URI 1
set $::counter 0
HTTP::redirect "http://uri1"
}
}
Again this is all untested conceptual irule code
Bhattman
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