Forum Discussion
felix001_29321
Nimbostratus
May 30, 2012Creating a HTTP session ID
Im looking for a way to create/insert a session id for each HTTP request that goes through the LB. The insertion of the header will be straight forward but its the creation of the session ID im still ...
hoolio
Cirrostratus
May 31, 2012Here are two options. The rand option should be more efficient but not cryptographically secure. You can compare the CPU usage using the timing command.
Use rand() to generate a psuedo-random 8 digit number (not cryptographically secure)
format %010s [expr { int(100000000 * rand()) }]
Use AES::key to generate a cryptographically secure unique ID
set uid [string range [AES::key 256] 8 end]
Use timing to do a performance comparison:
https://devcentral.f5.com/wiki/iRules.timing.ashx
Aaron
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