3

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.

Grant H.
  • 3,689
  • 2
  • 35
  • 53
  • +1 Good question - not necessarily a good design, but a good question. Genuine, non-prescriptive-design related answers will be interesting. – Kirk Broadhurst Feb 07 '12 at 23:38
  • Yeah I'd certainly consider different designs, although low latency response is a design requirement so I'd expect that'd preclude some mechanisms. – Grant H. Feb 08 '12 at 03:02

1 Answers1

1

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.

Community
  • 1
  • 1
David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • Good advice! I had the `DefaultConnectionLimit` addressed, but I hadn't considered the Nagle algorithm. If I will have calls of varied size, some less than 1400, some larger, do I lose a lot of efficiency on the larger calls if using Nagle? – Grant H. Feb 08 '12 at 13:54
  • With larger packets, you won't be affected by Nagle. – David Makogon Feb 08 '12 at 16:42