Forum Discussion
Al-Mutlaq_21911
Nimbostratus
Aug 26, 2015direct traffic based on information from the XML request
Dear All,
I need a solution on IRULE for example to solve the following scenario:
I have 10 servers that will receive XML requests. the unique ID in each XML request will be a number such ...
Stanislas_Piro2
Cumulonimbus
Dec 24, 2015You can try this:
The pool member 8080 is assigned at the beginning... if msisdn is present and pool members are up, the pool member is changed.
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
pool $default_pool member 172.24.248.85 8080
set msisdn [URI::decode [URI::query [HTTP::uri] msisdn]]
switch -glob $msisdn {
"*0" { set ports {8080 8180}}
"*1" { set ports {8180 8080}}
"*2" { set ports {8280 8380}}
"*3" { set ports {8380 8280}}
"*4" { set ports {8480 8580}}
"*5" { set ports {8580 8480}}
"*6" { set ports {8680 8780}}
"*7" { set ports {8780 8680}}
"*8" { set ports {8880 8980}}
"*9" { set ports {8980 8880}}
default { set ports {8080 8180}}
}
foreach port $ports {
if { [LB::status pool $default_pool member 172.24.248.85 $port] eq "up" } {
pool $default_pool member 172.24.248.85 $port
break
}
}
}
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
