Forum Discussion
Chris_Phillips
Nimbostratus
Oct 11, 2012subtable entry expiry
Howdy,
I've a rate limiting iRule that adds expiring entries to a subtable and blocks a request if the size of the subtable is over a certain limit. hopefully no more detail is actually required...
spark_86682
Oct 25, 2012Historic F5 Account
We're starting to get into implementation details now, rather than "the way it's defined to work", but it's checked on every direct access.
I still get the feeling we're talking past each other a little. Here's some code to demonstrate what I mean:
when CLIENT_ACCEPTED {
table set key value 1
set i 0
while { $i < 20 } {
set value [table lookup -notouch key]
set time [clock clicks]
set sec [string range $time 0 end-6]
set msec [string range $time end-5 end]
TCP::respond "At time $sec.$msec, value is $value\n"
after 100
incr i
}
TCP::close
}
And here's the output:
At time 1351212932.733766, value is value
At time 1351212932.832804, value is value
At time 1351212932.933246, value is value
At time 1351212933.032919, value is value
At time 1351212933.132832, value is value
At time 1351212933.233118, value is value
At time 1351212933.333066, value is value
At time 1351212933.432822, value is value
At time 1351212933.532911, value is value
At time 1351212933.632760, value is value
At time 1351212933.733043, value is value
At time 1351212933.833203, value is value
At time 1351212933.932783, value is value
At time 1351212934.033167, value is
At time 1351212934.132744, value is
At time 1351212934.232816, value is
At time 1351212934.332892, value is
At time 1351212934.432927, value is
At time 1351212934.532918, value is
At time 1351212934.633084, value is
The entry was added at 1351212932 with a 1 second timeout, so when the current time minus 1351212932 exceeds 1, the entry gets expired. So an entry with a 1 second timeout is removed anywhere between 1 and 1.999999 seconds after it was added, depending on where in the second it was added.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
