Forum Discussion
PG0581
Cirrus
Nov 05, 2020iRule to load balance FDQNs
I'm wondering if it's possible to have an iRule load balance (round-robin) between FQDNs. Here's the idea: You would have a virtual server with no pool and use an iRule to redirect to a couple FQD...
jaikumar_f5
Noctilucent
Nov 06, 2020This is a weird requirement 🙂 What exactly are you trying to achieve with this. Just trying to understand the requirement/criteria here.
Round robin inside the Irule is not possible as far I know, but with the rand operator you'll get random numbers. So this will drive certain users to abc & others to def
when HTTP_REQUEST {
set random [expr int(rand()*100)]
if { $random < "50" } {
HTTP::redirect "https://www.abc.com"
} else {
HTTP::redirect "https://www.def.com"
}
}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