Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit on open nettcpbinding connections

Tags:

c#

wcf

azure

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

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

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.

like image 348
Grant H. Avatar asked Nov 21 '25 18:11

Grant H.


1 Answers

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

ServicePointManager.DefaultConnectionLimit

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

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.

like image 129
David Makogon Avatar answered Nov 23 '25 09:11

David Makogon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!