Concurrent WCF Calls Through a Shared Channel

I have a web tier that forwards calls to the application tier. To do this, the web tier uses a shared, cached channel. The application-level services in question are statusless and have concurrency.

But they are not called at the same time.

If I change the web tier to create a new channel with every call, I get simultaneous calls at the application level. But I want to avoid this cost, since it is not functionally needed for my scenario. I do not have session state, and I also do not need to re-authenticate the caller each time. I understand that creating a factory channel is much more expensive than creating channels, but this is still a cost that I would like to avoid if possible.

I found this article on MSDN that says:

As long as the channels and clients created by the channels are thread safe, they may not support recording more than one message per wire at a time. If you send large messages, especially when streaming, the sending operation may block waiting for another to send to complete.

Firstly, I do not send large messages (just a lot of small ones, as I do load testing), but I still see the lock behavior. Secondly, this is a fairly open and useless documentation. It states that they “cannot” support recording more than one message, but do not explain the scenarios in which they will support parallel messages.

Can anyone shed some light on this?

: , - . , , , , .

+3
3

, Open , . -, Open concurrency .

+2

- WCF, - - concurrency, , . Wenlong Dong - " - WCF .NET 3.5 " ( WCF , MSDN).

+1

Source: https://habr.com/ru/post/1739626/


All Articles