Zachary Loeber

I eat complexity and am never without a meal.

Big-IP: Custom IIS SOAP Monitor

In working on a production issue with my company’s flagship SaaS product I worked with some of the brilliant F5 engineers to isolate one web server in the load balanced pool which was intermittently failing. The F5 engineer recommended a health monitor that does more than just poll for a static page. He suggested we implement some kind of soap call to make the application pool do some work and return a result (I guess in case the IIS application pool is misbehaving but not down). So I worked with one of our developers to do just that but ran into some caveats which required yet another custom health monitor.

Their default soap health monitor did not work as advertised on our load balancers. We discovered through some tcpdumps that the default Big-IP monitor sends a “SoapAction” header in the request but with no value and by default the SOAP call in IIS does not support this I guess. Rather than push for an effort to fix the web configs to handle empty requests I just hacked together a quick custom health monitor to send the header request in a way that the IIS configuration could handle. There are two parts to this monitor, the monitor itself and an xml file with the actual request to send.  I cannot help you with the actual SOAP method creation on your IIS server though, connect with your devs for that. I didn’t use the cool F5 script template like I did with the last monitor but this is still fully functional (assuming you modify the xml request to your environment/custom soap page). First the actual monitor:

Here is a quick example of an xml file you could use, this is based on a quick and dirty custom asmx file that my company’s devs whipped up that simply returns OK if sent a soap request method called “Status”:

save both files to /usr/bin/monitors/ and chmod +x the customsoap.sh. Then define your custom health monitor to call customsoap.sh. An example is below: