WCF is slow when reliable session is ON and with burst async request

前端 未结 3 1942
别那么骄傲
别那么骄傲 2020-12-18 09:24

For experiments, I created a simple \"Hello World\" WCF service and client using .NET 4.5 on VS2012. The server is hosted on a console application and use net.tcp binding. I

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-18 09:36

    You are sending messages Async, but you have ordered="true" on the ReliableSessionBindingElement. This doesn't make sense. Set ordered to false, since it makes more sense for your scenario. ReliableMessaging will cause a performance hit because it adds to every response message a SequenceAcknowledgement. It also adds overhead of CreateSequence/CreateSequenceResponse and CloseSequence/CloseSequenceResponse, then TerminateSequence/TerminateSequenceResponse message exchanges at the beginning and end of your session.

提交回复
热议问题