WCF How much faster is TCP than HTTP

Mark 909 picture Mark 909 · Dec 23, 2010 · Viewed 25.2k times · Source

I understand that TCP is faster than HTTP for WCF but I'm interested to know by how much. I have a performance issue with a large application that uses HTTP and am considering whether moving to netTcp would yield a sufficient performance improvement to make the investment worthwhile.

Anyone know the difference in the amount of data sent by netTCP compared to Http bindings?

Answer

Cheeso picture Cheeso · Dec 23, 2010

So far lots of answers but no concrete data.

Microsoft produced a test to measure exactly what you asked about - the performance (throughput) difference between HTTP and TCP for WCF services. (The test didn't consider packet size!)

Figure 1: Peak TPS Rates for the Web Service Test. IBM WebSphere Trade 6.1 is running in its default EJB/Entity Beans with Container Managed Persistence (CMP).

What this shows is that TCP/binary delivers nearly 2x the throughput of HTTP/xml, for the messages in this test. The bottleneck on this test was Server CPU, not network. Your results will vary because your messages will be more (or less) complex, your network will be more (or less) constrained, and your app code will be more (or less) CPU-intensive. But this gives you an idea.

Actually the Stocktrader benchmark was a competitive thing, comparing the performance of WCF on Windows Server to that of WebSphere on Linux. But as part of that, MS also compared the performance of WCF using HTTP to the performance of WCF using TCP.

download the full Stocktrader report