限制开放NetTcpBinding的连接 [英] Limit on open nettcpbinding connections

查看:150
本文介绍了限制开放NetTcpBinding的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我意识到这是一个pretty加载的问题,但这里是我试图衡量。

So I realize this is a pretty loaded question, but here's what I'm trying to gauge.

我已经得到了通过WCF接受可靠的会话的TCP连接,并打开一个callbackchannel到客户端的服务器。时间99.999%,它只是连接,等待服务器发出一个回调(不积极处理任何事情,只是保持连接)。

I've got a server that accepts reliable-session tcp connections via WCF and opens a callbackchannel to the client. 99.999% of the time, it's just connected, waiting for the server to issue a callback (not actively processing anything, just maintaining the connection).

什么样的​​每台机器上的瓶颈?我已经处理WCF < servicethrottling /> 属性上的约束力,但刚刚从负载/最大连接/别的我失踪的角度来看,我M试图让多少客户可以为每个Azure的小型实例送达因为总的来说,这些家伙将由袖手旁观,只等着感。

What kind of per machine bottlenecks will I hit? I've already handled WCF <servicethrottling /> attributes on the binding, but just from a load/max connection/"anything else I'm missing" standpoint, I'm trying to get a sense of how many clients can be served per Azure Small Instance given that by and large, these guys will be sitting idly by, just waiting.

推荐答案

如果你打开​​出站连接,你要考虑增加

If you're opening outbound connections, you'll want to consider increasing

ServicePointManager.DefaultConnectionLimit

在你的角色的OnStart()code。我不记得默认的,但我的认为的是12。

in your role OnStart() code. I can't recall the default, but I believe it's 12.

当你在这,还不如考虑设置

While you're at it, might as well consider setting

ServicePointManager.UseNagleAlgorithm

如果你把大量的短信(下哦,1400字节)。否则,消息得到缓冲多达半秒。我在这个SO回答。

to false if you push lots of short messages (under, oh, 1400 bytes). Otherwise the messages get buffered up to a half-second. I gave a bit more detail on Nagle in this SO answer.

这篇关于限制开放NetTcpBinding的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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