WCF concurrency tells how it can serve multiple requests at same time.
WCF instance dictates how objects are created.
WCF concurrency dictates how many requests can be handled by WCF objects.
The reasons why we need concurrency are Increase throughput and Integration with a legacy system.
There are three types of WCF Concurrency:
- Single
Only one request will be processed at any given moment of time. The other request have to wait until the request processed by WCF service is completed.
- Multiple
Multiple requests can be handled by WCF service object. Requests are handled at the same time by multiple threads on WCF service object but we need to take care of concurrency issues.
- Reentrant
A single request thread has access to the WCF service object, but the thread can exit the WCF service to call another WCF service or can also call a WCF client through callback and reenter without deadlock.
Below is the example:
References:
http://www.codeproject.com/Articles/89858/WCF-Concurrency-Single-Multiple-and-Reentrant-and