Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

get actual connection count by an irule

Dear all!
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...

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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

0
Comments on this Answer
Comment made 23-Jun-2014 by mvo 53
Hi Matt, thanks for you fast reply. I want to count HTTPS sessions. The problem with the counter within an irule is that it is not exact. Now i am testing this with a table where i count all entries. Looks more stable but still not perfect.
0