There are a lot of ways to make a web service or web request in .NET. Common libraries include HttpClient, WebClient, WCF generated clients, RestSharp, and, of course, your low-level HttpWebRequest/HttpWebResponse objects. If you want to track the true performance and amount of time it takes to make such a request, you need to understand all the steps involved in actually making a web service call. Like many areas in development, it is more complicated than you think! The diagram below helps illustrate the process.
The amount of time that it takes a remote server to process your request could be very fast in comparison to the amount of time it takes to serialize the request, send the request, download the response, and deserialize the response. For example, it could take a server virtually no time to send you a 10MB PDF file; however; it could take your code what seems like forever to download the entire response stream.
Below is a screenshot from Prefix showing a real request to a WCF service. This request uploads a list of users and immediately returns the same list. The amount of data being uploaded is about 2MB. As you can see below, Prefix can help you understand the true amount of time it takes to fully call a web service.
Most APM-type products do not account for this entire process. Many of them may report that the previous example took 57ms when it actually took 127ms of total time. Prefix and Stackify APM v3.0 can help you properly measure the real amount of time taken.
We have done thorough testing with 30+ different scenarios to ensure that our profiling and APM capabilities handle them all perfectly with Prefix v1.5 and Stackify APM v3.0.
Supported Http libraries
Since we support low-level HttpWebRequests, we support virtually all Http libraries. But saying we 100% support them means we have done thorough testing to ensure we can also track serialization, upload, download, and deserialization time where applicable.
- Low level classes for HttpWebRequest/HttpWebResponse
- WCF client
- 6 Reasons Cloud Monitoring Is Different Than Server Monitoring - May 25, 2017
- How DevOps Increases Security, Not Hurts It - May 18, 2017
- What Is Function-as-a-Service? Serverless Architectures Are Here! - May 15, 2017
- Microsoft Build 2017 Review of Day Two – Windows News & Updates - May 11, 2017
- Microsoft Build 2017 Review of Day One – Azure News & Updates - May 10, 2017