Forum Discussion

Mengzi_60383's avatar
Mengzi_60383
Icon for Nimbostratus rankNimbostratus
Mar 04, 2011

GTM with HTTP cookie?

Hi Guys,

 

 

I am completely new to F5 and needed some help... we have a web site hosted in two data centers and use GTM to take user to the closest one, what I am wondering is that possible to use HTTP cookie (instead of geo location) for this?

 

 

I was guessing GTM geo-routing was DNS based, so the HTTP context isn't available at the moment the DNS request was made... so it seems to me it is unlikely (to do this based on HTTP headers).

 

 

Please let me know if I am right about this? If you know there is any way to implement this, could you please give some advice, many thanks!

 

 

Sincerely,

 

Mengzi

 

3 Replies

  • I assume you'd have to do something from within DNS_REQUEST and based on the available commands, you do indeed seem limited to layer 3-4.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/DNS_REQUEST.html

     

     

  • When a client makes a via GTM, it starts with the DNS request to resolve a hostname to an IP address. There hasn't been an HTTP request at that point, so you wouldn't be able to consider HTTP cookies yet.

     

     

    Once the client makes an HTTP request, you could track which datacenter they'd been resolved to using a cookie. If they flip datacenters mid-session, you could redirect them to a hostname that points just to one datacenter. You could also consider using an iSession tunnel to route them directly to the other datacenter.

     

     

    Aaron
  • Guys - thanks for your response. I understand if we use different host name for the two data centers that would be easy, like us.abc.com and asia.abc.com; we can just update our web site code to check the cookie and then do a 302. The problem is our app isn't ready for supporting multiple site names yet, at this point we have to use just www.abc.com, there is other dependencies that is a little hard to overcome, that is why we were wondering if that can be done via GTM.

     

     

    Thanks!