BizTalk Performance and DNS
We recently solved a performance problem that had been plaguing us for quite some time on one of our Test/QA BizTalk Application servers. Even if you aren’t experiencing the problem to the full extent that we were, I’ll bet I can improve your performance too – want to try? Here’s a brief summary of our problem:
We have two servers in this BizTalk group. I’ll call them Primary and Secondary. Primary is the SSO Server. It was also the slow performing server. We had our system admin folks look into the server to see if maybe we had some failing hardware. They came back and said everything was fine. As the problem continued we started to notice that it really only performed slow when contacting the database. Primary and Secondary are in the same data center, so this seemed a little strange. Since Secondary was performing well, we knew the problem wasn’t the database. We then had the network engineers look into things. I’m not sure exactly what they did but they came back and said that the network was fine.
We ran Microsoft Network Monitor 3.3 and found that Primary was contacting its secondary DNS server for lookups on the database name (which happened to reside in another state, which explains part of the performance problem). To make a long story short, we eventually figured out that the primary DNS server had been entered slightly incorrectly on one of the two servers (Primary) – instead of a 220, there was a 200 somewhere in the IP address.
So what? How can this help you? Well, we found that even when the primary DNS server was corrected, there were still excessive DNS lookups taking place. When we exported all bindings from our BizTalk Group using the Admin console, the operation took 40 seconds after the correction was made (previously it would take minutes). We then added our database name to the hosts file in c:\windows\system32\drivers\etc\, something like this:
After doing this, the same export command took 20 seconds! So, here’s my question to you (please add a comment): How long does it take for you to export the bindings for all your applications using the Admin Console? If you add a hosts entry for your db server, what kind of performance gain (if any) do you see?
As I thought about this, I think adding the entries to the host file makes a lot of sense. After all, my db server’s IP address is static. I would know about it should it ever need to change. Is there really a point in making DNS lookups every X milliseconds? I don’t think this would be needed if the DNS cache were being used; however, it seems the way the Admin Console was built it is ignoring the DNS cache.