I've been using the random number generator as recommended earlier in this thread and have found that it causes a much greater number of TCP connections on the server side. So if I run an iRule with rand as follows:
set rndnum [expr { int(100 * rand()) }]
then have some if statements such as:
if { $rndnum > 10 ] } {
pool abc
}
else {
pool xyz
}
}
I will 1 TCP connection on the clientside but many TCP conns on the server side. I'm using an IXIA traffic generator so I can see all connections. Plus I use the BigIP stats.
If I then make the following modification and set rndnum manually I'll see one clientside and 1 server side TCP connection, as expected.
set rndnum 10
set rndnum [expr { int(100 * rand()) + 1 }]
Any explanation as to why this is happening? It's definetly related to running rand. If I run any test at high traffic volumes I'll huge numbers of server side connections.
Thanks.