WCF throttling provides some properties that you can use to limit how many instances or sessions are created at the application level. Performance of the WCF service can be improved by creating proper instance.
The throttling of services is another key element for WCF performance tuning. WCF throttling provides the prosperities maxConcurrentCalls, maxConcurrentInstances, and maxConcurrentSessions, that can help us to limit the number of instances or sessions are created at the application level.
The throttling of services is another key element for WCF performance tuning. WCF throttling provides the prosperities maxConcurrentCalls, maxConcurrentInstances, and maxConcurrentSessions, that can help us to limit the number of instances or sessions are created at the application level.
Attribute / Property | Description |
maxConcurrentCalls | This specifies the maximum number of messages processed across the service host. The default value for this property is 16 (WCF 4.0 is improved to default is 16 * Processor Count). |
maxConcurrentInstances | This specifies the maximum number of instances of a context object that executes at one time with the service. The default is Int32.MaxValue. |
maxConcurrentSessions | This specifies the maximum number of sessions at one time within the service host object. The default value is 10 (WCF 4.0 increases that to 100 * Processor Count). |
- <configuration>
- <system.serviceModel>
- <services>
- <service .... .... .... </service>
- </services>
- <behaviors>
- <serviceBehaviors>
- <behavior name="ServiceBehavior">
- <serviceThrottling maxConcurrentCalls="16" maxConcurrentSessions="100" maxConcurrentInstances="10" />
- <serviceMetadata httpGetEnabled="true" /> </behavior>
- </serviceBehaviors>
- </behaviors>
- </system.serviceModel>
- </configuration>
No comments:
Post a Comment