Instance Throttling
In order to increase throughput at the service, multiple concurrent calls must be
allowed to process. PerCall services are capable of
multiple concurrent calls by default since each call is allocated its own service instance.
PerSession services also allow throughput from unique
clients, but allow only requests from the same client session one at a time. Single instancing mode allows only one request to be processed
at a time by default, regardless of the client, which can impact throughput. To increase
throughput for multithreaded sessions and singleton services, you can set the concurrency
mode to Multiple and provide more granular
synchronization mechanisms, as discussed in the previous section.
Regardless of the concurrency mode, server resources are not generally capable of servicing an unlimited number of concurrent requests. Each request may require a certain amount of processing, memory allocation, hard disk and network access, and other overhead. Sessions also require the allocation of resources that usually outlive an individual request, as do singletons. WCF provides a throttling behavior to manage server load and resource consumption with the following properties:
MaxConcurrentCallsLimits the number of concurrent requests that can be processed by all service instances. The default value is 16.
MaxConcurrentInstancesLimits the number of service instances that can be allocated at a given time. For
PerCallservices, this setting matches the number of concurrent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access