Forum Discussion

Josh_41258's avatar
Josh_41258
Icon for Nimbostratus rankNimbostratus
Nov 16, 2016

Trigger GTM failover based on LTM available pool members

I have seen this discussed a few times, but never really have found a real answer.

 

I have LTM configured in 2 datacenters. I have GTM in front of LTM sending all traffic to DC1 primarily, and sending traffic to DC2 if the primary location (DC1) becomes unavailable.

 

I am looking to trigger a GTM failover to the second location if the active pool members in DC1 is less than 'X.' Is there any native functionality that will handle this for me?

 

3 Replies

  • I am not sure if this would work but try doing this:

     

    For an LTM-1 with VIP-1 sending traffic to POOL-1, create a priority group with 10 and place all pool members in that priority group. Create another priority group with 5 and place a dummy pool member that is marked down and set a priority group failover as less than "X".

     

    Also, check out the post by Kevin here and this blog.

     

  • There is no native functionality I am aware of to do this. If the VIP still has members UP, in the associated pool, it will report to the GTM that the VIP is available.

    There may be more simple ways to do this, but here is a way that would work.

    1. Create a new dummy VIP on the LTM, that matches the existing VIP, with a new IP.
    2. Put an iRule on that VIP, that will check the pool member count, and reject connections if it drops below a threshold.

      when CLIENT_ACCEPTED {
        if {[active_members PoolHTTPS] < 1}{
          reject
        }
      
    3. Then monitor this VIP, outside iquery, from the GTM. Do not build this under an LTM Server Object, but as a Generic Host.

    4. Create a dependency on the GTM between this object and the one you already have. ( I might be missing some additional creativity that is required to make the dependency. Sorry, I do not have an environment to test this idea in, atm)

    So, when you drop below the server count threshold, the dummy VIP will start rejecting the monitor connections, and the dependency should take the associated site offline.

    With that said, I am not sure why you would want to do this, and with that information the community may be able to come up with a better solution to your original dilemma.

    Good Luck!

  • The reason for doing this is that is 3/5 servers (for example) are down in any given location, it may be better to failover to the second datacenter which has 5/5 servers healthy, thus allowing them to handle more load, serve more requests, etc. This seems like a fairly common scenario to me. Thanks for the tip.