1

I have a WPF app that makes some WCF calls (about 5-6 per minute). It has about 100 users. These calls come in bursts (The user presses save, that calls a WCF "Broker" service, which then calls several other WCF Services.)

I was looking into duplex communication and I saw that WCF can support TCP communication. I also saw that IIS 7 can support TCP hosting.

From what I have read, there can be some performance gains by using TCP.

But my understanding of TCP is that it is more for systems that are going to be making many hundreds of calls per minute.

Would my less chatty system see real benefits from taking the time to switch from HTTP to TCP?

Vaccano
  • 78,325
  • 149
  • 468
  • 850
  • As opposed to HTTP? Do you see a *downside* to using TCP? – BradleyDotNET Nov 11 '14 at 17:29
  • @BradleyDotNET - Only that it would take time to convert from HTTP. (Configuration etc. And I imagine the HTTP Headers that we are using would need to be changed.) – Vaccano Nov 11 '14 at 17:31
  • 1
    Unfortunately I imagine the answer will be "test it!" which of course, by the time you do so, you've already done the requisite work needed to do TCP in the first place. I don't know the answer to this, but if it helps, all of our production WCF code is TCP based. – BradleyDotNET Nov 11 '14 at 17:36
  • Have you seen that http://stackoverflow.com/questions/4519963/wcf-how-much-faster-is-tcp-than-http ? – b2zw2a Nov 11 '14 at 17:41
  • @plentysmart - Yes. I read that, but it is for a stock trader app. I am assuming that an app like that falls in the "hundreds of messages per minute" category. – Vaccano Nov 11 '14 at 17:49
  • 1
    Real yes. Measurable maybe. – paparazzo Nov 11 '14 at 19:11

1 Answers1

3

As a matter of opinion, I would say that if your current system works well and you're not experiencing any particular problem using HTTP, then you probably shouldn't change it. Why would you inject uncertainty into your project for no particular reason?

If you're making five or six calls per minute, then I can't see how converting to TCP will gain you much. Sure, your data transmission time will be slightly less, but what's the point? If your messages are huge--megabytes in size--then I might worry about improving data transmission speed. Otherwise, there's just no point to it.

Now, if you expect that your traffic will increase a thousandfold in the near future, then you probably should look at converting to TCP rather than HTTP. Beyond that, I'd recommend that you spend your time and effort on improvements that add value to your product.

Jim Mischel
  • 131,090
  • 20
  • 188
  • 351