Forum Discussion

zeroburn_136163's avatar
zeroburn_136163
Icon for Nimbostratus rankNimbostratus
Apr 22, 2014

External monitor for checking availability of CDN

Hi,

 

We currently have two external CDN's that we balance the traffic between via an irule at the GTM level that randomly allocates traffic to either on a 60/40 split. We have had a number of issues recently with service disruption on one CDN provider and would like to automate detection of a failure and allocate all traffic to the other CDN.

 

I have found a script and have set up an external monitor for each CDN at the LTM level, I pass all details for the curl within the scripts and variables including the FQDN of the CDN (a must as the ip address this resolves to changes regularly). I have then created a pool and dummy nodes, the pool uses the monitor on the dummy nodes and just doesn't use the ip addresses passed to the script and uses curl with the FQDN to confirm the status of the CDN. I would then be able to write into the irule to check the status of the pool and make a decision at that point.

 

Now I am not overly happy with the dummy nodes, I also realised that I should have done this at the GTM level - the problem being I have created this external monitor at the GTM level but I am unsure how to proceed, I can't seem to equate the structure to the LTM setup to create a point the irule can query. Have I gone about this in the wrong manner?

 

TC

 

2 Replies

  • If you have the monitor script in GTM. You'd configure a monitor of type External and reference the script.

     

    In this instance though, I'm assuming you have all the logic you need to check the CDN in the script. You mention an iRule above. Is your "script" actually an irule?

     

    If so, you would then assign that monitor to a Virtual Server object (no the pool). I would assign no monitor to the pool.

     

    With GTM, you can't set up a virtual server with an IP address to which you can assign an irule so if you're script is an iRule as opposed to a shell script (or PERL, etc..), then it won't work.

     

    Maybe I'd need to know what the iRule is doing or looks like.

     

  • Cheers James, I found this https://devcentral.f5.com/questions/gtm-irule-cname while looking around and have followed it with a few changes to the external monitor and the irule and it's all looking good.