Forum Discussion

Thrillseeker_12's avatar
Oct 21, 2015

LTM Policies only evaluated once within same HTTP-Connection?

Hi F5 Community,

 

One of our customers has a strange issue with LTM Policies. The customer has many LTM Policies in place. One of them checks the "path" value and does some forwarding decision to a specific pool. It the "path" value does not match the condition the request will be forwarded to the default pool assigned on the VIP.

 

We just found out that forwarding decision within the same HTTP connection (curl) will only be evaluated once. So this means if we test with a valid path the forwarding works fine for the first time. When doing a second request with an invalid path in the same HTTP connection, we still get forwarded to the pool for the valid path value. Obviously the first forwarding decission made by the LTM policy will be cached somehow within the same HTTP Connection?! If we start two curl sessions one after each other, the forwarding works fine based on the HTTP valdi and invalid path value.

 

How could that be? Does anybody know how to solve this issue?

 

Thanks a lot for any info Regards Thrillseeker

 

5 Replies

  • I don't recall if this matters for LTM policies, but do you have OneConnect enabled on the VIP (enabled in the VIP and in the associated HTTP profile)?

     

  • Hi,

     

    this is not an issue, but the default behavior.

     

    The pool assignment is done for the entire connection. if you change connection pool for one request, it will be changed for following request until another request change the pool again.

     

    to change this behavior, add a default rule (without any condition) at the end of your policy with pool assignment same as virtual server default pool.

     

  • Have you defined a default action in your LTM policy (e.g if no other criteria is met, forward to default pool)? If your LTM policy has one condition and one action, this issue is to be expected.

     

    By minimum, you will need:

     

    Rule: Default_action

     

    Rule2: Conditional_action

     

     

    Optionally:

     

    RuleN: Another_conditional_action

     

    If you have multiple LTM policies which all perform a similar function, try to merge them into one to avoid any issues with exectuion priorities and execution errors. In case of multiple conditions, use the "best match" strategy to ensure no more than one conditional action can occur per request.

     

  • Thanks for the replies. The customer is not using any One-connect profile. So I will test it with a default rule at the end forwarding to the same pool default as assigned to the VIP. Keep you up-to-date

     

    Thanks

     

  • Just want to inform you that default action with no condition solved my problem! So different URI's will be handled differently by the LTM Policy within the same HTTP Connection. ;-)

     

    Thanks a lot Thrillseeker