Forum Discussion

harton's avatar
harton
Icon for Nimbostratus rankNimbostratus
Feb 28, 2014

iRule for the GTM or LTM?

I have an application that runs at two data centers - DC-A and DC-B. I have a wide IP on my GTM to do round robin balancing for the two DCs. This is working fine. The application owner now wants to route a particular URL to only DC-B. Is this possible with an irule on the GTM. Or does it somehow need to be done by the LTM? Here's the example:

    www.xyz.com/api/bla_bla_blah ----> DC-B
    www.xyz.com  --------> either DC-A or DC-B
    www.xyz.com/something/bla_bla_bla  --------> either DC-A or DC-B

So, they only want ./api/* to go to DC-B. Everything else goes to either DCs.

3 Replies

  • Hi Harton,

     

    The GTM listener will only see the dns query and the WIP can only use DNS based irules so you would need to look at the LTM for anything HTTP based.

     

    potentially you can write an irule on the VS to look for the URI and action on that maybe a 302 on all LTM's to point to another host, the GTM then has an additional WIP that only has the redirected host as a GTM pool member.

     

    Thanks, B

     

    • harton's avatar
      harton
      Icon for Nimbostratus rankNimbostratus
      Thank you for your suggestion. I'll have to run this by the application owner to see if this will meet their need.
  • It depends on what your business wants - if they really want the FQDN to remain the same regardless of the path requested, then the only way is for DC-A LTM to be able to talk to DC-B servers. If they are happy with an HTTP redirect as bboyjnr suggests, then the LTMs at each site can look for /api/bla_bla_blah and then 301 redirect to http://www.xyz1.com/api/bla_bla_blah.