Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ConcurrencyMode "Single"/"Multiple" with InstanceContextMode "PerCall"

Tags:

wcf

I've taken a look at the different WCF service behaviors (ConcurrencyModes/InstanceContextModes) but don't get the difference between ConcurrencyMode "Single"/"Multiple" using InstanceContextMode "PerCall". Can anyone help me to understand it?

like image 876
tris Avatar asked Mar 08 '12 14:03

tris


2 Answers

This article on Sessions, Instancing, and Concurrency does a very good job of explaining the differences in each mode and combination of modes. In particular, it answers your question under the Concurrency section:

In PerCall instancing, concurrency is not relevant, because each message is processed by a new InstanceContext and, therefore, never more than one thread is active in the InstanceContext.

So the answer is, there is no difference between Single and Multiple concurrency if your services are instanced per-call.

like image 113
Michael Edenfield Avatar answered Oct 28 '22 04:10

Michael Edenfield


For PerCall instancing ConcurrencyMode "Multiple" can provide better throughput. See PerCall / Multi-Threaded Services. The article was referred by this answer.

like image 22
Michael Freidgeim Avatar answered Oct 28 '22 03:10

Michael Freidgeim