Forum Discussion

venkat_ch_24285's avatar
venkat_ch_24285
Icon for Nimbostratus rankNimbostratus
Jan 11, 2016

primary-HASH COOKIE + Secondary-SOURCE ADDRESS?

Hello All,

 

can we use hash cookie as primary and fallback as source_address persistence profile. How it would behave?

 

Please help me.

 

Regards, Ch.Venkat

 

1 Reply

  • Hi Ch. Venkat,

     

    as far as I know your desired configuration would result in a rather awkward load balancing behavior.

     

    New clients:

     

    1. A initial request of a unknown client with an yet unknown IP would be balanced purely on the configured load balancing profile.
    2. During the initial load balancing decission, a source_adress persitence record would be created and pointing the source_IP to the selected node.
    3. During the response phase, a hash based persistence record for the responce cookie (send from your server) would be created and pointing the cookie hash to the selected node (aka. same node as source IP record)
    4. The next request would either use the cookie information (if client supports cookies) or the source_ip as a fallback.

    A new client behind the same IP (NAT/Proxy)

     

    1. An initial request of a unknown client but with a already known IP (same NAT/Proxy), would be balanced on a still acitve source_ip persitence record.
    2. During the response phase, a hash based persistence record for the responce cookie (send from your server) would be created / updated and pointing the cookie_value to the selected node (same result as the already existing source IP record)
    3. The next request would either use the cookie information (if client supports cookies) or the source_ip as a fallback.

    Result: All clients behind a certain Proxy/NAT-Device would be balanced to the same node. The load balancing decision for those hosts would be comparable with source_ip only persistence and would end in an uneven distribution.

     

    Cheers, Kai