Forum Discussion
Low-CPU way to insert CorrelationID
Hello rogerwow
Depending on your application, you could use cookie persistence to generate a random number for each query, which is less cost intensive.
REF - https://support.f5.com/csp/article/K83419154
Other option is to implement an iRule. Below is one idea.
when HTTP_REQUEST {
if { !([HTTP::header exists "X-Correlation-ID"])} { HTTP::header insert "X-Correlation-ID" [string range [AES::key 256] 8 end] }
}
Other interesting topics to generate unique identifiers.
REF - https://devcentral.f5.com/questions/how-to-generate-visitor-id-uuid
REF - https://devcentral.f5.com/questions/How-random-is-rand-790690
To evaluate the cpu cost you should try it first in pre-production.
show ltm rule IRULE_NAME
KR, Dario.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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