Why Azure Worker Role was taking time to process request

This had been a mystery for a month. I used wireshark to trace that the request was reaching azure, but azure was responding only after 2 minutes.

I used wireshark filters like the below:

tcp.port = XXX

Also:

(ip.src==X or ip.src == Y) and (ip.dst == X or ip.dst == Y)

All that turned out is that the service was receiving the method call 2 minutes after the server got the request from the client.

Turned out that the WCF service constructor was doing a 2 minute long activity each time. I just prevented it from doing it everytime, and ensured it is done once when the service starts up, rather than on the constructor of the WCF service.

Sometimes the problems are with old legacy code which does bad stuff. Nothing wrong with WCF!

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

The ridiculous interview experience