Retrace will reach End of Life on March 31, 2027. Click here to learn more.

Why Calling a Web Service Takes Longer Than You Think

By: mwatson
  |  April 11, 2016
Why Calling a Web Service Takes Longer Than You Think

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.

web-request-performance-chart

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.

wcf-request-1030x372

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
  • WebClient
  • HttpClient
  • RestSharp
  • WCF client

Improve Your Code with Retrace APM

Stackify's APM tools are used by thousands of .NET, Java, PHP, Node.js, Python, & Ruby developers all over the world.
Explore Retrace's product features to learn more.

Learn More
togel slot situs toto pucuk4d agb99 togel toto slot toto togel toto slot indobet situs toto toto slot toto slot toto slot toto toto situs toto toto slot slot depo 10k toto togel 8kuda4d toto judi bola kenangan4d toto situs toto toto toto toto situs toto toto toto slot bobatoto daftar situs toto logototo situs toto situs toto toto bydplay patentoto situs toto slot 4D situs toto leon188 situs toto slot gacor terbaru toto toto slot toto situs toto situs toto MORFINTOTO ilmutoto toto mix parlay bayitoto toto toto toto toto ilmutoto toto toto mawar800 login popotogel prize hongkong malam ini toto slot gacor joker11 toto slot pucuk4d lingkartoto lingkartoto Pucuk4D Login PREMANTOTO UGSLOT slot gacor slot gacor slot gacor AMANAHTOTO toto ilmutoto ILMUTOTO 8kuda4d titi4d lingkartoto lingkartoto toto situs toto ilmutoto toto slot gacor rp888 https://foundvinylrecords.com/ depo 5k slot gacor toto slot gacor toto mataramtoto toto panen100 semibola slot gacor Pakde4D situs gacor MySlot188 SlotPoker188 toto togel 77ag monk4d popo togel tikus4d https://asupantoto.co/ Login Batak5D pompa4d