Use the ServiceThrottlingBehavior class to control various throughput settings that help prevent your application from running out of memory.
The MaxConcurrentCalls property limits the number of messages that currently process across a ServiceHost.
The MaxConcurrentInstances property limits the number of InstanceContext objects that execute at one time across a ServiceHost.
The MaxConcurrentSessions property limits the number of sessions a ServiceHost object can accept.
Because run-time load balancing requires experience running the application, using the ServiceThrottlingBehavior through an application configuration file is the most common method of modifying execution to maximize service performance.
Note: |
|---|
A trace is written every time the value of these properties is reached. The first trace is written as a warning. |
You can also set the values of this attribute by using the <serviceThrottling> element in an application configuration file.