简体   繁体   English

客户端SendTimeOut的后果

[英]Consequences of SendTimeOut at client side

There's a requirement for the application to know about the service unavailability as soon as possible. 要求应用程序尽快了解服务不可用。 The client uses the default sendTimeOut and ReceiveTimeOut. 客户端使用默认的sendTimeOut和ReceiveTimeOut。 Now i want to reduce the SendTimeOut to 10 seconds so that within 10-12 seconds my UI will come to know abt the Service unavailability and react accordingly. 现在,我想将SendTimeOut减少到10秒,以便在10-12秒内,我的UI会知道该服务不可用并做出相应的反应。

Q.1 Am i on the right track on reducing the service unavailability time by reducing the SendTimeOut at client config? Q.1通过减少客户端配置上的SendTimeOut来减少服务不可用时间是否正确?

Q.2 What are the consequences of this? Q.2这会带来什么后果?

Q.3 Any better approach? Q.3有更好的方法吗?

Please guide. 请指导。

What kind of unavailability do you want to detect? 您想检测哪种不可用状态?

  1. The server has crashed? 服务器崩溃了?
  2. The service has crashed? 服务崩溃了?
  3. The service is waiting for some internal resource to perform work? 服务正在等待一些内部资源执行工作?
  4. The hosting application is out of handling threads? 托管应用程序没有处理线程?
  5. Something else? 还有吗

Consider that 1, 2 and 4 can will detected almost immediately, regardless of timeout. 考虑到1、2和4几乎可以立即检测到,而不管超时如何。 In general, you should not infer unavailability based only on time. 通常,您不应仅根据时间推断不可用性。 You need to take into account other properties such as message size and transmission latency. 您需要考虑其他属性,例如消息大小和传输延迟。

Moreover, what binding are you using? 此外,您正在使用什么绑定? If you are using MSMQ binding, there is absolutely no way to know whether the service is available according to request-response patterns. 如果您使用的是MSMQ绑定,则绝对没有办法根据请求-响应模式来知道该服务是否可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM