Forum Discussion

DaveP_01_139154's avatar
DaveP_01_139154
Icon for Nimbostratus rankNimbostratus
Feb 14, 2014

iRule to update vip address that DNS entry is resolving to.

Hello,

 

I am trying to figure it if it's possible to create an iRule with the GTM to update a DNS server's vip entry for a specific host.

 

The plan is to have a monitor which is checking the state of two clusters, and if the monitor indicates one cluster is down have the GTM update the DNS server's entry for that cluster to the ip of the 2nd cluster. This way connection requests will use the same virtual address names and only the ip that the names are being pointed to will be changing.

 

As a follow up question if that's possible based upon an up/down state would it also be able to make those changes dynamically based upon some performance metric?

 

Thank you

 

7 Replies

  • I may be misunderstanding what you are trying to do, but it sounds like you could just have GTM do this without an iRule.

     

    You'd create your wide IP for whatever the FQDN of the service is, and have your pool built with both cluster IP addresses as pool members. You'd setup a monitor on the pool to check the status of the clusters and modify the answer handed to the client based on the health of the pool members.

     

    You can select different types of load balancing methods to do what you want. Least connections, ratio, round robin... Tons of options. Pick one that will best suit your environment.

     

  • Hi Cory, thanks for the response. Would this work if the clients are never directly talking to the GTM? The proposal provided to us wants the clients to resolve the FQDN's with the DNS and then directly connect to the clusters vip or an individual server in the cluster.

     

    In our case the plan is to have the DNS server actually handle address resolution, so we want the global load balance to update the DNS server with whichever clusters IP we want the FQDN to resolve to. It would get updated due a outage in one of the clusters or some sort of a performance metric.

     

  • The client DNS request should always go to your GTM, assuming the GTM is authoritative for your domain.

     

    The subsequent data connection attempt, whether it be HTTP, HTTPS, FTP, etc. will be initiated towards the answer (cluster IP address) that your GTM hands back to the client.

     

    Just for clarity, the GTM is your DNS server. GTM would answer client queries with whichever cluster is deemed healthy based on a monitor applied to the pool, and also taking into account the load balancing method you select.

     

  • In this case it will not be going to the GTM. The Global Load Balancer will just be monitoring the health/performance of the various clusters and updating the FQDN addresses on a separate DNS accordingly. It's been proposed to us that it's possible when monitoring the health (IE, up/down status) but we are trying to determine if that same setup would be possible if monitoring performance with the the Global Load Balancer.

     

  • I see, my apologies for the confusion.

     

    You can certainly monitor the health of the clusters from GTM. The method to have GTM notify your external DNS server about the change is another story. How are you doing/proposing doing this?

     

  • No problem Cory, I don't have the details yet however that was the initial plan proposed to us. I guess I was wondering if anyone else had done or heard of a similar setup. Once I have more information I will update this thread once I have it.

     

    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      You could try asking them to just defer resolution to your GTM. Might make the setup a little simpler. Of course they may not go for that for multiple reasons, but perhaps worth mentioning.