Forum Discussion

ichalis_37981's avatar
ichalis_37981
Historic F5 Account
Jan 18, 2007

Session table usage

Hi,

 

 

I am attempting to use the session table to keep track of how many concurrent RTSP streams a Bigip is handling for throttling purposes. I want to use the persistence table because I would like to automatically time out inactive connections.

 

 

So far i have got this all to work, but the big problem is i dont have any efficient way to count the number of entries in the session table. If an entry expires within the table, how do we tell that this has happened? From what i understand, we are limited to:

 

 

session uie lookup

 

session uie add

 

session uie delete

 

 

So the only way i can think of to count the number of entries is to loop through the entire table counting entries that exist - which would be impractical when the table gets large.

 

 

Another possibility is to manage my own Array and periodically loop through it, expiring all old entries - which would also be expensive.

 

 

Has anybody got any tips on how to use the persistence tables, or any ideas on how else this may be done?

 

 

Cheers,

 

Evan.

 

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    There hasn't been a good solution to this problem yet that I've seen. Since there isn't an inherent way to count the entries in the table, people have run into this same question of efficiency before. I know it's been brought up a couple of times and I've heard rumour that there might be a solution on its way at some point, but I've not seen anything just yet. Perhaps someone else has some thoughts?

     

     

    Colin
  • I have to admit there have been several times where a direct interogation of the session table would have been nice, but how large of a problem is that really? If you assign a session timeout value, doesn't the entry get removed upon timeout?

     

     

    Cheers,

     

     

    Keith
  • the session entry will be removed when its timeout value is reached

     

     

    the timeout will be reset to 0 every time you do a session lookup.

     

     

    To know how many session entry you have, you may try this method:

     

     

    -Have a counter you increment everytime you have an entry in the session table(global variable).

     

     

    then you set the same value between your tcp timeout profile and session timeout. (be sure to always update your timeout session table with a lookup everytime you receive data)

     

     

    With the event client_closed you should then decrease this counter. If you have the same value between your tcp timeout and session timeout it should mean you lost the entry in the session table as well.

     

     

    Shouldn't take too much processing.

     

     

    HTH

     

  • Am I wrong in assuming the session entry should be deleted if the node it is applied to is down?