Forum Discussion

Xi_Wang_97546's avatar
Xi_Wang_97546
Icon for Nimbostratus rankNimbostratus
Jul 17, 2007

Can LTM redirect traffic behind GTM?

Hi,

 

 

I have a GTM managing two LTMs as two data center. Each of the LTMs manages two nodes. The GTM redirects traffic to CDN if the F5 network's capacity is reached by configuring the CDN as the Last Resort Pool with its CNAME.

 

 

Is it possible, as second line of defense, to configure each of the LTMs to redirect the traffic to CDN? Can I do it using iRule? Will this setting conflict with GTM's setting on redirecting traffic to CDN?

 

 

Somehow, with round robin setting at GTM for load balancing, I don't see the HTTP load are evenly distributed to the two LTMs? Does anyone know what could be wrong?

 

 

When I set each of the two nodes accepts max 5 connections, i.e., one LTM can only accept max 10 connections, the statistics shown at GTM is inconsistent with what's shown at LTM, e.g., LTM shows 10 connection, but GTM shows 17 connections. Does anyone see this kind of situation before?

 

 

Thanks,

 

-Xi
  • Yes, you can set the fallback host in the http profile on each LTM, or if desired, you can write an iRule to do redirect to your CDN.

     

     

    Regarding GTM, remember that the load-balancing accomplished here is for DNS, not your data. So if you AOL is request 1 & 3, and mom-n-pop-ISP is request 2 & 4, your LTM load is not going to be anywhere near equal. You'll find that the load between your data centers will fluctuate frequently as there is no way for GTM to know the number of clients utilizing the response the LDNS servers out in the wild will receive.

     

  • On your point of GTM/LTM connection count, the display is not synchronized, so the snapshot you see in LTM is not instantaneously displayed in GTM, which most likely would account for the difference in statistics. LTM will show the more accurate realtime snapshot, whereas GTM will utilize this data at a slight delay for future actions (doling out requests, marking pool members down, etc)
  • Thanks. If the LTM's HTTP pool shows 5 connections on each of the two nodes. How can I find where the requests are from? Is there any iRule code to log all this information?

     

     

    Also, I setup the fallback host in the http profile on each LTM and checked up the CDN server's access log, I was not able to see any traffic got redirected to the CDN server. How do I check if the LTM redirect mechanism is working? Does GTM have log file recording all DNS requests?

     

     

    What does Picks in GTM's Server Statistics GUI mean? How do I change GTM settings to make one LTM gets more DNS requests than the other?

     

     

    I selected icmp as the monitor for node health monitoring on LTM, and http as the monitor for http pool health monitoring. These two monitors give me different status on nodes. When icmp monitor shows node unavailable, the http monitor shows node available. Can this be possible? Can I select http as the monitor for node health monitoring, and how?

     

     

    Thanks,

     

    -Xi
  • You can log the requests in LTM:

    
    when HTTP_REQUEST {
      log local0. "Client IP is [IP::client_addr]"
    }

    This information will be in the /var/log/ltm logfile.

    It would be nice if there was a field on the HTTP profile stats screen that showed you how often the fallback host was utilized, but I'm not aware of a way to view this. You would need to take a packet capture and analyze the HTTP response to your clients to see if any an redirects to your CDN are occuring.

    GTM can log requests with an iRule or by setting a db variable.

    Rule:

    
    when LB_SELECTED {
       log local0. "LDNS [IP::client_addr] assigned to [LB::server addr] for request [DNS::
    rrname]"
    }

    DB Variable:

    At the CLI, type b db GTM.QueryLogging enable

    Picks in GTM are the number of times the GTM pool member is picked for resolution.

    If you want one virtual server on an LTM to get more picks than another, you would need to set a ratio method instead of round robin.

    Regarding monitoring, yes it's possible for one protocol to work and not another. Firewalls, ACL's, etc could be in play here. The user manual is pretty complete with the instructions on setting monitoring. Personally, I use the bigip monitor and let the LTM tell the GTM what is and is not up and functioning. However, there may be a reason for you to validate path information and therefore an additional monitor may make sense.

  • BTW, the log information for GTM query logging in either approach would be in the /var/log/gtm logfile.

     

     

    Also, if taking a packet capture isn't the way you want to approach viewing the fallback, you could instead use a rule and send a redirect (and log it) when no pool members are available. There are plenty of examples on the forums on this method.