This blog will discuss how to tune WCF service performance
under heavy load and explain the throttling settings.
Here is default value for each throttling setting as per
msdn (wcf4.5 and higher version)
Default Value
|
Single core -processor
|
|
MaxConcurrentCalls
|
16 * No of processor
|
16
|
MaxConcurrentInstances
|
MaxConcurrentCalls + MaxConcurrentInstances
|
116
|
MaxConcurrentSessions
|
100 * No of processor
|
100
|
In WCF , service throttling settings control the WCF service
performance and server resource unitization, without knowing if you provide the
highest value (INT MAX) to these setting, then service will be completed
chocked.
We can achieve balance performance of service and controller resource usages by using following settings
- MaxConcurrentCalls: specify maximum number of message concurrently process by Service Host.
- MaxConcurrentInstances: specify the maximum number of instance object of service.
- MaxConcurrentSessions : specify the maximum number of sessions a ServiceHost object can accept
Web.config:
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceThrottling
maxConcurrentCalls="16"
maxConcurrentInstances="116"
maxConcurrentSessions ="100"
/>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
Thanks for visiting!!
No comments:
Post a Comment