Profiling Azure Storage with Fiddler
Fiddler Web Debugger is a tool well known by web developers on the Windows platform. If you need to see what your website is really doing, it’s absolutely invaluable. But if you’re storing data in Windows Azure Storage (Blobs, Queues or Tables) it gains a new use as a “database” debugging and profiling tool.
The easiest way to interact with Azure Storage is via the Microsoft-provided C# libraries. These are great, but they make it easy to forget how you actually talk to the underyling services. It’s all HTTP under the covers, and that means it’s visible to Fiddler. If all your data is in Azure storage then you can easily see all your traffic and quickly spot bad behavior.
The obvious first step is to go get Fiddler. (If you’ve already been using it for a while this might be a good time to drop some cash in the tip jar for a great tool.) Once you’ve got Fiddler installed, start it up. You may want to close some of your browser windows to keep extraneous traffic from cluttering up your window.
You’ll probably need to change your storage connection strings. If you’re running against development storage then the client libraries will bypass Fiddler. Change your connection string to:
If you’re running against an actual Azure storage account then you’re probably using an HTTPS connection. Fiddler won’t look inside HTTPS connections by default, but you can configure it to do so.
That should be all you need. Run one of your unit tests and you should see storage traffic show up in Fiddler. For example:
You should run through your app and watch for bad behavior, such as repeated or unnecessary calls. In future posts I’ll give a few specific examples I’ve seen.
Written by Brian Reischl