Fast, faster, fastest.

Out of pure curiosity I ran a very simple timing test for different WCF bindings: WSHttp (default), NetNamedPipe, NetTcp and local method call (i.e. no WCF involved). I didn't do any performance tuning. The client and server are both hosted on my laptop. This is straight "out of the box" on Windows 7 RC using Studio 2008 in debug mode. The results are:

Endpoint binding is ... System.ServiceModel.WSHttpBinding
Elapsed Sec = 55.8443288
179.069212843686 calls per Sec

Endpoint binding is ... System.ServiceModel.NetTcpBinding
Elapsed Sec = 32.7759526
305.101734861552 calls per Sec

Endpoint binding is ... System.ServiceModel.NetNamedPipeBinding
Elapsed Sec = 27.866142
358.858431138404 calls per Sec 

Endpoint binding is ... local method call
Elapsed Sec = 0.0060012
1666333.39998667 calls per Sec

Ultimately your decision of what to use when will be based on more than just performance. Loose coupling, distributed architecture, interoperability, etc will all be factors in your decision. But, as if you had any doubt, if you want to go really fast, stay in process.

How does this compare with your experience with WCF performance?

Comments (0)

Skip to main content