I wonder how to read the actual connection count by an irule. (Like snmp does with OIDs or "tmsh show sys connection"..)
In this particular case, i want to limit the sessions with an irule. If the total connection limit is reached the irule should redirect to another pool or URL. I dont want to count the connections in a session table or other variable.
Maybe you have an idea how this can be done...
Hi, I dont think there is any other way to do this than a global TMM variable.
What do you mean by a session? You mean a TCP connection?
Assuming you mean TCP connection by "session", then in your irule you would init the RULE_INIT event. IN that rule you would init a global variable such as $TOTAL_CONN_CNT. Then you would create the CLIENT_ACCEPTED event and increment/decrement the TOTAL_CONN_CNT based on the creation and destruction of the TCP connections handled by the irule.
You can do it this way, or you can not do it at all