Forum Discussion
James_Yang_9981
Altostratus
Aug 06, 2009how much data can be collected in irules for one connection?
if I continue using TCP::collect to collect data, how much data can be collected?
As I know, the CLIENT_DATA will be triggered by each packet received. but if the transaction is larger than one packet, so I must need using TCP::collect again to collect more data until reach the message boundary. then release the message. so how much data can be collected in iRules in CLIENT_DATA events?
- JRahm
Admin
I believe the limit is 4M. - spark_86682Historic F5 AccountThere is no built-in limit for the amount of data you can collect, but if you collect a lot of data on a lot of connections, you can use up all of your box's memory. The 4M limit mentioned above is the limit of the size of a Tcl variable. So while the payload can be arbitrarily large, you can only operate on it in ~4M chunks. If you're on 10.x, you can supply an offset to TCP::payload and get the chunks that way. If you're not, then you'll have to chunk the data yourself as you collect it (put it into a set of variables and remove it from the TCP::payload and then add it all back in at the end).
- James_Yang_9981
Altostratus
yes, I'm using 10.0.1, so how can I supply an offset? is there any sample code to do that? - spark_86682Historic F5 AccountJust make the offset the first parameter:
set first_chunk [TCP::payload 0 1000000] set second_chunk [TCP::payload 1000000 1000000] set third_chunk [TCP::payload 2000000 1000000]
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