Forum Discussion

Stanislas_Piron's avatar
Stanislas_Piron
Icon for Nimbostratus rankNimbostratus
Aug 20, 2017

iRule ACCESS_ACL_ALLOWED VS APM Per-request Policy to insert APM variables in HTTP headers

Hi,

When I need to insert APM session variable in a HTTP header, I use irule like the following :

when CLIENT_ACCEPTED {
    set APMusername ""
}
when ACCESS_ACL_ALLOWED {
    if {$APMusername equals ""} {
        set APMusername [ACCESS::session data get session.logon.last.username]
    }
    HTTP::header insert "USER" $APMusername
}

But during Agility 2017 labs, we configured header insertion in Per-request policy which seems to be more integrated.

F5 communicates on performance improvement using LTM Policies instead of iRules.

is there such improvement using Per-request policy? Is Per-request policy not using more memory than a simple iRule?

1 Reply

  • PSilva's avatar
    PSilva
    Ret. Employee

    From an F5 SSA: 'Per-request policy performance is greater than that of an iRule. You can’t compare it to LTM Policy because they’re two different things – but in general per-request policy is preferred to iRule if possible (assuming APM is involved, of course).'