简体   繁体   中英

Is WCF over TCP worth it?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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