LillyM_9417
Dec 15, 2011Altostratus
Switch & external datagroup file
Hello,
I need to create an irule with the following properties..
Thanks a lot in advance..
---Firstly, I am doing all the following items with IF claues in prod enviroment without any problem but we want to make cpu utilization & if it is possible we want to use switch clause.
* I have 4- 5 Ip ranges, and I need to decide which external group files will be chose.
* I have many external data group files. They all have many string values inside.
* I need to check $trx1 (I am doing binary scan to catch the value from the data packet) value, with these string values those inside the external datagroup files
* I could do this with IF statement but it comsumes so much CPU
* Thats why I am trying to using SWITCH clause instead of IF clause
Example:
If ip is in the x.x.x.x/24 ip range
If $trx1 in the A external datagroup file - do something
If $trx1 in the B external datagroup file- do something
If $trx1 in the C external datagroup file- do something
else- do something else
If ip is in the y.y.y.y/24 ip range
If $trx1 in the D external datagroup file - do something
If $trx1 in the E external datagroup file - do something
If $trx1 in the F external datagroup file - do something
else - do something else
else
do something - go to default pool