3

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...

Brent Arias
  • 29,277
  • 40
  • 133
  • 234
  • It may be that the channel stacks, on both the client side and server side, can be used to tell me the true total size of the payload travelling 1-way in either direction. That might significantly help my throughput computation. – Brent Arias May 21 '10 at 22:21

1 Answers1

0

The ICMP was not created with the intention of trying those connection speed statistics, but rather if a valid connection was made between two hosts.

My best guess is that the amount of data sent in those REST calls or ICMP traffic is not enough to calculate a perceived connection speed / bandwidth.

If you calculate by these metrics, you will get very big bandwidth statistics or very low, use as an example the copy box in windows XP. You need a constant and substantial amount of data to be sent in order to calculate valid throughput statistics.

jpabluz
  • 1,200
  • 6
  • 16
  • I will most need this throughput information, precisely when I am hammering the server with gobs of web service invocations. That might be enough to get me within 20% of a "correct" measure of perceived bandwidth - which may be sufficient for my needs. – Brent Arias May 21 '10 at 22:22
  • Well if you need a vague statistic, you already have your answer. The process you are describing sounds good enough. Just remove the time-lapse that the server took to process your request and you will get the time, then use the basic distance over time formula to get the network speed. – jpabluz May 21 '10 at 22:34
  • "distance over time formula"? Do you mean "data quantity/size over time?" – Brent Arias May 25 '10 at 16:35