Forum Discussion
iRule (round robin) modification - ignore if the node in pool is down!
Hi folks,
I'm doing something similar (with less iRule skills then you :D), I need to Load Balance with 4 links:
10.x.x.121:10080/apex/apex.jnlp 10.x.x.122:10080/apex/apex.jnlp 10.x.x.121:9080/apex/apex.jnlp 10.x.x.122:9080/apex/apex.jnlp
when RULE_INIT {
set ::whichone 0
set ::servers [list "10.203.10.121" "10.203.10.122"]
Unfortunately have to hardcode the server IPs here
set ::redirs [list "10.203.10.121:10080/apex/apex.jnlp" "10.203.10.122:10080/apex/apex.jnlp" "10.203.10.122:9080/apex/apex.jnlp" "10.203.10.121:9080/apex/apex.jnlp"]
set pool pl_redirect_pool
}
when HTTP_REQUEST {
if { [LB::status pool $pool member [lindex $servers $::whichone] 80] eq "up" } {
HTTP::redirect [lindex $::redirs $::whichone]
} else {
HTTP::redirect [lindex $::redirs [expr {! $::whichone}]]
}
set ::whichone [expr {!$::whichone}]
}
Just to make it clear, VS is on port 80 (users will hit port 80 ), Port and Address translations are thicked, snat automap, default http profile, no pools associated, irule assigned. Point is when users are typing application-name.company.local they should get one of the links from above. Then Java Client to Server communication will follow. If you can assist me to make it work, it's very similar to one you're discussing about.
Recent Discussions
Related Content
* 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