WCF服务调用的时间恰好是服务器ping的两倍。 [英] WCF service call taking exactly double time than that of server ping.

查看:81
本文介绍了WCF服务调用的时间恰好是服务器ping的两倍。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有简单的WCF服务,当调用GetData()方法时返回Hello。当服务器ping仅为350毫秒时,返回数据大约需要700毫秒。 WCF服务是否对服务器进行2次调用以从服务器获取数据?

解决方案

这个问题没有意义,因为响应时间取决于很多因素。



与WFC一起使用的协议与ping无关(ICMP, https: //en.wikipedia.org/wiki/Internet_Control_Message_Protocol [ ^ ]),所以你可以看到的时间关联是纯粹的想象,只不过是巧合。顺便说一下,尝试多次重复你的时间,很有可能,你会看到很好的统计分散。



-SA

Hi,
I have simple WCF service that returns "Hello" when GetData() Method is called upon. It takes around 700 ms to return the data while the Server ping is only 350 ms. Does WCF service makes 2 calls to server for getting data from server?

解决方案

The question makes no sense, because the response time depends on many factors.

The protocols you are using with WFC have nothing to do with ping (ICMP, https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol[^]), so the time correlation you can see is pure imaginary, nothing but a coincidence. By the way, try to repeat your timing several time, chances are, you will see great statistic dispersion.

—SA


这篇关于WCF服务调用的时间恰好是服务器ping的两倍。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆