Detecting Connection Speed / Bandwidth in .net/WCF

Posted by Mystagogue on Stack Overflow See other posts from Stack Overflow or by Mystagogue
Published on 2010-05-21T21:58:55Z Indexed on 2010/05/21 22:10 UTC
Read the original article Hit count: 312

Filed under:
|
|
|
|

I'm writing both client and server code using WCF, where I need to know the "perceived" bandwidth of traffic between the client and server. I could use ping statistics to gather this information separately, but I wonder if there is a way to configure the channel stack in WCF so that the same statistics can be gathered simultaneously while performing my web service invocations. This would be particularly useful in cases where ICMP is disabled (e.g. ping won't work).

In short, while making my regular business-related web service calls (REST calls to be precise), is there a way to collect connection speed data implicitly?

Certainly I could time the web service round trip, compared to the size of data used in the round-trip, to give me an idea of throughput - but I won't know how much of that perceived bandwidth was network related, or simply due to server-processing latency. I could perhaps solve that by having the server send back a time delta, representing server latency, so that the client can compute the actual network traffic time. If a more sophisticated approach is not available, that might be my answer...

© Stack Overflow or respective owner

Related posts about Performance

Related posts about bandwidth