Forum Discussion
IheartF5_45022
Nacreous
Is this what you're after?
when XML_CONTENT_BASED_ROUTING {
for {set i 0} { $i < $XML_count } {incr i} {
if {($XML_queries($i) contains "CDetails")} {
pool qa2-pool
} elseif {($XML_queries($i) contains "GetBalances")} {
pool qa2-pool
}
log local0. "IP:[IP::remote_addr] XML_queries\($i\):$XML_queries($i) pool:[LB::server pool]"
}
}
BTW the logic above doesn't quite make sense - you may want to put a 'break' statement in to leave the loop?
sandiksk_35282
Jan 23, 2017Altostratus
This is the irule I am using .
ltm rule prd_xml_irule { when XML_CONTENT_BASED_ROUTING { for {set i 0} { $i < $XML_count } {incr i} { log local0. $XML_queries($i) if {($XML_queries($i) contains "CDetails")} { pool prd2_pool } elseif {($XML_queries($i) contains "GetBalances")} { pool prd2_pool } elseif {($XML_queries($i) contains "GetSPoints")} { pool prd2_pool }
} } } and if these attributes does not match then they will be hitting the default pool defined in the VS.