Forum Discussion

Nick_T_68319's avatar
Nick_T_68319
Icon for Nimbostratus rankNimbostratus
Feb 20, 2009

GTM - Static Persist

Can someone explain to me how static persist works? Here is my concern..

 

 

I have two datacenters hosting an e-commerce web site. In order for users to not lose their session, they NEED to stay in the same datacenter. How does static persist ensure the users get the same dns request back from the GTM? What if a user has 3 DNS servers from their ISP. If DNS server A requests the IP for them, then a little later, DNS server B gets a different IP. What happens? If someone could shed some light, that would be great. Ideally, i want to make sure static persist is VERY static, unless datacenter A or B goes down.
  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    Do you, by any chance, have LTMs in your data center? That is, are the GTMs handing out IP addresses that are VIPs on a BigIP?
  • Posted By jquinby on 02/22/2009 6:56 PM

     

    Do you, by any chance, have LTMs in your data center? That is, are the GTMs handing out IP addresses that are VIPs on a BigIP?

     

     

     

    yes exactly.
  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    In that case, you could use an iRule to insert a "Data Center Affinity" cookie for each new user that comes in. The same iRule would check for the existence of the cookie - if it matches the DC that the user has come to, all is well, continue. If, however, the user shows up at DC-"A" with a cookie inserted for DC-"B", you could issue a redirect to the other VIP. If you have layer 2 connectivity between Data Centers, you could also accept the user at DC-A, but then route the request to a node member at DC-B. Or perhaps proxy the request.

     

     

    There are a couple of different ways to skin this issue - DC affinity is a big deal for exactly the situation you've outlined. A change in a users's LDNS could have them at Site B when they began their session at Site A, which possibly Breaks Things in an Undesirable Way.
  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    It would have to - the GTM is out of the equation once an address has been resolved.
  • Posted By jquinby on 03/04/2009 8:37 AM

     

    In that case, you could use an iRule to insert a "Data Center Affinity" cookie for each new user that comes in. The same iRule would check for the existence of the cookie - if it matches the DC that the user has come to, all is well, continue. If, however, the user shows up at DC-"A" with a cookie inserted for DC-"B", you could issue a redirect to the other VIP. If you have layer 2 connectivity between Data Centers, you could also accept the user at DC-A, but then route the request to a node member at DC-B. Or perhaps proxy the request.

     

    There are a couple of different ways to skin this issue - DC affinity is a big deal for exactly the situation you've outlined. A change in a users's LDNS could have them at Site B when they began their session at Site A, which possibly Breaks Things in an Undesirable Way.

     

     

     

    That is exactly how I would like to do it. Both datacenters are connected via a point to point gigabit fiber connection. So if the user came into the wrong datacenter, i would just like to proxy them via snat or whatever to the proper node that they are supposed to be on. Are there any examples of configurations/irules to do this?