Forum Discussion
Aidan_Carty_242
Nimbostratus
Jan 31, 2006Loadbalance redirects
Were migrating an internet application behind a BIGIP,
it has specfic url requirements so we have a simple iRule on a virtual server, all working fine.
rule redirect_to_webservers {
...
Colin_Walker_12
Feb 01, 2006Historic F5 Account
Well, my first recommendation, if it's possible, would be to create a pool with the three systems in it, and just let BIG-IP load balance normally to that pool. You wouldn't need an iRule at all for this.
If, for some reason, you can't use a pool, and need the explicit redirect in the iRule, then you'd just need something like a simple counter to spread out the requests in a round robin fashion, like this:
*edited to include unruley's suggestion below*
when RULE_INIT {
set ::n 1
}
when HTTP_REQUEST {
if { $::n >= 4 } {
set n 1
}
HTTP::redirect "https://www$n.server.com"
incr ::n
}-Colin
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