Subtables, performance and resouces
Hi,
I know that subtables should be be used sparingly because each subtable is pinned to TMM instance that created subtable - so it's using RAM of this TMM - could create uneven RAM consumption.
So I would like to verify if my idea is good considering performance and resource usage.
I need to collect plenty of different data about HTTP session. Sure I do not know session id value in advance - it's created as cookie by some app server.
My idea is:
- Create subtable named using cookie value of cookie used to track session
- Then create key is such subtable using strings describing data I need to collect and store - some with indefinite lifetime some with set lifetime
- As value for keys I will use data that is necessary to be stored to make decisions how to handle given session or just for string statistical info
- Using such setup I can lookup subtable using session id as name and then key to retrieve data I need to proceed with necessary logic for my iRule
- That allows me to handle situation when subtable name is not known in advance - created dynamically using my session cookie value that I can't control, then I am able to retrieve both know keys and unknown key (using subtable keys enumeration)
Question is if that is good approach performance is resource wise? Or maybe there is better way?
Some keys will have lifetime or timeout set, other (for statistical/historical purposes indefinite) not.
That is some other related question - is there easy/fast way to check creation and last touch time for keys? I know that there are -remaining options for keys, but I cant't find such options to retrieve mentioned metadata - is there any? Can figure out how to check calculate creation time if lifetime is known for key - just retrieve remaining and do some math based on current time. Similar probably for timeout - but still it's indirect - some math is needed - maybe there is some direct way?
Piotr