Forum Discussion
rogerwow
Nimbostratus
May 08, 2019Low-CPU way to insert CorrelationID
We would like to implement a correlationID HTTP header for every HTTP message that comes through the frontend VLAN.
i.e. it's going to need to inspect every single HTTP and
if there is ...
Dario_Garrido
Noctilucent
May 08, 2019Hello 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.
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