Forum Discussion
Kevin_Stewart
May 06, 2013Employee
This is one of those moments when I wish the BIG-IP had a monitor that could reach into Windows and read the file system or see if services are running, but unfortunately those sorts of things take a little extra work to accomplish. In any case, you need to be able make load balancing decisions based on the number of files in some arbitrary folder across multiple machines, and then base the (total) load balancing ratio on the proportions of files up to some specific threshold. In order to make that calculation you need to first know how many files each server has, and that can be done from two places - a central Windows server or the BIG-IP via external monitor script.
If using a central Windows server, you would probably only need to reach across the file system natively, using shares or perhaps a Powershell script, get the numbers of files to make your calculation, and then use that same Powershell script to make an iControl call out to the BIG-IP to alter the load balancing ratio of a set of pool members.
If using the BIG-IP and external monitor, you'd need something that the monitor could query, perhaps a web server script (like the above PHP example) to get the number of files to make the calculation, and then make a local TMSH call to alter the load balancing ratio for a set of pool members. So if you think about it, each option is making a local call and a remote call, but just opposite of each other.
Which version you think is better depends on a few things, like your knowledge of Windows or Linux scripting, and perhaps your ability to create a file-counting script to run in your web server. The calculation itself should/would be the same in either place.