WCF - what is the fastest binding?

后端 未结 2 1441
时光取名叫无心
时光取名叫无心 2021-01-31 19:18

I currently have a WCF service which uses BasicHTTP binding, and is wrapped with a secure router/firewall (PFSense).

I have heard that there is a faster binding than Bas

相关标签:
2条回答
  • 2021-01-31 19:37

    If your solution is deployed to an intranet, you can use NetTcpBinding.

    http://msdn.microsoft.com/en-us/library/system.servicemodel.nettcpbinding.aspx

    While perhaps not authoratative, this post covers some benchmarking with these results, which are consistent with my answer and parapura's:

    WSDualHttpBinding: Processed 1602 calls in 10 seconds
    WSHttpBinding: Processed 2531 calls in 10 seconds
    BasicHttpBinding: Processed 17913 calls in 10 seconds
    NetTcpBinding: Processed 39957 calls in 10 seconds
    NetNamedPipeBinding: Processed 48255 calls in 10 seconds
    
    0 讨论(0)
  • 2021-01-31 19:43

    On the same machine you can use NetNamedPipeBinding for maximum performance.

    Decision Points for Choosing a Transport

    Throughput measures the amount of data that can be transmitted and processed in a specified period of time. Like latency, the chosen transport can affect the throughput for service operations. Maximizing throughput for a transport requires minimizing both the overhead of transmitting content as well as minimizing the time spent waiting for message exchanges to complete. Both the TCP and named pipe transports add little overhead to the message body and support a native duplex shape that reduces the wait for message replies.

    0 讨论(0)
提交回复
热议问题