Forum Discussion

newf5learner_13's avatar
newf5learner_13
Icon for Nimbostratus rankNimbostratus
Jul 20, 2018

Cookie Persistence and oneconnect profile question

I was reading the KB https://support.f5.com/csp/article/K7964

 

"if a OneConnect profile is not associated with the virtual server, and the client request is initially sent to node A in pool A, the BIG-IP system inserts a cookie for node A. Then, the BIG-IP system receives a subsequent request within the same TCP connection that contains a cookie for node B in pool B. The BIG-IP system sends the request to node A."

 

Question: Can someone explain me why the http request with cookie for node B is sent to Node A for processing?? As for as I understand, since there is a cookie for node B the request should be sent to node B only, even if the request is part of existing TCP connection.

 

Please clarify.

 

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    With OneConnect, a load-balancing decision in made per request; without OneConnect, the load-balancing decision is made per connection, i.e. for all requests within that connection.

     

  • Hi,

     

    Suppose you have one VS and 2 pool.

     

    • pool A (node A1, node A2)
    • pool B (node A1, node A2)

    you set an irule:

     

    • if uri starts_with "/a/" forward to pool A
    • if uri strats_with "7b/" forward to pool B

    Use case

     

    • now suppose that your first uri is: https://mydomain.com/a/local.jsp
    • you will be FW to pool A and the LB decision send you to nodeA1
    • then you click try to access to https://mydomain.com/b/local.jsp
    • Without OneConnect enabled, the default LTM behaviour is to persist to the first server selected for the life of the connection. so instead FW your request to Pool B (nodeB1) the request stay in Pool A (nodeA1).

    Keep in mind that one connect is usefull when you have several pool in the same VS and you use irule to route user request on theses pool. It will allow you to detach each connection on Server side to FW you in the right pool/node.

     

    You have an explanation here:

     

    https://devcentral.f5.com/articles/oneconnect-for-my-irule

     

    Last point, if you want to avoid using oneconnect. you can built your policy using "LTM Policy" the LTM Policy manage by request so each request is processed and oneconnec is not usefull in this use case.

     

    Hope it's clear.

     

    Keep me update. regards