VictorC
Apr 05, 2012Nimbostratus
Performance question on 2 iRules
Hi all,
I have 2 different iRules I am using and they both do the same thing so that I can conserve IP addresses. I was wondering if there was any performance hit on a LTM running 10.2 if I used one over the other. Here are simple samples:
rule myrule1 {
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"url1.mycompany.com" {
pool mypool1
}
"url2.mycompany.com" {
pool mypool2
}
"myurl3.mycompany.com" {
pool mypool3
}
default {
discard
}
}
}
}
rule myrule2 {
when HTTP_REQUEST {
switch -glob [HTTP::host] {
url1* { pool mypool1 }
url2* { pool mypool2 }
url3* { pool mypoo13 }
default { pool mypool1 } or discard it
}
}
}
Note that on both these iRules I'm expecting to match up to 10 URLs/pools and the number of clients accessing them could be a thousand. I would also be implementing a few dozen of these iRules. I would like to know which iRule performs better and has the least cpu/memory utilization on the LTM.
Any advice is great.
Thanks