Forum Discussion

cammy_178041's avatar
cammy_178041
Icon for Nimbostratus rankNimbostratus
Nov 23, 2014

How to ensure cookie persistence sticks if request is coming through a CDN?

We have cookie persistence set, but we use a CDN as a referrer. How do we ensure this persists? It is currently not persisting as we see requests that originate from a single browser flopping between nodes because the referrer is edgecast.

 

5 Replies

  • How are you identifying a single browser flopping nodes? Does that browser have your persistence cookie that the LTM is issuing?
  • Hi Brad

     

    We are testing with IE, Chrome and Firefox. Oddly enough I do not see the persistence cookie being set when I look at the request in developer mode. We have it set to insert, but I note that our app is also setting a cookie. I do not see the BIGipCookie, which would indicate that it is not being set, and/or it is being somehow stripped.

     

    • Brad_Parker's avatar
      Brad_Parker
      Icon for Cirrus rankCirrus
      Can you post your VIP and persistence profile configuration? Also, what BigIP version are you running?
  • Hi Brad,

     

    Here is the VIP and persistence profile. We are running 11.3.0 Build 3158.0 Hotfix 9.

     

    The IP address resolves to either the IO_QA_Pool_http or IO_QA_Pool_https

     

    ltm node /Common/172.21.66.201 { address 172.21.66.201 monitor /Common/https_443 } ltm node /Common/172.21.66.209 { address 172.21.66.209 monitor /Common/https_443

     

    ltm pool /Common/IO_QA_Pool_http { description IO_QA_Pool_http members { /Common/172.21.66.202:80 { address 172.21.66.202 } } monitor /Common/http } ltm pool /Common/IO_QA_Pool_https { description IO_QA_Pool_https members { /Common/172.21.66.202:443 { address 172.21.66.202 } } monitor /Common/https }

     

    ltm pool /Common/QA-Servers-Pool01_https { load-balancing-mode least-connections-member members { /Common/172.21.66.201:443 { address 172.21.66.201 } /Common/172.21.66.209:443 { address 172.21.66.209 } } monitor /Common/https } ltm rule /Common/EdgeCast-iRule { when HTTP_REQUEST { if { [HTTP::header exists "X-Forwarded-For"] } { persist uie [HTTP::header "X-Forwarded-For"] log local0. "[virtual name]:[HTTP::header value "X-Forwarded-For"]" } } } ltm rule /Common/Insert_X_Forwarded_For { when HTTP_REQUEST { HTTP::header insert X-Forwarded-For [IP::remote_addr] } } ltm rule /Common/ServerName { ignore-verification true when LB_SELECTED { log local0. "[LB::server addr] was the IP that was selected." } } ltm rule /Common/X-Server-Name { ignore-verification true when HTTP_RESPONSE { Replace (or insert if it doesn't exist) a custom HTTP header with the selected server name HTTP::header replace X-Server-Name "[LB::server name]" } }

     

    ltm virtual /Common/QA-Servers-Pool01_http { destination /Common/172.21.66.93:80 ip-protocol tcp mask 255.255.255.255 persist { /Common/CookieCP { default yes } } pool /Common/QA-Servers-Pool01_http profiles { /Common/HTTP-EncryptCookie { } /Common/tcp { } } rules { /Common/ServerName /Common/X-Server-Name } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vlans-disabled } ltm virtual /Common/QA-Servers-Pool01_https { destination /Common/172.21.66.93:443 ip-protocol tcp mask 255.255.255.255 persist { /Common/CookieCP { default yes } } pool /Common/QA-Servers-Pool01_https profiles { /Common/HTTP-EncryptCookie { } /Common/client_wildcard_catchpoint { context clientside } /Common/serverssl { context serverside } /Common/tcp { } } rules { /Common/ServerName /Common/X-Server-Name } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vlans-disabled }

     

    ltm persistence cookie /Common/CookieCP { always-send disabled app-service none cookie-name none defaults-from /Common/cookie expiration 10:0 method insert override-connection-limit disabled }